:root {
    --primary: #1237d7;
    --primary-dark: #061f8f;
    --primary-soft: #eaf2ff;
    --accent: #5ca9f5;
    --text-dark: #07154a;
    --muted: #6b7280;
    --border: #dce6f8;
    --white: #ffffff;
    --bg: #f5f8ff;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--bg);
    color: var(--text-dark);
}

/* LOGIN PAGE */
.login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, #dbeafe 0, transparent 35%),
        linear-gradient(135deg, #ffffff 0%, #eff6ff 45%, #dbeafe 100%);
}

.login-wrapper {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
}

.login-left {
    position: relative;
    padding: 42px 60px;
    overflow: hidden;
}

.login-left::after {
    content: "";
    position: absolute;
    bottom: -140px;
    left: -80px;
    width: 110%;
    height: 280px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    border-radius: 60% 60% 0 0;
    z-index: 0;
}

.brand-box {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 2;
}

.brand-logo {
    width: 78px;
    height: 78px;
    object-fit: contain;
}

.brand-box h4 {
    margin: 0;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1.1;
}

.brand-box p {
    margin: 4px 0 0;
    color: var(--primary);
    font-weight: 600;
}

.hero-content {
    position: relative;
    z-index: 2;
    margin-top: 90px;
    max-width: 700px;
}

.hero-badge {
    display: inline-block;
    background: #dcecff;
    color: var(--primary);
    font-weight: 800;
    padding: 10px 24px;
    border-radius: 999px;
    font-size: 14px;
    margin-bottom: 20px;
}

.hero-content h1 {
    font-size: clamp(46px, 5vw, 76px);
    line-height: 1;
    font-weight: 900;
    color: #07154a;
    margin-bottom: 24px;
}

.hero-content h1 span {
    color: var(--primary);
}

.hero-content p {
    font-size: 20px;
    line-height: 1.5;
    color: #334155;
    max-width: 620px;
}

.hero-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 42px;
    max-width: 720px;
}

.hero-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px 18px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.hero-card i {
    display: inline-flex;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    background: #dbeafe;
    color: var(--primary);
    font-size: 30px;
    margin-bottom: 14px;
}

.hero-card h6 {
    color: var(--primary);
    font-weight: 800;
    margin-bottom: 6px;
}

.hero-card small {
    color: #475569;
}

.login-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px;
}

.login-card {
    width: 100%;
    max-width: 480px;
    background: var(--white);
    border-radius: 28px;
    padding: 42px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18);
    border: 1px solid var(--border);
}

.login-card h3 {
    font-weight: 900;
    color: var(--text-dark);
}

.login-card p {
    color: var(--muted);
}

.form-label {
    font-weight: 700;
    color: var(--text-dark);
}

.form-control,
.input-group-text {
    min-height: 52px;
    border-color: #cbd5e1;
}

.input-group-text {
    background: var(--white);
    color: #64748b;
}

.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(18, 55, 215, 0.12);
    border-color: var(--primary);
}

.login-btn {
    min-height: 52px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
}

.small-link {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: #64748b;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #dbe3f1;
}

.login-note {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    background: #f8fbff;
    border-radius: 18px;
    padding: 18px;
}

.login-note strong {
    display: block;
    color: var(--primary);
    font-size: 14px;
}

.login-note small {
    display: block;
    color: #475569;
    margin-top: 4px;
}

/* APP LAYOUT */
.app-layout {
    min-height: 100vh;
}

