/* 
 * Custom CSS - Stili personalizzati del sito Utifarma
 * Ultimo aggiornamento: 30/01/2026
 */

/* ================================
   FONT
   ================================ */
body, .navbar, .sidenav, .top-navbar-menu, 
h1, h2, h3, h4, h5, h6, 
p, a, span, div, 
input, button, select, textarea {
    font-family: 'Gantari', sans-serif !important;
}

a:focus {
    outline: none;
    text-decoration: none!important;
    color: #fff;
}

.w100 {
    width: 100%;
}

/* ================================
   MENU ORIZZONTALE MODERNO
   ================================ */
.sidenav-toggler {
    display: none;
}

.layout-sidebar {
    display: none !important;
}

.layout-content {
    margin: 0 32px !important;
}

/* Nuovo menu orizzontale */
.top-navbar-menu {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 0 20px;
    border-bottom: 1px solid #e0e0e0;
    height: 60px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.top-navbar-menu .nav-logo {
    display: flex;
    align-items: center;
    margin-right: 30px;
    margin-left: 20px;
}

.top-navbar-menu .nav-logo img {
    height: 40px;
}

.top-navbar-menu .nav-items {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-grow: 1;
}

.top-navbar-menu .nav-items li {
    margin: 0 5px;
}

.top-navbar-menu .nav-items li a {
    display: block;
    padding: 10px 15px;
    color: #364153;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    border-radius: 10px;
    line-height: 20px;
    transition: all 0.2s ease;
}

.top-navbar-menu .nav-items li a:hover{
    background: #fbf9fa;
}
.top-navbar-menu .nav-items li a.active {
    background: #F0FDF4;
    color: #008236;
}

.top-navbar-menu .nav-items li a .sidenav-icon {
    display: none;
}

.top-navbar-menu .nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.top-navbar-menu .nav-right .nav-notification {
    position: relative;
    font-size: 18px;
    color: #4A5565;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 10px;
}

.top-navbar-menu .nav-right .nav-notification .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: #fff;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 50%;
}

.top-navbar-menu .nav-right .nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    color: #333;
    font-size: 14px;
    border-radius: 10px;
}

.top-navbar-menu .nav-right .nav-notification:hover,
.top-navbar-menu .nav-right .nav-user:hover {
    background: #fbf9fa;
}

.top-navbar-menu .nav-right .nav-user i {
    font-size: 20px;
    color: #666;
}

.top-navbar-menu .nav-right .nav-logout {
    font-size: 18px;
    cursor: pointer;
    padding: 8px 16px 8px 0;
    border-radius: 10px;
}

.top-navbar-menu .nav-right .nav-logout:hover {
     background: #fbf9fa;
}

.layout{
    padding-top: unset;
    position: relative;
    margin-top: 60px;
    background-color: #F9FAFB;
}

/* ================================
   SEZIONE RICERCA e STRUMENTI
   ================================ */
.search-label {
  font-size: 14px;
  color: #364153;
  margin-bottom: 8px;
  display: block;
  line-height: 20px;
  font-weight: 500;
}
.search-input-wrapper {
  position: relative;
  margin-bottom: 15px;
}
.search-input-wrapper input {
  padding-right: 40px;
  border: 1px solid #D1D5DC;
  border-radius: 10px;
  height: 40px;
}
.search-input-wrapper .search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #99A1AF;
  pointer-events: none;
  font-size: 20px;
}

.dashboard-section {
    margin: 25px auto !important;
    padding: 25px 20px 0;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    background: #ffffff;
}

.dashboard-section hr {
    border: 1px solid #E5E7EB;
    margin: 20px auto 25px;
    width: 99%;
}

.bs-correction {
    margin-left: 15px !important;
}

/* ================================
   MODAL GUIDA FARMACO
   ================================ */
#guida .modal-dialog {
    max-width: 680px;
}

.guida-modal-content {
    border-radius: 16px !important;
    border: none !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15) !important;
    overflow: hidden;
}

.guida-header-wrapper {
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 40%, #F0FFF4 100%);
    padding: 20px 24px 16px 24px;
    position: relative;
}

