:root {
    --fgu-blue:   #1a3a6b;
    --fgu-blue2:  #2c5fab;
    --fgu-gold:   #c9a227;
    --fgu-gold2:  #e6bb33;
    --fgu-bg:     #f0f4f8;
    --fgu-card:   #ffffff;
    --fgu-text:   #2d2d2d;
    --fgu-muted:  #6c757d;
    --fgu-radius: 10px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: var(--fgu-bg);
    color: var(--fgu-text);
    min-height: 100vh;
    margin: 0;
}

/* ── Navbar ──────────────────────────────────────────────── */
.fgu-navbar {
    background: linear-gradient(135deg, var(--fgu-blue), var(--fgu-blue2));
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    box-shadow: 0 2px 10px rgba(0,0,0,.25);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.fgu-navbar .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 17px;
    letter-spacing: .3px;
}

.fgu-navbar .brand img { height: 36px; border-radius: 4px; }

.fgu-navbar .nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.fgu-navbar .nav-links a {
    color: rgba(255,255,255,.85);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 14px;
    transition: background .2s;
}

.fgu-navbar .nav-links a:hover { background: rgba(255,255,255,.15); color: #fff; }

.fgu-navbar .nav-links a.active { background: rgba(255,255,255,.2); color: #fff; }

/* ── Main container ──────────────────────────────────────── */
.fgu-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* ── Auth pages ──────────────────────────────────────────── */
.fgu-auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d2147 0%, #1a3a6b 50%, #2c5fab 100%);
    padding: 20px;
}

.fgu-auth-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    width: 100%;
    max-width: 520px;
    overflow: hidden;
}

.fgu-auth-header {
    background: linear-gradient(135deg, var(--fgu-blue), var(--fgu-blue2));
    padding: 30px 32px 24px;
    text-align: center;
    color: #fff;
}

.fgu-auth-header img { height: 60px; border-radius: 8px; margin-bottom: 14px; }
.fgu-auth-header h2 { margin: 0 0 4px; font-size: 22px; }
.fgu-auth-header p  { margin: 0; opacity: .8; font-size: 13px; }

.fgu-auth-body { padding: 30px 32px; }

/* ── Tabs ────────────────────────────────────────────────── */
.fgu-tabs {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 24px;
}

.fgu-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    color: var(--fgu-muted);
    font-weight: 600;
    font-size: 14px;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all .2s;
}

.fgu-tab.active { color: var(--fgu-blue); border-bottom-color: var(--fgu-gold); }
.fgu-tab:hover:not(.active) { color: var(--fgu-blue2); }

.fgu-tab-panel { display: none; }
.fgu-tab-panel.active { display: block; }

/* ── Form controls ───────────────────────────────────────── */
.fgu-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--fgu-blue);
    margin-bottom: 5px;
}

.fgu-label .req { color: #dc3545; }

.fgu-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #dee2e6;
    border-radius: 7px;
    font-size: 14px;
    color: var(--fgu-text);
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}

.fgu-input:focus {
    border-color: var(--fgu-blue2);
    box-shadow: 0 0 0 3px rgba(44,95,171,.15);
}

.fgu-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231a3a6b' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

.fgu-form-group { margin-bottom: 18px; }

.fgu-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) { .fgu-form-row { grid-template-columns: 1fr; } }

/* ── Buttons ─────────────────────────────────────────────── */
.fgu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 22px;
    border: none;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all .2s;
}

.fgu-btn-primary {
    background: var(--fgu-blue);
    color: #fff;
}

.fgu-btn-primary:hover { background: var(--fgu-blue2); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(26,58,107,.3); }

.fgu-btn-gold {
    background: var(--fgu-gold);
    color: #fff;
}

