/* venostra-frontend/assets/css/style.css */
/* Identidade Visual Venostra — ver directives/identidade_visual_venostra.md */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;900&display=swap');

:root {
    /* === Cores Oficiais Venostra === */
    --primary-color:   #056307; /* Esmeralda */
    --accent-color:    #FF6D1F; /* Ardor */
    --danger-color:    #CE0000; /* Pimenta */
    --dark-color:      #162114; /* Sacramento */
    --onix-color:      #18181A; /* Ônix */

    /* === UI Base === */
    --bg-color:        #F5F0E8; /* Brisa */
    --sidebar-bg:      #FFFFFF;
    --text-color:      #162114; /* Sacramento */
    --text-muted:      #6b7280;

    /* === Glassmorphism (light) === */
    --glass-bg:        rgba(255, 255, 255, 0.9);
    --glass-border:    rgba(22, 33, 20, 0.08);
    --glass-shadow:    0 4px 24px rgba(22, 33, 20, 0.06);

    /* === Legado (manter compatibilidade) === */
    --rose:            #CE0000;
    --emerald:         #056307;
    --violet:          #7C3AED;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
}

body.login-dark {
    background: radial-gradient(circle at top right, #0F172A 0%, #020617 100%);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 50px 40px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.auth-card input:focus {
    border-color: var(--primary-color);
    background: rgba(255,255,255,0.05);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: var(--text-color);
    font-weight: 600;
}

.glass:hover {
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.08);
}

.primary-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

button.primary, a.button.primary {
    background: var(--primary-color);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(5, 99, 7, 0.2);
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
button.secondary, a.button.secondary { background: #FFFFFF; border: 1px solid var(--glass-border); color: var(--text-color); }
button.glass { background: rgba(255, 255, 255, 0.7); border: 1px solid var(--glass-border); color: var(--text-color); }
button:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08); cursor: pointer; }

button.primary:hover {
    background: #044d05;
    box-shadow: 0 6px 20px rgba(5, 99, 7, 0.35);
}

.reveal {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Auth Layout */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 40px;
}

.auth-card h2 {
    font-size: 2rem;
    margin-bottom: 24px;
    text-align: center;
}

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; color: var(--text-muted); font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; }
input[type="text"], input[type="number"], input[type="email"], input[type="password"], input[type="date"], select, textarea {
    width: 100%;
    padding: 12px 16px;
    background: #FFFFFF;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-color);
    font-size: 0.95rem;
    transition: all 0.2s;
    outline: none;
    font-weight: 500;
}
input[type="file"].glass-input {
    background: rgba(255, 255, 255, 0.5);
}
input::placeholder { color: #94A3B8; opacity: 0.6; }
input:focus, select:focus, textarea:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(5, 99, 7, 0.1); }

/* Premium Photo Upload */
.photo-upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.02);
    border: 2px dashed var(--glass-border);
    border-radius: 20px;
    transition: all 0.3s;
    margin-bottom: 20px;
}
.photo-upload-container:hover {
    border-color: var(--primary-color);
    background: rgba(16, 185, 129, 0.05);
}
.photo-preview-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #FFFFFF;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
}
.file-input-wrapper input[type=file] {
    font-size: 100px;
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    cursor: pointer;
}