.guida-header-top-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.guida-modal-title {
    font-size: 22px !important;
    font-weight: 800 !important;
    color: #111827 !important;
    margin: 0 !important;
    line-height: 1.3;
}

.guida-header-badges {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

.guida-header-subtitle {
    font-size: 14px;
    color: #1F2937;
    margin-bottom: 2px;
    line-height: 1.5;
}

.guida-header-subtitle b {
    font-weight: 600;
}

.guida-header-subtitle em {
    font-style: italic;
}

.guida-header-subtitle-secondary {
    font-size: 13px;
    color: #6B7280;
    line-height: 1.5;
}

.guida-header-subtitle-secondary b {
    font-weight: 600;
    color: #4B5563;
}

.guida-gradient-bar {
    height: 4px;
    background: linear-gradient(90deg, #00A63E 0%, #34D399 50%, #A7F3D0 100%);
    width: 100%;
}

.guida-close-btn {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 28px;
    font-weight: 300;
    color: #6B7280;
    opacity: 1;
    z-index: 2;
    line-height: 1;
    background: none;
    border: none;
    padding: 0;
}

.guida-close-btn:hover {
    color: #111827;
}

.guida-modal-body {
    padding: 0 24px 20px 24px !important;
    overflow-y: auto;
    max-height: 65vh;
}

.guida-modal-footer {
    padding: 14px 24px !important;
    border-top: 1px solid #E5E7EB !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.guida-btn-chiudi {
    border-radius: 8px !important;
    min-width: 110px;
    font-weight: 600 !important;
    background-color: #E5E7EB !important;
    color: #364153 !important;
    border: none !important;
    padding: 8px 20px !important;
    transition: background-color 0.2s;
}

.guida-btn-chiudi:hover {
    background-color: #D1D5DB !important;
}

.guida-btn-modifica {
    border-radius: 8px !important;
    min-width: 110px;
    font-weight: 600 !important;
    background-color: #00A63E !important;
    color: #fff !important;
    border: none !important;
    padding: 8px 20px !important;
    text-decoration: none !important;
    transition: background-color 0.2s;
}

.guida-btn-modifica:hover {
    background-color: #008a32 !important;
    color: #fff !important;
    text-decoration: none !important;
}

/* Badge pills nel body */
.guida-badges-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.guida-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.guida-badge-dpc {
    background-color: #2563EB;
    color: #fff;
}

.guida-badge-diretta {
    background-color: #DC2626;
    color: #fff;
}

.guida-badge-conv {
    background-color: #F59E0B;
    color: #fff;
}

/* Sezioni strutturate */
.guida-section {
    margin-top: 20px;
    margin-bottom: 20px;
}

.guida-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 10px;
}

.guida-icon-info {
    color: #2563EB;
    font-size: 17px;
}

.guida-icon-doc {
    color: #059669;
    font-size: 17px;
}

.guida-icon-list {
    color: #6B7280;
    font-size: 17px;
}

.guida-icon-download {
    color: #059669;
    font-size: 17px;
}

/* Info box stile prescrittivo */
.guida-info-box {
    background-color: #FEFCE8;
    border: 1px solid #FDE68A;
    border-radius: 10px;
    padding: 14px 18px;
    color: #1F2937;
    font-size: 14px;
    line-height: 1.6;
}

.guida-info-box img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 6px;
    margin: 8px 0;
}

.guida-info-box table {
    width: 100%;
    margin: 8px 0;
}

.guida-info-box .btn-success {
    border-radius: 8px;
    font-weight: 600;
}

/* Tabella farmaci */
.guida-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    overflow: hidden;
    font-size: 14px;
}

.guida-table thead th {
    background-color: #F9FAFB;
    color: #374151;
    font-weight: 600;
    padding: 10px 14px;
    border-bottom: 1px solid #E5E7EB;
    text-align: left;
}

.guida-table tbody td {
    padding: 9px 14px;
    border-bottom: 1px solid #F3F4F6;
    color: #374151;
}

.guida-table tbody tr:last-child td {
    border-bottom: none;
}

.guida-table tbody tr:hover {
    background-color: #F9FAFB;
}

