/* ==================================================================

   TRICOCLINIC - MODERN THEME

   Tema único moderno para substituir sistema de temas por tenant

   ================================================================== */



/* ==== CSS VARIABLES ==== */

:root {

    /* Cores Principais */

    --primary: #44bfe1;           /* Azul principal */

    --primary-hover: #2aa3c8;

    --primary-light: #e8f7fc;



    --accent: #ddde40;            /* Amarelo/limão para destaques */

    --accent-hover: #c4c62d;

    --accent-light: rgba(221, 222, 64, 0.15);



    --secondary: #244356;         /* Azul escuro */

    --secondary-hover: #1a3242;

    --secondary-light: rgba(36, 67, 86, 0.15);



    --dark: #2b2a3a;              /* Roxo escuro */

    --dark-hover: #1f1e2a;

    --dark-light: rgba(43, 42, 58, 0.15);



    --success: #10b981;

    --warning: #f59e0b;

    --danger: #ef4444;

    --info: #3b82f6;
--error: #ff3333;



    /* Tons de Cinza/Neutros */

    --gray-50: #f9fafb;

    --gray-100: #f3f4f6;

    --gray-200: #e5e7eb;

    --gray-300: #d1d5db;

    --gray-400: #9ca3af;

    --gray-500: #6b7280;

    --gray-600: #4b5563;

    --gray-700: #374151;

    --gray-800: #1f2937;

    --gray-900: #111827;



    /* Superfícies */

    --bg-app: #f0f3f7;            /* Fundo da área de conteúdo (levemente mais escuro) */

    --sidebar-bg: #ffffff;        /* Sidebar CLARA */

    --header-bg: #ffffff;         /* Header CLARO */

    --card-bg: #ffffff;           /* Cards brancos */



    /* Bordas */

    --border-light: #e5e7eb;

    --border-medium: #d1d5db;



    /* Texto */

    --text-primary: #111827;

    --text-secondary: #6b7280;

    --text-muted: #9ca3af;



    /* Sombras */

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);

    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.06);

    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);

    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);

    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.12);



    /* Border Radius */

    --radius-sm: 6px;

    --radius-md: 10px;

    --radius-lg: 14px;

    --radius-xl: 18px;



    /* Espaçamentos */

    --space-xs: 4px;

    --space-sm: 8px;

    --space-md: 16px;

    --space-lg: 24px;

    --space-xl: 32px;



    /* Layout */

    --sidebar-width: 260px;

    --sidebar-collapsed: 80px;

    --header-height: 70px;

}



/* ==== BASE STYLES ==== */

* {

    margin: 0;

    padding: 0;

    box-sizing: border-box;

}



body {

    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;

    font-size: 15px;

    line-height: 1.6;

    color: var(--text-primary);

    background: var(--bg-app);

    -webkit-font-smoothing: antialiased;

    -moz-osx-font-smoothing: grayscale;

}



/* ==== LAYOUT ==== */

.wrapper {

    display: flex;

    min-height: 100vh;

}



/* ==== SIDEBAR ==== */

.sidebar {

    width: var(--sidebar-width);

    background: var(--sidebar-bg);

    border-right: 1px solid var(--border-light);

    display: flex;

    flex-direction: column;

    position: fixed;

    top: 0;

    left: 0;

    bottom: 0;

    z-index: 100;

    box-shadow: var(--shadow-sm);

    transition: all 0.3s ease;

}



.sidebar.collapsed {

    width: var(--sidebar-collapsed);

}



/* Logo */

.sidebar-logo {

    padding: 12px;

    border-bottom: 1px solid var(--border-light);

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 12px;

    height: var(--header-height);

}



.sidebar-logo .logo-grande {

    height: 28px;

    width: auto;

    display: block;

}



.sidebar-logo .logo-pequena {

    height: 28px;

    width: auto;

    display: none;

}



.sidebar.collapsed .logo-grande {

    display: none;

}



.sidebar.collapsed .logo-pequena {

    display: block;

}



/* Menu */

.sidebar-menu {

    flex: 1;

    padding: var(--space-md) 0;

    overflow-y: auto;

}



.sidebar-menu ul {

    list-style: none;

    padding: 0;

    margin: 0;

}



.sidebar-menu li {

    margin: 0;

}



.sidebar-menu a {

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 12px 20px;

    margin: 2px 12px;

    color: var(--text-secondary);

    text-decoration: none;

    border-radius: var(--radius-md);

    transition: all 0.2s ease;

    font-weight: 500;

    font-size: 14px;

}



