/* ═══════════════════════════════════════════════
   Gestão de Aulas — Design System Moderno
   Academia Fernandinho Beltrão
═══════════════════════════════════════════════ */

:root {
    --brand:        #4f46e5;
    --brand-dark:   #3730a3;
    --brand-light:  #ede9fe;
    --brand-soft:   #f5f3ff;
    --success:      #059669;
    --success-soft: #d1fae5;
    --danger:       #dc2626;
    --danger-soft:  #fee2e2;
    --warn:         #d97706;
    --warn-soft:    #fef3c7;
    --text-1:       #0f172a;
    --text-2:       #475569;
    --text-3:       #94a3b8;
    --border:       #e2e8f0;
    --surface:      #ffffff;
    --bg:           #f8fafc;
    --bg2:          #f1f5f9;
    --radius:       12px;
    --radius-sm:    8px;
    --shadow-sm:    0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow:       0 4px 12px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.04);
    --shadow-lg:    0 10px 30px rgba(0,0,0,.10), 0 4px 10px rgba(0,0,0,.05);
}

/* ── reset / base ── */
*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 14px;
    color: var(--text-1);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

/* ── LOGIN ── */
.g-login-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4338ca 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}
.g-login-card {
    width: 440px;
    max-width: 100%;
    background: var(--surface);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.g-login-top {
    background: linear-gradient(135deg, #312e81, #4f46e5);
    padding: 36px 40px 28px;
    text-align: center;
    color: #fff;
}
.g-login-top img  { max-width: 130px; margin-bottom: 14px; }
.g-login-top h2   { font-size: 1rem; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; opacity: .9; margin: 0; }
.g-login-top p    { font-size: .82rem; opacity: .65; margin: 4px 0 0; }
.g-login-body-form { padding: 32px 40px 36px; }
.g-login-body-form h3 { font-size: 1.25rem; font-weight: 700; color: var(--text-1); margin: 0 0 4px; }
.g-login-body-form .sub { font-size: .85rem; color: var(--text-2); margin: 0 0 24px; }
.g-field label { display: block; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-2); margin-bottom: 6px; }
.g-field { margin-bottom: 16px; }
.g-input {
    width: 100%; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    padding: 10px 14px; font-size: .93rem; color: var(--text-1); background: var(--surface);
    transition: border-color .18s, box-shadow .18s; outline: none;
}
.g-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
.g-btn-login {
    width: 100%; background: var(--brand); color: #fff; border: none; border-radius: var(--radius-sm);
    padding: 11px; font-size: .93rem; font-weight: 600; letter-spacing: .3px;
    cursor: pointer; transition: background .18s, transform .12s, box-shadow .18s;
    box-shadow: 0 4px 12px rgba(79,70,229,.35);
}
.g-btn-login:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(79,70,229,.4); }
.g-login-alert {
    background: var(--danger-soft); border: 1px solid #fca5a5; color: var(--danger);
    border-radius: var(--radius-sm); padding: 10px 14px; font-size: .85rem; margin-bottom: 18px;
}

/* ── NAVBAR ── */
.g-nav {
    position: sticky; top: 0; z-index: 100;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 0 28px;
    display: flex; align-items: center; height: 58px; gap: 8px;
}
.g-nav-brand {
    display: flex; align-items: center; gap: 10px; text-decoration: none;
    margin-right: 24px; flex-shrink: 0;
}
.g-nav-brand img { height: 32px; }
.g-nav-brand-text { line-height: 1.2; }
.g-nav-brand-text strong { display: block; font-size: .88rem; font-weight: 700; color: var(--text-1); }
.g-nav-brand-text span   { display: block; font-size: .72rem; color: var(--text-3); }
.g-nav-links { display: flex; align-items: center; gap: 2px; flex: 1; }
.g-nav-link {
    display: flex; align-items: center; gap: 6px; padding: 6px 12px;
    border-radius: var(--radius-sm); font-size: .84rem; font-weight: 500; color: var(--text-2);
    text-decoration: none; transition: background .15s, color .15s; white-space: nowrap;
}
.g-nav-link:hover  { background: var(--bg2); color: var(--text-1); text-decoration: none; }
.g-nav-link.active { background: var(--brand-light); color: var(--brand); }
.g-nav-link i      { font-size: .85rem; }
.g-nav-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.g-nav-user  { font-size: .82rem; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.g-nav-user .avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--brand-light); color: var(--brand);
    display: flex; align-items: center; justify-content: center;
    font-size: .78rem; font-weight: 700;
}
.g-btn-sair {
    background: none; border: 1.5px solid var(--border); color: var(--text-2);
    border-radius: var(--radius-sm); padding: 5px 12px; font-size: .82rem; font-weight: 600;
    cursor: pointer; transition: .15s; text-decoration: none; display: inline-flex; align-items: center; gap: 5px;
}
.g-btn-sair:hover { border-color: var(--danger); color: var(--danger); text-decoration: none; }

