@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
@import url('https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css');

:root {
    --primary: #2D1B8E;
    --primary-dark: #1e1260;
    --accent: #6C63FF;
    --accent-light: #8b85ff;
    --white: #ffffff;
    --gray-light: #f8f9fa;
    --gray: #e9ecef;
    --text: #333333;
    --text-muted: #6c757d;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --border-radius: 12px;
    --shadow: 0 4px 20px rgba(45, 27, 142, 0.12);
    --shadow-hover: 0 8px 30px rgba(45, 27, 142, 0.2);
    --transition: all 0.3s ease;
    --navbar-height: 70px;
}

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

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text);
    background-color: var(--gray-light);
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: var(--white);
    box-shadow: 0 2px 20px rgba(45, 27, 142, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 1000;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.navbar-brand img {
    height: 40px;
    width: auto;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.navbar-nav .nav-item a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    transition: var(--transition);
}

.navbar-nav .nav-item a:hover,
.navbar-nav .nav-item a.active {
    color: var(--accent);
    background: rgba(108, 99, 255, 0.08);
}

.navbar-nav .nav-item a i {
    font-size: 1.1rem;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--border-radius);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

/* ===== PAGE WRAPPER ===== */
.page-wrapper {
    padding-top: var(--navbar-height);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== CARDS ===== */
.card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 28px;
}

/* ===== TABLES ===== */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--border-radius);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

table th {
    background: var(--primary);
    color: var(--white);
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

table th:first-child { border-radius: 8px 0 0 0; }
table th:last-child { border-radius: 0 8px 0 0; }

table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray);
    color: var(--text);
}

table tr:hover td {
    background: rgba(108, 99, 255, 0.03);
}

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

/* ===== STATUS BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-pending  { background: #fff3cd; color: #856404; }
.badge-inprocess { background: #cce5ff; color: #004085; }
.badge-done     { background: #d4edda; color: #155724; }
.badge-rejected { background: #f8d7da; color: #721c24; }

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--white);
    border-radius: 12px;
    padding: 14px 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    min-width: 260px;
    animation: slideIn 0.3s ease;
    border-left: 4px solid var(--accent);
}

.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);   opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0);   opacity: 1; }
    to   { transform: translateX(100%); opacity: 0; }
}

/* ===== SECTION TITLES ===== */
.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 32px;
}

/* ===== USER AVATAR ===== */
.user-avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .navbar {
        padding: 0 16px;
    }

    .navbar-nav {
        display: none;
    }

    .section-title {
        font-size: 1.4rem;
    }
}