.sidebar-menu a:hover {

    background: var(--primary-light);

    color: var(--primary);

}



.sidebar-menu a.active {

    background: var(--primary);

    color: white;

}



.sidebar-menu a.active i,

.sidebar-menu a.active svg {

    color: white !important;

}



.sidebar-menu i,

.sidebar-menu svg {

    width: 20px;

    height: 20px;

    min-width: 20px;

    color: var(--text-muted);

    transition: color 0.2s ease;

}



.sidebar.collapsed .sidebar-menu a span {

    display: none;

}



.sidebar.collapsed .sidebar-menu a {

    justify-content: center;

    padding: 12px;

}



/* Submenu */

.sidebar-submenu {

    max-height: 0;

    overflow: hidden;

    transition: max-height 0.3s ease;

}



.sidebar-submenu.active {

    max-height: 500px;

}



.sidebar-submenu ul {

    padding: var(--space-xs) 0;

}



.sidebar-submenu a {

    padding-left: 52px;

    font-size: 13px;

    background: var(--gray-50);

}



.sidebar-submenu a:hover {

    background: var(--gray-100);

}



.sidebar-submenu a.active {

    background: var(--primary);

}



/* Hide icons in submenu items */

.sidebar-submenu i,

.sidebar-submenu svg {

    display: none;

}



.sidebar.collapsed .sidebar-submenu {

    display: none;

}



.has-submenu.active > .submenu-toggle {

    background: var(--primary-light);

    color: var(--primary);

}



/* Sidebar Footer - User Info */

.sidebar-footer {

    border-top: 1px solid var(--border-light);

    padding: var(--space-md);

}



.sidebar-user {

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 12px;

    background: var(--gray-50);

    border-radius: var(--radius-md);

    margin-bottom: var(--space-sm);

}



.sidebar-user-avatar {

    width: 44px;

    height: 44px;

    min-width: 44px;

    border-radius: 50%;

    background: linear-gradient(135deg, var(--primary), var(--accent));

    display: flex;

    align-items: center;

    justify-content: center;

    color: white;

    font-weight: 600;

    font-size: 16px;

    text-transform: uppercase;

    overflow: hidden;

}



.sidebar-user-avatar img {

    width: 100%;

    height: 100%;

    object-fit: cover;

}



.sidebar-user-info {

    flex: 1;

    min-width: 0;

}



.sidebar-user-name {

    font-weight: 600;

    font-size: 14px;

    color: var(--text-primary);

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

}



.sidebar-user-role {

    font-size: 12px;

    color: var(--text-muted);

}



.sidebar.collapsed .sidebar-user {

    justify-content: center;

}



.sidebar.collapsed .sidebar-user-info {

    display: none;

}



.sidebar-actions {

    display: flex;

    gap: var(--space-sm);

}



.sidebar-action-btn,

.sidebar-toggle {

    flex: 1;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 6px;

    padding: 10px;

    background: white;

    border: 1px solid var(--border-light);

    border-radius: var(--radius-md);

    color: var(--text-secondary);

    font-size: 13px;

    font-weight: 500;

    cursor: pointer;

    transition: all 0.2s ease;

    text-decoration: none;

}



.sidebar-action-btn:hover,

.sidebar-toggle:hover {

    background: var(--gray-50);

    border-color: var(--border-medium);

    color: var(--text-primary);

}



.sidebar-action-btn i,

.sidebar-action-btn svg,

.sidebar-toggle i,

.sidebar-toggle svg {

    width: 16px;

    height: 16px;

}



.sidebar.collapsed .sidebar-action-btn span,

.sidebar.collapsed .sidebar-toggle span {

    display: none;

}



/* ==== MAIN CONTENT AREA ==== */

.main-content {

    flex: 1;

    /* Item de flex não encolhe abaixo do conteúdo sem isto: uma tabela larga
       esticava a página inteira e ela rolava para o lado no tablet */
    min-width: 0;

    margin-left: var(--sidebar-width);

    display: flex;

    flex-direction: column;

    min-height: 100vh;

    transition: margin-left 0.3s ease;

    background: var(--bg-app);

}



.sidebar.collapsed ~ .main-content {

    margin-left: var(--sidebar-collapsed);

}



/* ==== HEADER ==== */