.fgu-btn-gold:hover { background: var(--fgu-gold2); color: #fff; transform: translateY(-1px); }

.fgu-btn-outline {
    background: transparent;
    border: 1.5px solid var(--fgu-blue);
    color: var(--fgu-blue);
}

.fgu-btn-outline:hover { background: var(--fgu-blue); color: #fff; }

.fgu-btn-sm { padding: 6px 14px; font-size: 12px; }

.fgu-btn-danger { background: #dc3545; color: #fff; }
.fgu-btn-danger:hover { background: #c82333; color: #fff; }

.fgu-btn-success { background: #28a745; color: #fff; }
.fgu-btn-success:hover { background: #218838; color: #fff; }

.fgu-btn-block { width: 100%; }

/* ── Cards ───────────────────────────────────────────────── */
.fgu-card {
    background: var(--fgu-card);
    border-radius: var(--fgu-radius);
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    overflow: hidden;
    margin-bottom: 20px;
}

.fgu-card-header {
    background: linear-gradient(135deg, var(--fgu-blue), var(--fgu-blue2));
    color: #fff;
    padding: 16px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fgu-card-header h3 { margin: 0; font-size: 17px; }

.fgu-card-body { padding: 22px; }

/* ── Program cards ───────────────────────────────────────── */
.prog-card {
    border: 1.5px solid #e9ecef;
    border-radius: var(--fgu-radius);
    padding: 18px;
    margin-bottom: 14px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    transition: border-color .2s, box-shadow .2s;
}

.prog-card:hover { border-color: var(--fgu-blue2); box-shadow: 0 2px 8px rgba(44,95,171,.1); }

.prog-card .prog-info h4 { margin: 0 0 4px; color: var(--fgu-blue); font-size: 15px; }
.prog-card .prog-info p  { margin: 0; font-size: 12px; color: var(--fgu-muted); }

.prog-card .prog-meta { text-align: right; min-width: 160px; }

/* ── Badges / status ─────────────────────────────────────── */
.fgu-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
}

.fgu-badge-success  { background: #d4edda; color: #155724; }
.fgu-badge-warning  { background: #fff3cd; color: #856404; }
.fgu-badge-danger   { background: #f8d7da; color: #721c24; }
.fgu-badge-secondary{ background: #e2e3e5; color: #383d41; }
.fgu-badge-info     { background: #d1ecf1; color: #0c5460; }

/* ── Tables ──────────────────────────────────────────────── */
.fgu-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.fgu-table th {
    background: var(--fgu-blue);
    color: #fff;
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.fgu-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.fgu-table tr:hover td { background: #f8f9fa; }

.fgu-table tr:last-child td { border-bottom: none; }

/* ── Alerts ──────────────────────────────────────────────── */
.fgu-alert {
    padding: 12px 16px;
    border-radius: 7px;
    margin-bottom: 16px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.fgu-alert-success { background: #d4edda; color: #155724; border-left: 4px solid #28a745; }
.fgu-alert-error   { background: #f8d7da; color: #721c24; border-left: 4px solid #dc3545; }
.fgu-alert-info    { background: #d1ecf1; color: #0c5460; border-left: 4px solid #17a2b8; }
.fgu-alert-warning { background: #fff3cd; color: #856404; border-left: 4px solid #ffc107; }

/* ── File upload zone ────────────────────────────────────── */
.fgu-upload-zone {
    border: 2px dashed #ced4da;
    border-radius: var(--fgu-radius);
    padding: 28px;
    text-align: center;
    color: var(--fgu-muted);
    transition: all .2s;
    cursor: pointer;
    position: relative;
}

.fgu-upload-zone:hover, .fgu-upload-zone.drag { border-color: var(--fgu-blue2); background: rgba(44,95,171,.03); }

.fgu-upload-zone input[type=file] {
    position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}

.fgu-upload-zone .upload-icon { font-size: 36px; margin-bottom: 8px; }
.fgu-upload-zone p { margin: 4px 0 0; font-size: 13px; }

/* ── Modal ───────────────────────────────────────────────── */
.fgu-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s;
}

.fgu-modal-overlay.open { opacity: 1; visibility: visible; }

.fgu-modal {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 720px;
    max-height: 85vh;
    overflow: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
    transform: translateY(-20px);
    transition: transform .25s;
}

.fgu-modal-overlay.open .fgu-modal { transform: translateY(0); }

.fgu-modal-header {
    background: linear-gradient(135deg, var(--fgu-blue), var(--fgu-blue2));
    color: #fff;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
}

.fgu-modal-header h4 { margin: 0; font-size: 17px; }

.fgu-modal-close {
    background: rgba(255,255,255,.2);
    border: none;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}

.fgu-modal-close:hover { background: rgba(255,255,255,.35); }

.fgu-modal-body { padding: 24px; }

/* ── Dashboard hero ──────────────────────────────────────── */
.fgu-hero {
    background: linear-gradient(135deg, var(--fgu-blue), var(--fgu-blue2));
    color: #fff;
    border-radius: var(--fgu-radius);
    padding: 28px 30px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.fgu-hero h2 { margin: 0 0 4px; font-size: 22px; }
.fgu-hero p  { margin: 0; opacity: .85; font-size: 14px; }

/* ── Misc ────────────────────────────────────────────────── */
.text-muted  { color: var(--fgu-muted); font-size: 13px; }
.text-center { text-align: center; }
.mt-1  { margin-top: 6px; }
.mt-2  { margin-top: 12px; }
.mt-3  { margin-top: 18px; }
.mt-4  { margin-top: 24px; }
.mb-0  { margin-bottom: 0; }
.mb-2  { margin-bottom: 12px; }
.mb-3  { margin-bottom: 18px; }
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 10px; }
.gap-3 { gap: 16px; }
.fw-bold { font-weight: 700; }
.fs-sm { font-size: 13px; }
.clickable-row { cursor: pointer; }
.clickable-row:hover td { background: #e8f0ff !important; }

.page-title {
    font-size: 22px;
    color: var(--fgu-blue);
    font-weight: 700;
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--fgu-gold);
    display: inline-block;
}

.prog-item {
    border: 1.5px solid #e0e7f0;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 12px;
}

.prog-item.expired  { border-color: #f8d7da; background: #fff8f8; }
.prog-item.active   { border-color: #d4edda; background: #f8fff9; }
.prog-item.pending  { border-color: #fff3cd; background: #fffdf0; }

.prog-dates { font-size: 12px; color: var(--fgu-muted); margin-top: 4px; }

.doc-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--fgu-blue2);
    font-size: 12px;
    text-decoration: none;
    border: 1px solid #d0daf0;
    padding: 3px 10px;
    border-radius: 4px;
    margin: 3px;
    transition: background .2s;
}

.doc-link:hover { background: #e8f0ff; }

#file-list { margin-top: 10px; }
#file-list .file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 4px;
    font-size: 13px;
}

.file-item .remove-file { cursor: pointer; color: #dc3545; margin-left: auto; }

/* ── Admin sidebar ───────────────────────────────────────── */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 60px);
}

.admin-sidebar {
    width: 220px;
    background: var(--fgu-blue);
    padding: 20px 0;
    flex-shrink: 0;
}

.admin-sidebar .sidebar-title {
    color: rgba(255,255,255,.5);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 20px 10px;
    font-weight: 700;
}

.admin-sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,.8);
    text-decoration: none;
    padding: 11px 20px;
    font-size: 14px;
    transition: all .2s;
    border-left: 3px solid transparent;
}

.admin-sidebar a:hover { background: rgba(255,255,255,.1); color: #fff; }
.admin-sidebar a.active { background: rgba(255,255,255,.15); color: #fff; border-left-color: var(--fgu-gold); }

.admin-main {
    flex: 1;
    padding: 28px;
    overflow: auto;
}

@media (max-width: 768px) {
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; }
    .fgu-form-row { grid-template-columns: 1fr; }
}

/* ── Search input ────────────────────────────────────────── */
.fgu-search {
    position: relative;
}

.fgu-search input {
    padding-left: 38px;
}

.fgu-search::before {
    content: '🔍';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    pointer-events: none;
}

/* ── Password toggle ─────────────────────────────────────── */
.pass-wrap { position: relative; }
.pass-wrap .fgu-input { padding-right: 44px; }
.pass-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--fgu-muted);
    padding: 0;
}