.topbar {
    height: 96px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 42px;
    box-shadow: 0 5px 20px rgba(15, 23, 42, 0.12);
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-brand img {
    width: 68px;
    height: 68px;
    object-fit: contain;
}

.topbar-brand h5 {
    margin: 0;
    font-weight: 900;
    line-height: 1.1;
}

.topbar-brand small {
    color: #dbeafe;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 24px;
}

.notification {
    position: relative;
    font-size: 24px;
}

.notification span {
    position: absolute;
    top: -8px;
    right: -9px;
    background: red;
    color: white;
    font-size: 11px;
    border-radius: 50%;
    width: 19px;
    height: 19px;
    display: grid;
    place-items: center;
    font-weight: 800;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info small {
    display: block;
    color: #dbeafe;
    font-size: 12px;
}

.avatar {
    width: 48px;
    height: 48px;
    background: white;
    color: var(--primary);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 26px;
}

.logout-btn {
    color: white;
    font-size: 24px;
    text-decoration: none;
}

.main-wrapper {
    display: flex;
}

.sidebar {
    width: 270px;
    min-height: calc(100vh - 96px);
    background: white;
    padding: 28px 20px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    margin-bottom: 8px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 700;
    transition: 0.2s ease;
}

.sidebar-menu a i {
    font-size: 22px;
    color: var(--primary);
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.sidebar-menu a:hover i,
.sidebar-menu a.active i {
    color: white;
}

.sidebar-card {
    background: #eef5ff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
    color: var(--primary);
}

.sidebar-card i {
    display: block;
    font-size: 38px;
    margin-bottom: 10px;
}

.sidebar-card strong {
    display: block;
    font-weight: 900;
}

.sidebar-card small {
    color: #475569;
}

.content {
    flex: 1;
    padding: 30px;
}

.page-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-header h2 {
    font-weight: 900;
    margin: 0;
    color: var(--text-dark);
}

.page-header p {
    margin: 6px 0 0;
    color: var(--muted);
}

.date-box {
    color: var(--primary);
    font-weight: 700;
    display: flex;
    gap: 10px;
    align-items: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.stat-icon {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    display: grid;
    place-items: center;
    font-size: 28px;
}

.stat-card span {
    color: var(--text-dark);
    font-weight: 800;
    font-size: 14px;
}

.stat-card h3 {
    margin: 4px 0;
    font-size: 34px;
    font-weight: 900;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 22px;
}

.panel-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.panel-header h5 {
    margin: 0;
    font-weight: 900;
    color: var(--text-dark);
}

.panel-header a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
}

.table {
    font-size: 14px;
}

.table thead th {
    background: #f5f8ff;
    color: var(--text-dark);
    font-weight: 800;
    border-bottom: 0;
}

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-for_review {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-approved {
    background: #dcfce7;
    color: #166534;
}

.status-enrolled {
    background: #e0e7ff;
    color: #3730a3;
}

.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.status-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    background: var(--success);
    border-radius: 50%;
    margin-right: 6px;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.quick-actions a {
    min-height: 110px;
    border: 1px solid var(--border);
    border-radius: 16px;
    display: grid;
    place-items: center;
    text-align: center;
    text-decoration: none;
    color: var(--primary);
    font-weight: 800;
    padding: 14px;
    transition: 0.2s ease;
}

.quick-actions a i {
    display: block;
    font-size: 34px;
    margin-bottom: 8px;
}

.quick-actions a:hover {
    background: var(--primary);
    color: white;
}

.announcement-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #edf2fb;
}

.announcement-item:last-child {
    border-bottom: 0;
}

.announcement-item i {
    width: 44px;
    height: 44px;
    background: #eaf2ff;
    color: var(--primary);
    display: grid;
    place-items: center;
    border-radius: 12px;
    font-size: 24px;
}

.announcement-item strong {
    color: var(--text-dark);
}

.announcement-item p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.app-footer {
    padding: 16px 30px;
    color: #64748b;
    text-align: center;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
    .login-wrapper {
        grid-template-columns: 1fr;
    }

    .login-left {
        display: none;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .topbar {
        height: auto;
        padding: 18px;
        flex-direction: column;
        align-items: start;
        gap: 16px;
    }

    .main-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
    }

    .content {
        padding: 18px;
    }

    .page-header {
        flex-direction: column;
        gap: 12px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .login-right {
        padding: 24px;
    }

    .login-card {
        padding: 28px;
    }

    .login-note {
        grid-template-columns: 1fr;
    }
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    font-weight: 700;
}

.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 700;
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.modal-content {
    border-radius: 20px;
    border: 1px solid var(--border);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 20px 20px 0 0;
}

.modal-header .btn-close {
    filter: invert(1);
}

.form-select {
    min-height: 52px;
    border-color: #cbd5e1;
}

.form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(18, 55, 215, 0.12);
    border-color: var(--primary);
}

.public-form-page {
    background:
        radial-gradient(circle at top right, #dbeafe 0, transparent 35%),
        linear-gradient(135deg, #ffffff 0%, #eff6ff 45%, #dbeafe 100%);
    min-height: 100vh;
}

.public-form-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    padding: 22px 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.public-form-header img {
    width: 74px;
    height: 74px;
    object-fit: contain;
}

.public-form-header h4 {
    margin: 0;
    font-weight: 900;
    line-height: 1.1;
}

.public-form-header p {
    margin: 4px 0 0;
    color: #dbeafe;
    font-weight: 600;
}

.public-form-wrapper {
    max-width: 1280px;
    padding: 36px 24px 60px;
}

.form-title-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 30px;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.form-title-card span {
    display: inline-block;
    background: #dcecff;
    color: var(--primary);
    font-weight: 900;
    padding: 8px 18px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.form-title-card h1 {
    color: var(--text-dark);
    font-weight: 900;
    margin: 0;
}

.form-title-card p {
    color: var(--muted);
    margin: 8px 0 0;
}

.tesda-form-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.form-section {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
    margin-bottom: 22px;
    background: #fbfdff;
}

.form-section h5 {
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.privacy-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    padding: 18px;
}

.privacy-box p {
    color: #334155;
    margin-bottom: 12px;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

@media (max-width: 768px) {
    .public-form-header {
        padding: 18px;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .public-form-header img {
        width: 60px;
        height: 60px;
    }

    .public-form-header h4 {
        font-size: 16px;
    }

    .tesda-form-card {
        padding: 18px;
    }

    .form-section {
        padding: 16px;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions .btn {
        width: 100%;
    }
}

.uli-box {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: nowrap;
    max-width: 560px;
    border: 1px solid #64748b;
    background: #fff;
}

.uli-segment {
    width: 32px;
    height: 26px;
    border-right: 1px solid #64748b;
}

.uli-dash {
    width: 28px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #64748b;
    font-weight: 900;
    color: #111827;
    background: #ffffff;
}

.uli-blue {
    background: #cfe2f3;
}

.uli-pink {
    background: #ead1dc;
}

.uli-green {
    background: #d9ead3;
}

.uli-orange {
    background: #f9cb9c;
}

.uli-purple {
    background: #d9d2e9;
}

@media (max-width: 768px) {
    .uli-box {
        overflow-x: auto;
        max-width: 100%;
    }

    .uli-segment {
        min-width: 28px;
    }

    .uli-dash {
        min-width: 24px;
    }
}