header {

    height: var(--header-height);

    background: var(--header-bg);

    border-bottom: 1px solid var(--border-light);

    display: flex;

    align-items: center;

    padding: 0 var(--space-lg);

    gap: var(--space-lg);

    position: sticky;

    top: 0;

    z-index: 90;

    box-shadow: var(--shadow-xs);

}



.header-title h1 {

    font-size: 22px;

    font-weight: 700;

    color: var(--text-primary);

    white-space: nowrap;

    margin: 0;

}

/* Título longo ("Gerenciamento de Pacientes") empurrava os botões do topo para
   fora da tela no tablet: o título cede espaço e corta com reticências */
header .header-title { min-width: 0; }
header .header-title h1 { overflow: hidden; text-overflow: ellipsis; }



.header-search {

    flex: 1;

    max-width: 500px;

    position: relative;

}



.header-search input {

    width: 100%;

    padding: 10px 16px 10px 42px;

    border: 1px solid var(--border-light);

    border-radius: var(--radius-lg);

    background: var(--gray-50);

    font-size: 14px;

    color: var(--text-primary);

    transition: all 0.2s ease;

}



.header-search input:focus {

    outline: none;

    background: white;

    border-color: var(--primary);

    box-shadow: 0 0 0 3px rgba(68, 191, 225, 0.1);

}



.header-search i,

.header-search svg {

    position: absolute;

    left: 14px;

    top: 50%;

    transform: translateY(-50%);

    color: var(--text-muted);

    width: 18px;

    height: 18px;

}



.header-actions {

    display: flex;

    align-items: center;

    gap: var(--space-sm);

    margin-left: auto;

}



.header-actions .btn-icon,

.header-icon-btn {

    width: 42px;

    height: 42px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: var(--radius-md);

    color: var(--text-secondary);

    background: transparent;

    border: none;

    cursor: pointer;

    position: relative;

    transition: all 0.2s ease;

}



.header-actions .btn-icon:hover,

.header-icon-btn:hover {

    background: var(--gray-50);

    color: var(--text-primary);

}



.header-actions .btn-icon i,

.header-actions .btn-icon svg,

.header-icon-btn i,

.header-icon-btn svg {

    width: 20px;

    height: 20px;

}



.header-actions .notification-count,

.header-icon-btn .badge {

    position: absolute;

    top: 6px;

    right: 6px;

    min-width: 18px;

    padding: 2px 5px;

    background: var(--danger);

    color: white;

    border-radius: 50%;

    font-size: 10px;

    font-weight: 600;

    display: flex;

    align-items: center;

    justify-content: center;

    border: 2px solid var(--header-bg);

    transform: translate(10px, -10px);

}



/* Header Dropdown */

.header-dropdown {

    position: relative;

}



/* User Dropdown */

.user-dropdown {

    position: relative;

}



.user-dropdown button {

    display: flex;

    align-items: center;

    gap: 8px;

    padding: 8px 12px;

    background: transparent;

    border: none;

    border-radius: var(--radius-md);

    color: var(--text-primary);

    cursor: pointer;

    transition: background 0.2s ease;

    font-size: 14px;

}



.user-dropdown button:hover {

    background: var(--gray-50);

}



.dropdown-menu {

    display: none;

    position: absolute;

    top: calc(100% + 8px);

    right: 0;

    background: white;

    border: 1px solid var(--border-light);

    border-radius: var(--radius-md);

    box-shadow: var(--shadow-lg);

    min-width: 200px;

    padding: var(--space-sm);

    z-index: 1000;

}



.dropdown-menu.show {

    display: block;

}



.dropdown-item {

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 10px 12px;

    color: var(--text-primary);

    text-decoration: none;

    border-radius: var(--radius-sm);

    transition: background 0.2s ease;

    font-size: 14px;

}



.dropdown-item:hover {

    background: var(--gray-50);

}



.dropdown-item i,

.dropdown-item svg {

    width: 18px;

    height: 18px;

    color: var(--text-muted);

}



.dropdown-divider {

    height: 1px;

    background: var(--border-light);

    margin: var(--space-sm) 0;

}



/* ==== CONTENT AREA ==== */

.container {

    padding: var(--space-lg) var(--space-xl);

    max-width: 100%;

    width: 100%;

    margin: 0;

}



/* ==== CARDS ==== */

.card,

.content {

    background: var(--card-bg);

    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-sm);

    border: 1px solid var(--border-light);

    margin-bottom: var(--space-lg);

}