/* mobile nav toggle */
.g-nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
@media(max-width: 768px) {
    .g-nav { flex-wrap: wrap; height: auto; padding: 10px 16px; }
    .g-nav-toggle { display: flex; margin-left: auto; }
    .g-nav-links, .g-nav-right { display: none; width: 100%; }
    .g-nav.open .g-nav-links  { display: flex; flex-direction: column; align-items: flex-start; padding: 8px 0; }
    .g-nav.open .g-nav-right  { display: flex; padding: 8px 0 4px; border-top: 1px solid var(--border); }
}

/* ── LAYOUT ── */
.g-wrap { max-width: 1480px; margin: 0 auto; padding: 24px 24px 48px; }
.g-wrap-wide { max-width: none !important; width: 100% !important; margin: 0 !important; padding: 10px 4px 30px !important; }

/* ── CARD ── */
.g-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 18px;
    overflow: hidden;
}
.g-card-header {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}
.g-card-header h5, .g-card-header h6 {
    margin: 0; font-weight: 700; font-size: .92rem; color: var(--text-1);
    display: flex; align-items: center; gap: 8px;
}
.g-card-header h5 i, .g-card-header h6 i { color: var(--brand); font-size: .88rem; }
.g-card-body { padding: 20px; }
.g-card-body.p0 { padding: 0; }

/* ── PAGE TITLE ── */
.g-page-title { margin: 0 0 20px; }
.g-page-title h4 { font-size: 1.15rem; font-weight: 700; color: var(--text-1); margin: 0 0 3px; }
.g-page-title p  { font-size: .83rem; color: var(--text-2); margin: 0; }

/* ── BADGES ── */
.g-badge {
    display: inline-flex; align-items: center; padding: 2px 9px;
    border-radius: 999px; font-size: .74rem; font-weight: 600; letter-spacing: .2px;
}
.g-badge-brand   { background: var(--brand-light);   color: var(--brand); }
.g-badge-success { background: var(--success-soft);  color: var(--success); }
.g-badge-gray    { background: var(--bg2);            color: var(--text-2); }
.g-badge-warn    { background: var(--warn-soft);      color: var(--warn); }
.g-badge-danger  { background: var(--danger-soft);    color: var(--danger); }