/* Card circolari */
.guida-circolari-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.guida-circolare-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 14px 18px;
    transition: box-shadow 0.2s;
}

.guida-circolare-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.guida-circolare-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.guida-circolare-icon {
    font-size: 18px;
    color: #9CA3AF;
    flex-shrink: 0;
}

.guida-circolare-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
    word-break: break-word;
}

.guida-circolare-date {
    font-size: 12px;
    color: #6B7280;
    margin-top: 2px;
}

.guida-circolare-link {
    color: #059669 !important;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none !important;
    white-space: nowrap;
    margin-left: 16px;
    flex-shrink: 0;
}

.guida-circolare-link:hover {
    color: #047857 !important;
    text-decoration: underline !important;
}

/* Documenti */
.guida-documenti-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.guida-documento-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 14px 18px;
}

.guida-documento-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.guida-documento-icon {
    width: 36px;
    height: 36px;
    background: #FEE2E2;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.guida-documento-icon i {
    color: #DC2626;
    font-size: 18px;
}

.guida-documento-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.guida-documento-type {
    font-size: 12px;
    color: #6B7280;
}

.guida-documento-download {
    color: #6B7280;
    font-size: 18px;
    cursor: pointer;
    transition: color 0.2s;
    text-decoration: none !important;
}

.guida-documento-download:hover {
    color: #111827;
}

/* Loading */
.guida-loading {
    text-align: center;
    padding: 40px 20px;
    color: #6B7280;
    font-size: 15px;
}

.guida-loading i {
    font-size: 20px;
    margin-right: 8px;
    color: #00A63E;
}

/* Responsive */
@media (max-width: 576px) {
    #guida .modal-dialog {
        margin: 10px;
    }
    .guida-modal-body {
        max-height: 70vh;
    }
    .guida-circolare-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .guida-circolare-link {
        margin-left: 0;
    }
}

/* ================================
   RICERCA FARMACI
   ================================ */
#cardlistafarmaci {
    display:none;
    border: 2px solid oklch(72.3% 0.219 149.579);
    border-radius: 10px;
    background:#DCFCE7;
    box-shadow: 3px 3px 3px #b5b2b2;
}