.card-header {

    padding: var(--space-lg);

    border-bottom: 1px solid var(--border-light);

    display: flex;

    align-items: center;

    justify-content: space-between;

}



.card-title {

    font-size: 18px;

    font-weight: 700;

    color: var(--text-primary);

    display: flex;

    align-items: center;

    gap: 10px;

    margin: 0;

}



.card-body {

    padding: var(--space-lg);

}



.card-footer {

    padding: var(--space-lg);

    border-top: 1px solid var(--border-light);

    background: var(--gray-50);

}



/* ==== BUTTONS ==== */

.btn {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    padding: 10px 20px;

    font-size: 14px;

    font-weight: 600;

    border-radius: var(--radius-md);

    border: none;

    cursor: pointer;

    transition: all 0.2s ease;

    text-decoration: none;

    white-space: nowrap;

}



.btn i,

.btn svg {

    width: 18px;

    height: 18px;

}



.btn-primary {

    background: linear-gradient(135deg, var(--primary), var(--primary-hover));

    color: white;

    box-shadow: 0 4px 12px rgba(68, 191, 225, 0.3);

}



.btn-primary:hover {

    box-shadow: 0 6px 20px rgba(68, 191, 225, 0.4);

    transform: translateY(-1px);

}



.btn-secondary {

    background: var(--gray-100);

    color: var(--text-primary);

}



.btn-secondary:hover {

    background: var(--gray-200);

}



.btn-success {

    background: var(--success);

    color: white;

}



.btn-danger {

    background: var(--danger);

    color: white;

}



.btn-warning {

    background: var(--warning);

    color: white;

}



.btn-info {

    background: var(--info);

    color: white;

}



.btn-outline {

    background: white;

    border: 1px solid var(--border-medium);

    color: var(--text-primary);

}



.btn-outline:hover {

    background: var(--gray-50);

    border-color: var(--primary);

    color: var(--primary);

}



.btn-sm {

    padding: 6px 14px;

    font-size: 13px;

}



.btn-lg {

    padding: 14px 28px;

    font-size: 16px;

}



.btn:disabled {

    opacity: 0.5;

    cursor: not-allowed;

}



/* ==== FORMS ==== */

.form-group {

    margin-bottom: var(--space-lg);

}



.form-label {

    display: block;

    font-size: 14px;

    font-weight: 600;

    color: var(--text-primary);

    margin-bottom: var(--space-sm);

}



.form-control {

    width: 100%;

    padding: 10px 14px;

    font-size: 14px;

    border: 1px solid var(--border-light);

    border-radius: var(--radius-md);

    background: white;

    color: var(--text-primary);

    transition: all 0.2s ease;

}



.form-control:focus {

    outline: none;

    border-color: var(--primary);

    box-shadow: 0 0 0 3px rgba(68, 191, 225, 0.15);

}



.form-control::placeholder {

    color: var(--text-muted);

}



textarea.form-control {

    resize: vertical;

    min-height: 100px;

}



select.form-control {

    cursor: pointer;

}



/* ==== TABLES ==== */

.table-responsive {

    overflow-x: auto;

}



.table {

    width: 100%;

    border-collapse: collapse;

}



.table thead th {

    background: var(--gray-50);

    padding: 14px 16px;

    text-align: left;

    font-size: 13px;

    font-weight: 700;

    color: var(--text-secondary);

    text-transform: uppercase;

    letter-spacing: 0.5px;

    border-bottom: 2px solid var(--border-light);

}



.table tbody td {

    padding: 16px;

    border-bottom: 1px solid var(--border-light);

    font-size: 14px;

    color: var(--text-primary);

}



.table tbody tr {

    transition: background 0.2s ease;

}



.table tbody tr:hover {

    background: var(--gray-50);

}



/* ==== BADGES ==== */

.badge {

    display: inline-flex;

    align-items: center;

    padding: 4px 10px;

    font-size: 12px;

    font-weight: 600;

    border-radius: var(--radius-sm);

}



.badge-success {

    background: #d1fae5;

    color: #065f46;

}



.badge-warning {

    background: #fef3c7;

    color: #92400e;

}



.badge-danger {

    background: #fee2e2;

    color: #991b1b;

}



.badge-info {

    background: var(--primary-light);

    color: var(--primary-hover);

}



.badge-primary {

    background: var(--primary);

    color: white;

}