.btn-delete-sm { 
    padding: 10px 18px; 
    font-size: 0.82rem; 
    border: 1px solid rgba(244, 63, 94, 0.3); 
    color: var(--rose); 
    background: rgba(244, 63, 94, 0.05); 
    border-radius: 12px; 
    cursor: pointer; 
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-delete-sm:hover {
    background: var(--rose);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -5px rgba(244, 63, 94, 0.4);
    border-color: var(--rose);
}
.btn-delete-sm i { font-size: 0.9rem; }

tr.clickable { cursor: pointer; transition: background 0.2s; }
tr.clickable:hover td { background: rgba(0, 0, 0, 0.03) !important; }

/* Global Dashboard Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    min-width: 260px;
    height: 100vh;
    padding: 30px 20px;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    border-radius: 0;
    border-right: 1px solid var(--glass-border);
    background: var(--sidebar-bg);
}

.sidebar.collapsed {
    width: 85px;
    min-width: 85px;
    padding: 30px 10px;
}

#sidebar-logo {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

#sidebar-logo:hover {
    transform: scale(1.05) rotate(2deg);
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.15));
}

.sidebar.collapsed #sidebar-logo {
    opacity: 0;
    pointer-events: none;
}

.sidebar nav ul {
    list-style: none;
}

.sidebar nav ul li {
    margin-bottom: 8px;
}

.sidebar nav ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
    transition: all 0.2s;
    white-space: nowrap;
}

.sidebar.collapsed nav ul li a {
    padding: 12px;
    justify-content: center;
    gap: 0;
}

.sidebar.collapsed nav ul li a i {
    font-size: 1.2rem;
    margin: 0;
}

.sidebar nav ul li a .menu-label {
    transition: opacity 0.3s, transform 0.3s;
}

.sidebar.collapsed nav ul li a .menu-label {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    transform: translateX(20px);
}

.sidebar nav ul li a:hover {
    background: rgba(5, 99, 7, 0.06);
    color: var(--primary-color);
    transform: translateX(4px);
}

.sidebar nav ul li a.active {
    background: rgba(5, 99, 7, 0.08);
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
    border-radius: 4px 12px 12px 4px;
    font-weight: 700;
}

.sidebar nav ul li a.active i {
    color: var(--primary-color);
}

.sidebar.collapsed nav ul li a:hover {
    transform: scale(1.1);
}

/* Content Area */
.main-content {
    flex: 1;
    padding: 40px;
    min-width: 0; 
}

.sidebar.collapsed ~ .main-content {
    width: auto;
}

/* Right Sidebar Removida */
.right-sidebar { display: none; }

/* Widgets & Cards Content */
.widget-card strong, 
.activity-card strong,
.glass strong {
    color: var(--text-color);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

/* Fix for dark-themed components in light mode */
.select-styled {
    background: #FFFFFF !important;
    color: var(--text-color) !important;
}

.search-box {
    background: #FFFFFF !important;
    color: var(--text-color) !important;
}

/* Widgets */
.widget-card {
    padding: 20px;
    margin-bottom: 20px;
}

.widget-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Standard Table Styles */
.mat-table, .data-table, .standard-table { 
    width: 100%; 
    border-collapse: separate; 
    border-spacing: 0 8px; 
}
.mat-table th, .data-table th, .standard-table th { 
    text-align: left; 
    padding: 12px 18px; 
    color: #64748B; 
    font-size: 0.8rem; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
}
.mat-table td, .data-table td, .standard-table td { 
    padding: 16px 18px; 
    background: #FFFFFF; 
    color: var(--text-color); 
    font-size: 0.95rem; 
    border-bottom: 1px solid var(--glass-border); 
}
.mat-table tr td:first-child, .data-table tr td:first-child, .standard-table tr td:first-child { border-radius: 12px 0 0 12px; }
.mat-table tr td:last-child, .data-table tr td:last-child, .standard-table tr td:last-child { border-radius: 0 12px 12px 0; }
.mat-table tbody tr, .data-table tbody tr, .standard-table tbody tr { transition: background 0.2s; }
.mat-table tbody tr:hover td, .data-table tbody tr:hover td, .standard-table tbody tr:hover td { background: rgba(0, 0, 0, 0.02); }

/* Toolbar */
.toolbar { display: flex; gap: 15px; margin-bottom: 30px; flex-wrap: wrap; align-items: center; }
.search-box { flex: 1; min-width: 250px; padding: 12px 20px; background: #FFFFFF; border: 1px solid var(--glass-border); border-radius: 12px; color: var(--text-color); font-size: 0.95rem; }
.filter-tabs { display: flex; gap: 8px; }
.filter-tab { padding: 8px 18px; border-radius: 20px; border: 1px solid var(--glass-border); background: transparent; color: #6b7280; cursor: pointer; font-size: 0.85rem; font-weight: 600; transition: all 0.3s; }
.filter-tab.active { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.filter-tab .count { background: rgba(255,255,255,0.25); padding: 2px 8px; border-radius: 10px; margin-left: 5px; font-size: 0.75rem; }

/* Status Pills */
.status-pill { font-size: 0.75rem; padding: 4px 12px; border-radius: 20px; text-transform: uppercase; font-weight: 800; display: inline-block; }
.status-pill.ativa, .status-pill.pago { background: rgba(5, 99, 7, 0.12); color: #056307; }
.status-pill.vencida, .status-pill.atrasado { background: rgba(206, 0, 0, 0.1); color: #CE0000; }
.status-pill.pendente { background: rgba(255, 109, 31, 0.12); color: #FF6D1F; }

/* Animations */
@keyframes revealUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.reveal {
    animation: revealUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }

/* Toggle Button */
.sidebar-toggle {
    width: 100%;
    height: 36px;
    background: var(--primary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 20px -5px rgba(5, 99, 7, 0.25);
    z-index: 1001;
    color: #fff;
    font-size: 0.75rem;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sidebar-toggle:hover {
    transform: scale(1.1);
    background: #044d05;
}

.sidebar.collapsed .sidebar-toggle {
    transform: rotate(180deg) scale(1);
}

/* Sidebar Footer */
.sidebar-footer {
    border-top: 1px solid var(--glass-border);
    padding-top: 20px;
}

.sidebar.collapsed .user-info-text, 
.sidebar.collapsed .logout-text,
.sidebar.collapsed .sidebar-toggle .menu-label {
    display: none;
}

.sidebar .logout-link {
    color: #EF4444;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    transition: background 0.2s;
}

.sidebar.collapsed .logout-link {
    justify-content: center;
    padding: 12px;
}

.sidebar .logout-link:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Alunos Grid Layout */
.alunos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 10px;
}

.aluno-card {
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.aluno-card:hover {
    transform: translateY(-8px);
    background: #FFFFFF;
    border-color: var(--primary-color);
}

.aluno-photo-wrapper {
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
    position: relative;
}

.aluno-card-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #FFFFFF;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.status-indicator {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 3px solid #FFFFFF;
}

.status-indicator.ativo { background-color: var(--primary-color); }
.status-indicator.inativo { background-color: var(--danger-color); }
.status-indicator.inadimplente { background-color: var(--accent-color); }

.aluno-info h3 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 5px;
    color: var(--text-color);
}

.plano-name {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.category-pill {
    font-size: 0.7rem;
    background: rgba(5, 99, 7, 0.1);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Modal Styling Global */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(255, 255, 255, 0.98); /* Less transparent for better readability */
    margin: 5% auto; /* Reduced margin for better fit on screens */
    padding: 30px;
    border: 1px solid var(--glass-border);
    width: 95%;
    max-width: 600px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 2001; /* Higher than modal overlay */
    animation: modalFadeIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Tooltip Premium Styles */
.info-tooltip {
    position: absolute;
    bottom: 12px;
    right: 12px;
    cursor: help;
    z-index: 10;
}

.info-tooltip i {
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.2;
    transition: all 0.3s ease;
}

.info-tooltip:hover i {
    opacity: 0.6;
    color: var(--primary-color);
    transform: scale(1.2);
}

.tooltip-text {
    visibility: hidden;
    width: 220px;
    background: rgba(15, 23, 42, 0.95);
    color: #fff;
    text-align: left;
    border-radius: 12px;
    padding: 12px;
    position: absolute;
    z-index: 100;
    bottom: 140%;
    right: -10px; /* Alinha com a direita do ícone */
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.5;
    pointer-events: none;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.info-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

/* Triangle for tooltip - pointing to the right corner */
.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 20px;
    border-width: 6px;
    border-style: solid;
    border-color: rgba(15, 23, 42, 0.95) transparent transparent transparent;
}