/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 992px) {
    .top-navbar-menu {
        flex-wrap: wrap;
        height: auto;
        padding: 10px;
    }
    
    .top-navbar-menu .nav-items {
        order: 3;
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 10px;
    }
    
    .top-navbar-menu .nav-items li a {
        padding: 8px 10px;
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .top-navbar-menu .nav-items li a {
        padding: 6px 8px;
        font-size: 12px;
    }
}

/* ================================
   RIGHT SIDEBAR FIXED
   ================================ */
.right-sidebar {
    position: fixed;
    top: 60px;
    right: 0;
    width: 340px; /* 280px; */
    height: calc(100vh - 60px);
    background: #364153;
    border-left: 1px solid #E5E7EB;
    padding: 20px;
    overflow-y: auto;
    z-index: 100;
}

.layout-content.has-right-sidebar {
    margin-right: 340px !important;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    border-bottom: 1px solid #4A5565;
    padding-bottom: 15px;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.sidebar-edit {
    font-size: 12px;
    color: #05DF72;
    text-decoration: none;
}

.sidebar-edit:hover {
    text-decoration: underline;
}

.sidebar-section {
    margin-bottom: 16px;
    border-radius: 10px;
    overflow: hidden;
}

.section-badge {
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.sidebar-section.dcr .section-badge {
    background: linear-gradient(90deg, #00A63E 0%, #00C950 100%);
}

.sidebar-section.dpc .section-badge {
    background: linear-gradient(90deg, #155DFC 0%, #2B7FFF 100%);
}

.sidebar-section.integrativi .section-badge {
    background: linear-gradient(90deg, #9810FA 0%, #AD46FF 100%);
}

.section-content {
    background: #fff;
    padding: 12px 14px;
    border: 1px solid #E5E7EB;
    border-top: none;
    border-radius: 0 0 10px 10px;
}

.payment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #F3F4F6;
}

.payment-row:last-child {
    border-bottom: none;
}

.payment-label {
    font-size: 12px;
    color: #6A7282;
    text-transform: uppercase;
}

.payment-value {
    font-size: 12px;
    font-weight: 600;
    color: #1F2937;
}

.integrativi-table {
    width: 100%;
    font-size: 12px;
    border-collapse: collapse;
}

.integrativi-table th {
    text-align: left;
    padding: 6px 4px;
    color: #6B7280;
    font-weight: 500;
    border-bottom: 1px solid #E5E7EB;
}

.integrativi-table th small {
    display: block;
    font-weight: 400;
    color: #9CA3AF;
}

.integrativi-table td {
    padding: 6px 4px;
    color: #374151;
    border-bottom: 1px solid #F3F4F6;
}

.integrativi-table .highlight-row td {
    background: #F0FDF4;
}

.btn-verify {
    display: inline-block;
    background: #059669;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    white-space: nowrap;
}

/* Responsive sidebar */
@media (max-width: 1200px) {
    .right-sidebar {
        width: 240px;
    }
    .layout-content.has-right-sidebar {
        margin-right: 240px !important;
    }
}

@media (max-width: 992px) {
    .right-sidebar {
        display: none;
    }
    .layout-content.has-right-sidebar {
        margin-right: 32px !important;
    }
}

/* ================================
   DASHBOARD CARDS
   ================================ */
.dashboard-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    justify-content: space-between;
}

.dashboard-cards .col-md-6 {
    flex: 1;
    min-width: 200px;
    /* max-width: 375px; */
    max-width: 450px;
    padding: 0;
}

.dashboard-card-link {
    text-decoration: none !important;
    display: block;
}

.dashboard-card {
    background: #DCFCE7;
    border-radius: 12px;
    padding: 20px;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
    border: none;
}

.dashboard-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.dashboard-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.dashboard-card-icon i {
    font-size: 18px;
    color: #fff;
}

.dashboard-card-icon.icon-red {
    background: #EF4444;
}

.dashboard-card-icon.icon-blue {
    background: #3B82F6;
}

.dashboard-card-icon.icon-teal {
    background: #6A7282;
}

.dashboard-card-number {
    font-size: 36px;
    font-weight: 600;
    color: #1F2937;
    line-height: 1;
    margin-bottom: 5px;
}

.dashboard-card-label {
    font-size: 14px;
    color: #4A5565;
    margin-bottom: 15px;
}

.dashboard-card-action {
    font-size: 14px;
    color: #008236;
    font-weight: 500;
    margin-top: auto;
}

.dashboard-card:hover .dashboard-card-action {
    color: #047857;
}

@media (max-width: 768px) {
    .dashboard-cards .col-md-6 {
        min-width: 45%;
        max-width: 48%;
    }
}

@media (max-width: 576px) {
    .dashboard-cards .col-md-6 {
        min-width: 100%;
        max-width: 100%;
    }
}

/* ================================
   MODAL NSO - Editing inline
   ================================ */
.nso-btn-edit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #00A63E;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 5px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-left: 12px;
    vertical-align: middle;
    transition: all 0.2s ease;
}

.nso-btn-edit:hover {
    background-color: #008a32;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 166, 62, 0.3);
}

.nso-btn-edit-active {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #364153;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 5px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-left: 12px;
    vertical-align: middle;
    transition: all 0.2s ease;
}

.nso-btn-edit-active:hover {
    background-color: #1e2939;
    box-shadow: 0 4px 12px rgba(30, 41, 57, 0.3);
}

.nso-edit-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    color: #374151;
    background-color: #f9fafb;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.nso-edit-input:focus {
    outline: none;
    border-color: #00A63E;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(0, 166, 62, 0.1);
}

.nso-edit-input-small {
    font-size: 11px;
    padding: 4px 8px;
    margin-top: 4px;
}

.nso-btn-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background-color: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
}

.nso-btn-delete:hover {
    background-color: #dc2626;
    color: #fff;
}

.nso-new-row td {
    background-color: #f0fdf4 !important;
}

.nso-cell-editable {
    cursor: pointer;
    border: 1px dashed #00A63E !important;
    transition: background-color 0.15s ease;
}

.nso-cell-editable:hover {
    background-color: #f0fdf4 !important;
}