.badge-secondary {

    background: var(--gray-200);

    color: var(--gray-700);

}



/* ==== ALERTS ==== */

.alert {

    padding: var(--space-md);

    border-radius: var(--radius-md);

    margin-bottom: var(--space-lg);

    display: flex;

    align-items: flex-start;

    gap: 12px;

    border-left: 4px solid;

}



.alert-info {

    background: var(--primary-light);

    border-color: var(--primary);

    color: var(--primary-hover);

}



.alert-success {

    background: #d1fae5;

    border-color: var(--success);

    color: #065f46;

}



.alert-warning {

    background: #fef3c7;

    border-color: var(--warning);

    color: #92400e;

}



.alert-danger {

    background: #fee2e2;

    border-color: var(--danger);

    color: #991b1b;

}



/* ==== MOBILE RESPONSIVE ==== */

@media (max-width: 768px) {

    .sidebar {

        transform: translateX(-100%);

    }



    .sidebar.mobile-open {

        transform: translateX(0);

        width: var(--sidebar-width);

    }



    .sidebar.collapsed {

        transform: translateX(-100%);

    }



    .main-content {

        margin-left: 0 !important;

    }



    header .header-title h1 {

        font-size: 18px;

    }



    .header-search {

        display: none;

    }



    .user-dropdown button span {

        display: none;

    }



    .container {

        padding: var(--space-md);

    }



    /* Mobile menu toggle */

    .mobile-menu-toggle {

        display: flex !important;

        align-items: center;

        justify-content: center;

        width: 42px;

        height: 42px;

        border: none;

        background: transparent;

        color: var(--text-primary);

        cursor: pointer;

        border-radius: var(--radius-md);

        transition: background 0.2s ease;

    }



    .mobile-menu-toggle:hover {

        background: var(--gray-50);

    }



    .mobile-menu-toggle i,

    .mobile-menu-toggle svg {

        width: 24px;

        height: 24px;

    }



    /* Modal close button ajustado para mobile */

    .modal-close {

        width: 38px;

        height: 38px;

    }



    .modal-close i,

    .modal-close svg {

        width: 18px;

        height: 18px;

    }



    /* Modal ocupa toda a tela em mobile */

    .modal {

        width: 100%;

        max-width: 100%;

        max-height: 100vh;

        height: 100vh;

        border-radius: 0;

    }



    .modal-header,

    .modal-body,

    .modal-footer {

        padding: var(--space-md);

    }

}



@media (min-width: 769px) {

    .mobile-menu-toggle {

        display: none !important;

    }

}



/* ==== UTILITIES ==== */

.text-center { text-align: center; }

.text-right { text-align: right; }

.text-left { text-align: left; }



.mb-0 { margin-bottom: 0 !important; }

.mb-1 { margin-bottom: var(--space-sm) !important; }

.mb-2 { margin-bottom: var(--space-md) !important; }

.mb-3 { margin-bottom: var(--space-lg) !important; }



.mt-0 { margin-top: 0 !important; }

.mt-1 { margin-top: var(--space-sm) !important; }

.mt-2 { margin-top: var(--space-md) !important; }

.mt-3 { margin-top: var(--space-lg) !important; }



.d-flex { display: flex; }

.align-center { align-items: center; }

.justify-between { justify-content: space-between; }

.justify-center { justify-content: center; }



.gap-1 { gap: var(--space-sm); }

.gap-2 { gap: var(--space-md); }

.gap-3 { gap: var(--space-lg); }



/* ==== MODAL SYSTEM ==== */

.modal-backdrop {

    position: fixed;

    top: 0;

    right: 0;

    bottom: 0;

    left: 0;

    background-color: rgba(0, 0, 0, 0.5);

    display: flex;

    align-items: center;

    justify-content: center;

    z-index: 1000;

    opacity: 0;

    visibility: hidden;

    transition: all 0.3s ease;

}



.modal-backdrop.active {

    opacity: 1;

    visibility: visible;

}



.modal {

    background-color: white;

    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-xl);

    width: 90%;

    max-width: 600px;

    max-height: 90vh;

    overflow: hidden; /* Removido overflow-y: auto para controlar scroll no body */

    transform: translateY(-20px);

    transition: all 0.3s ease;

    display: flex;

    flex-direction: column;

    position: relative;

    z-index: 1000;

}



.modal-backdrop.active .modal {

    transform: translateY(0);

}



.modal-header {

    padding: var(--space-lg);

    border-bottom: 1px solid var(--border-light);

    display: flex;

    align-items: center;

    justify-content: space-between;

    position: sticky;

    top: 0;

    background: white;

    z-index: 10;

    flex-shrink: 0; /* Não encolhe quando há pouco espaço */

}



.modal-title {

    font-size: 20px;

    font-weight: 700;

    color: var(--text-primary);

    margin: 0;

}



.modal-close {

    background: white;

    border: 2px solid var(--border-light);

    border-radius: 50%;

    width: 42px;

    height: 42px;

    display: flex;

    align-items: center;

    justify-content: center;

    cursor: pointer;

    color: var(--text-secondary);

    transition: all 0.2s ease;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);

    flex-shrink: 0; /* Não encolhe */

}



.modal-close i,

.modal-close svg {

    width: 20px;

    height: 20px;

    stroke: currentColor;

}



.modal-close:hover {

    background: var(--danger);

    color: white;

    border-color: var(--danger);

    transform: scale(1.05);

    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);

}



.modal-body {

    padding: var(--space-lg);

    overflow-y: auto; /* Scroll agora é no body */

    flex: 1; /* Ocupa todo espaço disponível */

}



.modal-footer {

    padding: var(--space-lg);

    border-top: 1px solid var(--border-light);

    display: flex;

    justify-content: flex-end;

    gap: var(--space-sm);

    position: sticky;

    bottom: 0;

    background: white;

    z-index: 10;

    flex-shrink: 0; /* Não encolhe quando há pouco espaço */

}



/* Modal Large - Modais maiores */

.modal-lg {

    max-width: 900px;

}



/* Garante que forms dentro de modais funcionem com flexbox */

.modal form {

    display: flex;

    flex-direction: column;

    flex: 1;

    overflow: hidden;

}



.modal form .modal-body {

    flex: 1;

    overflow-y: auto;

}



.modal form .modal-footer {

    flex-shrink: 0;

}



/* Responsividade para modais */

@media (max-width: 768px) {

    .modal {

        width: 95%;

        max-height: 95vh;

    }



    .modal-lg {

        max-width: 95%;

    }



    .modal-header {

        padding: var(--space-md);

    }



    .modal-body {

        padding: var(--space-md);

    }



    .modal-footer {

        padding: var(--space-md);

        flex-direction: column;

    }



    .modal-footer .btn {

        width: 100%;

    }



    .modal-title {

        font-size: 18px;

    }



    .modal-close {

        width: 36px;

        height: 36px;

    }



    .modal-close i,

    .modal-close svg {

        width: 18px;

        height: 18px;

    }

}



/* Modal Enhancements */

.modal-title-wrapper {

    display: flex;

    align-items: center;

    gap: var(--space-sm);

}



.modal-icon {

    width: 24px;

    height: 24px;

    color: var(--primary);

}



/* Form Sections for Better Organization */

.form-section {

    margin-bottom: var(--space-xl);

    padding: var(--space-lg);

    background: var(--gray-50);

    border-radius: var(--radius-md);

    border: 1px solid var(--border-light);

}



.form-section:last-of-type {

    margin-bottom: 0;

}



.form-section-header {

    display: flex;

    align-items: center;

    gap: var(--space-sm);

    margin-bottom: var(--space-lg);

    padding-bottom: var(--space-sm);

    border-bottom: 2px solid var(--border-light);

}



.form-section-header i,

.form-section-header svg {

    width: 20px;

    height: 20px;

    color: var(--primary);

}



.form-section-header h4 {

    margin: 0;

    font-size: 16px;

    font-weight: 700;

    color: var(--text-primary);

    text-transform: uppercase;

    letter-spacing: 0.5px;

}



/* Enhanced Form Labels with Icons */

.form-label {

    display: flex;

    align-items: center;

    gap: 6px;

    font-weight: 600;

    font-size: 14px;

    color: var(--text-primary);

    margin-bottom: var(--space-xs);

}



.form-label i,

.form-label svg {

    width: 16px;

    height: 16px;

    color: var(--text-secondary);

}



.form-label .required {

    color: var(--danger);

    margin-left: 2px;

    font-weight: 700;

}



/* Enhanced Checkboxes with Icons */

.form-check-label {

    display: flex;

    align-items: center;

    gap: 6px;

    cursor: pointer;

    font-size: 14px;

    color: var(--text-primary);

}



.form-check-label i,