/* ── BUTTONS ── */
.g-btn {
    display: inline-flex; align-items: center; gap: 6px;
    border-radius: var(--radius-sm); padding: 7px 14px;
    font-size: .84rem; font-weight: 600; border: none; cursor: pointer;
    transition: .15s; text-decoration: none; white-space: nowrap;
}
.g-btn:hover { text-decoration: none; }
.g-btn-sm { padding: 5px 10px; font-size: .78rem; }
.g-btn-primary { background: var(--brand);   color: #fff; box-shadow: 0 2px 6px rgba(79,70,229,.3); }
.g-btn-primary:hover { background: var(--brand-dark); color: #fff; }
.g-btn-success { background: var(--success); color: #fff; box-shadow: 0 2px 6px rgba(5,150,105,.25); }
.g-btn-success:hover { background: #047857; color: #fff; }
.g-btn-danger  { background: var(--danger);  color: #fff; }
.g-btn-danger:hover  { background: #b91c1c;  color: #fff; }
.g-btn-ghost   { background: transparent; border: 1.5px solid var(--border); color: var(--text-2); }
.g-btn-ghost:hover { border-color: var(--text-2); color: var(--text-1); background: var(--bg2); }
.g-btn-icon    { background: transparent; border: 1.5px solid var(--border); color: var(--text-2); padding: 5px 8px; }
.g-btn-icon:hover { background: var(--bg2); }

/* ── FORMS ── */
.g-form-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; }
.g-form-col { flex: 1; min-width: 160px; }
.g-form-col label { display: block; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; color: var(--text-2); margin-bottom: 5px; }
.g-ctrl {
    width: 100%; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    padding: 8px 11px; font-size: .88rem; color: var(--text-1); background: var(--surface);
    transition: border-color .18s, box-shadow .18s; outline: none;
}
.g-ctrl:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79,70,229,.10); }
.g-ctrl-sm { padding: 5px 8px; font-size: .82rem; height: 30px; }
select.g-ctrl, select.g-ctrl-sm { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }

/* ── ALERTS ── */
.g-alert {
    border-radius: var(--radius-sm); padding: 12px 16px; font-size: .87rem;
    display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
    border-left: 4px solid transparent;
}
.g-alert-success { background: var(--success-soft); border-color: var(--success); color: #065f46; }
.g-alert-danger  { background: var(--danger-soft);  border-color: var(--danger);  color: #991b1b; }
.g-alert-warn    { background: var(--warn-soft);    border-color: var(--warn);    color: #92400e; }
.g-alert-info    { background: var(--brand-soft);   border-color: var(--brand);   color: #3730a3; }
.g-alert-close   { margin-left: auto; background: none; border: none; cursor: pointer; color: inherit; opacity: .6; font-size: 1rem; padding: 0; }

/* ── TABLE ── */
.g-table-wrap { overflow-x: auto; }
.g-table { width: 100%; border-collapse: collapse; font-size: .83rem; }
.g-table thead th {
    background: var(--bg2); color: var(--text-2);
    font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
    padding: 9px 10px; border-bottom: 1px solid var(--border); white-space: nowrap;
    position: sticky; top: 0; z-index: 1;
}
.g-table tbody tr { border-bottom: 1px solid var(--border); }
.g-table tbody tr:last-child { border-bottom: none; }
.g-table tbody tr:hover { background: var(--bg); }
.g-table td { padding: 7px 10px; vertical-align: middle; color: var(--text-1); }
.g-table td .g-ctrl-sm { border-color: transparent; background: transparent; }
.g-table td .g-ctrl-sm:hover { border-color: var(--border); background: var(--surface); }
.g-table td .g-ctrl-sm:focus { border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 3px rgba(79,70,229,.10); }

/* ── SSA 2026 ── */
.ssa-link-input { min-width: 260px; }
.ssa-link2-input { min-width: 380px; }
.ssa-desc-input { min-width: 420px; }

/* ── COLLAPSE ── */
.g-collapse { display: none; }
.g-collapse.open { display: block; }

/* ── MASTER INFO BAR ── */
.g-master-bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
    background: var(--brand-soft); border: 1px solid var(--brand-light);
    border-radius: var(--radius-sm); padding: 10px 16px; margin-top: 12px;
    font-size: .85rem;
}
.g-master-bar strong { color: var(--brand-dark); font-weight: 700; }
.g-master-bar span   { color: var(--text-2); display: flex; align-items: center; gap: 5px; }

/* ── DASHBOARD CARDS ── */
.g-dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.g-dash-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px; text-decoration: none; color: var(--text-1);
    transition: box-shadow .2s, transform .2s, border-color .2s;
    display: block;
}
.g-dash-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: var(--brand-light); text-decoration: none; color: var(--text-1); }
.g-dash-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; margin-bottom: 14px; }
.g-dash-icon.brand   { background: var(--brand-light);  color: var(--brand); }
.g-dash-icon.success { background: var(--success-soft); color: var(--success); }
.g-dash-card h5 { font-size: .95rem; font-weight: 700; margin: 0 0 5px; }
.g-dash-card p  { font-size: .82rem; color: var(--text-2); margin: 0; }

/* ── UTILS ── */
.flex-center { display: flex; align-items: center; }
.gap-6  { gap: 6px; }
.gap-10 { gap: 10px; }
.text-muted2 { color: var(--text-2); }
.text-muted3 { color: var(--text-3); }
.w-link { min-width: 155px; }
.w-tema { min-width: 175px; }
.w-txt  { min-width: 100px; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }
