@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --brand-primary: #0f4c81;
    --brand-blue: #1d63b8;
    --brand-accent: #e11d48;
    --sidebar-width: 260px;
    --bg-light: #f1f5f9;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-size: 0.925rem;
    line-height: 1.5;
}

/* --- HERO FULL-SCREEN LOGIN / AUTH BACKDROP --- */
.auth-hero-wrapper {
    min-height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background-color: #0f172a;
    background-image:
        linear-gradient(135deg, rgba(15, 32, 65, 0.85) 0%, rgba(15, 23, 42, 0.78) 100%),
        url('../images/login-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.auth-hero-header {
    text-align: center;
    color: #ffffff;
    margin-bottom: 1.75rem;
    z-index: 2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.auth-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 0.85rem;
    color: #e0f2fe;
}

.auth-hero-header h1 {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    margin-bottom: 0.35rem;
}

.auth-hero-header p {
    font-size: 0.95rem;
    color: #cbd5e1;
    font-weight: 500;
}

.auth-glass-card {
    width: 100%;
    max-width: 430px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 2.25rem 2.25rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.4);
    z-index: 2;
}

.auth-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
    margin-bottom: 0.35rem;
}

.auth-card-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 1.5rem;
}

.input-icon-group {
    position: relative;
}

.input-icon-group i {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.05rem;
}

.input-icon-group .form-control {
    padding-left: 2.65rem;
}

.auth-footer-note {
    margin-top: 1.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    text-align: center;
    z-index: 2;
}

/* --- APP LAYOUT & SIDEBAR --- */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.05);
}

.sidebar-header {
    padding: 1.35rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

.sidebar-header-text span {
    display: block;
    font-weight: 800;
    font-size: 1.1rem;
    color: #ffffff;
    letter-spacing: 0.4px;
}

.sidebar-header-text small {
    display: block;
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 500;
}

.sidebar-nav {
    padding: 1rem 0.85rem;
    flex: 1;
}

.sidebar-nav .nav-title {
    padding: 0.85rem 0.75rem 0.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.72rem 0.95rem;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
}

.sidebar-nav a:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

.sidebar-nav a.active {
    color: #ffffff;
    background: linear-gradient(90deg, #2563eb 0%, #1d4ed8 100%);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.sidebar-logout {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-logout {
    width: 100%;
    padding: 0.68rem;
    background-color: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-logout:hover {
    background-color: #dc2626;
    color: #ffffff;
}

/* --- TOPBAR & CONTENT --- */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    background: #ffffff;
    color: var(--text-dark);
    height: 64px;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.topbar-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.88rem;
}

.topbar-user .avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.content-header {
    background: #ffffff;
    padding: 1.15rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-header h1 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.breadcrumb {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

.page-body {
    padding: 1.75rem 2rem;
    flex: 1;
}

/* --- CARDS & TABLES --- */
.card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
    position: relative;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: #0f172a;
}

.table-custom {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.75rem;
}

.table-custom th,
.table-custom td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    font-size: 0.88rem;
}

.table-custom th {
    background-color: #f8fafc;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    font-size: 0.76rem;
    letter-spacing: 0.4px;
    border-top: 1px solid var(--border-color);
}

.table-custom tbody tr:hover {
    background-color: #f8fafc;
}

/* --- BUTTONS & FORMS --- */
.btn {
    padding: 0.58rem 1.15rem;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: inherit;
    transition: all 0.15s ease;
}

.btn-primary {
    background-color: #2563eb;
    color: #fff;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #64748b;
    color: #fff;
}

.btn-danger {
    background-color: #ef4444;
    color: #fff;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-warning {
    background-color: #f59e0b;
    color: #ffffff;
}

.btn-warning:hover {
    background-color: #d97706;
}

.btn-sm {
    padding: 0.38rem 0.72rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-size: 0.86rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #334155;
}

.form-control {
    width: 100%;
    padding: 0.65rem 0.9rem;
    font-size: 0.9rem;
    font-family: inherit;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background-color: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.search-box {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-box input {
    padding: 0.45rem 0.85rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.86rem;
    font-family: inherit;
    min-width: 240px;
}

.badge-status {
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    display: inline-block;
}

.btn-close-alert {
    position: absolute;
    top: 0.85rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.35rem;
    font-weight: 700;
    color: inherit;
    cursor: pointer;
    line-height: 1;
    opacity: 0.75;
}

.btn-close-alert:hover {
    opacity: 1;
}

.profile-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
}

.profile-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--card-shadow);
}

.profile-card img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid #2563eb;
}

@media (max-width: 900px) {
    .dashboard-stats-grid {
        grid-template-columns: 1fr !important;
    }

    .profile-grid {
        grid-template-columns: 1fr !important;
    }
}