.form-check-label svg {

    width: 16px;

    height: 16px;

    color: var(--text-secondary);

}



/* Recurrence Options Wrapper */

.recorrencia-wrapper {

    margin-top: var(--space-md);

    padding: var(--space-md);

    background: white;

    border-radius: var(--radius-sm);

    border-left: 3px solid var(--primary);

}



/* Enhanced Modal Buttons with Icons */

.modal-footer .btn {

    display: flex;

    align-items: center;

    gap: 8px;

    padding: 10px 20px;

    border-radius: var(--radius-md);

    font-weight: 600;

    font-size: 14px;

    border: none;

    cursor: pointer;

    transition: all 0.2s ease;

    white-space: nowrap;

}



.modal-footer .btn i,

.modal-footer .btn svg {

    width: 18px;

    height: 18px;

}



.modal-footer .btn-primary {

    background: var(--primary);

    color: white;

}



.modal-footer .btn-primary:hover {

    background: var(--primary-hover);

    transform: translateY(-1px);

    box-shadow: 0 4px 12px rgba(68, 191, 225, 0.3);

}



.modal-footer .btn-secondary {

    background: var(--gray-100);

    border: 1px solid var(--border-light);

    color: var(--text-primary);

}



.modal-footer .btn-secondary:hover {

    background: var(--gray-200);

    border-color: var(--primary);

    color: var(--primary);

}



.modal-footer .btn-danger {

    background: var(--danger);

    color: white;

}



.modal-footer .btn-danger:hover {

    background: var(--error);

    transform: translateY(-1px);

    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);

}



/* Icon Button (for add patient, etc.) */

.btn-icon {

    width: 40px;

    height: 40px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: var(--primary);

    color: white;

    border: none;

    border-radius: var(--radius-md);

    cursor: pointer;

    transition: all 0.2s ease;

}



.btn-icon:hover {

    background: var(--primary-hover);

    transform: translateY(-2px);

    box-shadow: 0 4px 12px rgba(68, 191, 225, 0.3);

}



.btn-icon i,

.btn-icon svg {

    width: 20px;

    height: 20px;

}



/* Tenant Selection Modal Specific */

.tenant-selection-grid {

    display: grid;

    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));

    gap: var(--space-md);

    margin-top: var(--space-md);

}



.tenant-card {

    padding: var(--space-lg);

    border: 2px solid var(--border-light);

    border-radius: var(--radius-lg);

    text-align: center;

    cursor: pointer;

    transition: all 0.2s ease;

    background: white;

}



.tenant-card:hover {

    border-color: var(--primary);

    box-shadow: var(--shadow-md);

    transform: translateY(-2px);

}



.tenant-card.selected {

    border-color: var(--primary);

    background: var(--primary-light);

}



.user-greeting {

    font-size: 14px;

    color: var(--text-secondary);

    font-weight: 500;

}



/* Loader */

.loader {

    display: inline-block;

    width: 30px;

    height: 30px;

    border: 3px solid rgba(0, 0, 0, 0.1);

    border-radius: 50%;

    border-top-color: var(--primary);

    animation: spin 1s ease-in-out infinite;

}



@keyframes spin {

    to { transform: rotate(360deg); }

}



.loader-container {

    display: flex;

    justify-content: center;

    align-items: center;

    padding: var(--space-lg);

}



/* ==================================================================

   CLASSES ESPECÍFICAS DO SISTEMA

   ================================================================== */



/* Plus Button */

.plus-btn {

    background: none;

    color: var(--primary);

    padding: 0;

    border: none;

    cursor: pointer;
    transition: opacity 0.2s ease;

}



.plus-btn:hover {

    opacity: 0.8;

}



/* Sidebar Overlay (Mobile) */

.sidebar-overlay {

    display: none;

    position: fixed;

    top: 0;

    left: 0;

    right: 0;

    bottom: 0;

    background: rgba(0, 0, 0, 0.5);

    z-index: 99;

}



.sidebar-overlay.active {

    display: block;

}



/* Footer da Página */

footer {

    background-color: var(--gray-50);

    padding: var(--space-md);

    text-align: center;

    font-size: 12px;

    color: var(--text-muted);

    margin: 15px 15px 0 15px;

    border-radius: 15px 15px 0 0;

}



/* Sistema de Notificações */

.notification-container {

    position: fixed;

    bottom: 20px;

    left: 50%;

    transform: translateX(-50%);

    width: 100%;

    max-width: 400px;

    z-index: 9999;

    display: flex;

    flex-direction: column;

    align-items: center;

}



.notification {

    background-color: white;

    border-radius: var(--radius-md);

    box-shadow: var(--shadow-lg);

    padding: var(--space-md) var(--space-lg);

    margin-bottom: var(--space-sm);

    width: 100%;

    display: flex;

    align-items: center;

    transform: translateY(100px);

    opacity: 0;

    transition: all 0.3s ease;

}



.notification.show {

    transform: translateY(0);

    opacity: 1;

}



.notification-icon {

    margin-right: var(--space-md);

    width: 24px;

    height: 24px;

    display: flex;

    align-items: center;

    justify-content: center;

}



.notification-content {

    flex-grow: 1;

}



.notification-title {

    font-weight: 500;

    margin-bottom: 3px;

}



.notification-message {

    color: var(--text-muted);

    font-size: 13px;

}



.notification-close {

    background: none;

    border: none;

    color: var(--text-muted);

    cursor: pointer;

    font-size: 18px;

    padding: 0;

    margin-left: var(--space-sm);

}



.notification-success {

    border-left: 4px solid var(--success);

}



.notification-success .notification-icon {

    color: var(--success);

}



.notification-error {

    border-left: 4px solid var(--danger);

}



.notification-error .notification-icon {

    color: var(--danger);

}



.notification-warning {

    border-left: 4px solid var(--warning);

}



.notification-warning .notification-icon {

    color: var(--warning);

}



.notification-info {

    border-left: 4px solid var(--info);

}



.notification-info .notification-icon {

    color: var(--info);

}



/* Sistema de Grid */

.row {

    display: flex;

    flex-wrap: wrap;

    margin-right: -15px;

    margin-left: -15px;

}



.col-md-3,

.col-md-4 {

    flex: 0 0 calc(33.333% - 30px);

    max-width: calc(33.333% - 30px);

    padding: 0 15px;

}



.col-md-6 {

    flex: 0 0 calc(50% - 30px);

    max-width: calc(50% - 30px);

    padding: 0 15px;

}



.col-md-8 {

    flex: 0 0 calc(66.667% - 30px);

    max-width: calc(66.667% - 30px);

    padding: 0 15px;

}



.col-md-12 {

    flex: 0 0 calc(100% - 30px);

    max-width: calc(100% - 30px);

    padding: 0 15px;

}



@media (max-width: 768px) {

    .col-md-3,

    .col-md-4,

    .col-md-6,

    .col-md-8,

    .col-md-12 {

        flex: 0 0 100%;

        max-width: 100%;

    }

}



/* Paginação */

.pagination-info,

.pagination-controls {

    text-align: center;

    margin: 5px;

}



#pagination-current {

    margin: 15px;

}



/* Login Específico */

.login-container {

    display: flex;

    justify-content: center;

    align-items: center;

    min-height: 100vh;

}



.login-box {

    background-color: white;

    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-lg);

    width: 100%;

    max-width: 400px;

    padding: var(--space-xl);

}



.login-logo {

    text-align: center;

    margin-bottom: var(--space-xl);

}



.login-title {

    text-align: center;

    margin-bottom: var(--space-xl);

}



.login-form .form-group {

    margin-bottom: var(--space-lg);

}



.login-footer {

    text-align: center;

    margin-top: var(--space-xl);

    font-size: 13px;

    color: var(--text-muted);

}



/* Botões adicionais */

.btn-group {

    display: flex;

    gap: var(--space-sm);

}



.btn-with-icon {

    display: inline-flex;

    align-items: center;

    gap: 8px;

}



.btn-with-icon i,

.btn-with-icon svg {

    width: 18px;

    height: 18px;

}



.btn-block {

    width: 100%;

    display: flex;

}



.action-btn {

    padding: 6px 12px;

    font-size: 13px;

    border-radius: var(--radius-sm);

    border: 1px solid var(--border-light);

    background: white;

    color: var(--text-primary);

    cursor: pointer;

    transition: all 0.2s ease;

}



.action-btn:hover {

    background: var(--gray-50);

    border-color: var(--primary);

    color: var(--primary);

}



/* Modal Specific */

.modal-footer {

    padding: var(--space-md);

    border-top: 1px solid var(--border-light);

    display: flex;

    justify-content: flex-end;

    gap: var(--space-sm);

}

