/* Premium Vanilla CSS */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary: #0f172a;
    --accent: #38bdf8;
    --light: #f8fafc;
    --white: #ffffff;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --danger: #ef4444;
    --success: #22c55e;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 0.75rem;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--light);
    color: var(--secondary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-light);
    position: sticky;
    top: 0;
    z-index: 1200;
    padding: 0.75rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    min-height: 70px;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    line-height: 1.2;
    transition: var(--transition);
}

.nav-brand:hover {
    opacity: 0.85;
}

.nav-logo-img {
    height: 30px;
    width: auto;
    object-fit: contain;
    display: block;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--secondary);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 2.25rem;
    cursor: pointer;
    color: var(--secondary);
    transition: var(--transition);
    position: relative;
    z-index: 1201;
    padding: 0;
    width: 44px;
    height: 44px;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
    user-select: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.menu-toggle:active {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
}



/* Buttons - Professional Styling */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
    filter: brightness(1.1);
}

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

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.2);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2);
}

.btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.2);
}


/* Layouts */
.hero {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--white);
    padding: 8rem 5%;
    text-align: center;
    border-radius: 0 0 3rem 3rem;
    margin-bottom: 3rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 450px;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(37, 99, 235, 0.5));
    z-index: 1;
}

.hero h1, .hero p, .hero .btn {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    letter-spacing: -1px;
}

/* Mini Hero for Sub Pages */
.mini-hero {
    position: relative;
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 4rem 5%;
    text-align: center;
    border-radius: 0 0 2.5rem 2.5rem;
    margin-bottom: 2.5rem;
    overflow: hidden;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.mini-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(37, 99, 235, 0.4));
    z-index: 1;
}

.mini-hero h2 {
    position: relative;
    z-index: 2;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.mini-hero p {
    position: relative;
    z-index: 2;
    font-size: 1.1rem;
    color: rgba(255,255,255,0.8);
}


.hero p {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    max-width: 700px;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
    min-height: 60vh;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Cards - Premium Modern Look */
.card {
    background: var(--white);
    border-radius: 1.25rem;
    padding: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(226, 232, 240, 0.5);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.card-img-wrapper {
    width: 100%;
    height: 220px;
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 1.25rem;
    background: var(--gray-light);
    position: relative;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.card:hover .card-img {
    transform: scale(1.1);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--secondary);
    line-height: 1.3;
}

.card-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px dashed var(--gray-light);
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.card-price::after {
    content: attr(data-unit);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray);
}


.card-body {
    flex-grow: 1;
}

/* Forms & Authentication - Professional Modern Look */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('../images/auth_bg.png') center/cover no-repeat;
    padding: 2rem;
    position: relative;
}

.auth-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.1), rgba(15, 23, 42, 0.4));
    backdrop-filter: blur(2px);
}

.auth-card {
    width: 100%;
    max-width: 450px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 3rem 2.5rem;
    border-radius: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    z-index: 10;
    animation: authFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authFadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-brand {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-brand img {
    height: 50px;
    margin-bottom: 1rem;
}

.auth-brand h1 {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.auth-title {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--gray);
}

.auth-container {
    max-width: 450px;
    margin: 4rem auto;
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Table */
.table-container {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow-x: auto;
    margin-top: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
}

th {
    background: var(--light);
    font-weight: 600;
}

tbody tr:hover {
    background-color: #f1f5f9;
}

/* Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
}
.badge-pending { background: #fef08a; color: #854d0e; }
.badge-dibayar { background: #bfdbfe; color: #1e40af; }
.badge-selesai { background: #bbf7d0; color: #166534; }
.badge-batal { background: #fecaca; color: #991b1b; }

/* Dashboard Admin specific */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
    transition: var(--transition);
}
.stat-card:hover {
    transform: translateY(-3px);
}
.stat-card h3 {
    font-size: 1rem;
    color: var(--gray);
}
.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary);
    margin-top: 0.5rem;
}

/* Footer */
footer {
    background: var(--white);
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--gray-light);
    color: var(--gray);
}

/* Responsive Systems (FULL) */
@media (max-width: 1024px) {
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    .hero h1 { font-size: 3rem; }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: row;
        justify-content: space-between;
        padding: 1.25rem 5%;
        gap: 0;
    }

    .menu-toggle {
        display: flex !important;
        pointer-events: auto;
    }
    
    .nav-links {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        gap: 0;
        background: var(--white);
        padding: 0;
        border-radius: 0 0 1.5rem 1.5rem;
        border: none;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        z-index: 1199;
        overflow: hidden;
    }

    .nav-links.nav-active {
        display: flex !important;
        animation: menuFadeIn 0.3s ease forwards;
    }

    @keyframes menuFadeIn {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    .nav-links li {
        width: 100%;
        border-top: 1px solid var(--gray-light);
    }

    .nav-links a {
        display: block;
        width: 100%;
        text-align: center;
        padding: 1.25rem;
        border-radius: 0;
    }

    .nav-links a:hover {
        background-color: #f8fafc;
    }

    .nav-links .btn {
        width: calc(100% - 2.5rem);
        margin: 1rem 1.25rem;
        border-radius: 10px;
    }
    
    .hero {
        padding: 4rem 5%;
        border-radius: 0 0 2rem 2rem;
    }
    
    .hero h1 { font-size: 2.25rem; }
    .hero p { font-size: 1.1rem; }
    
    .mini-hero {
        padding: 2.5rem 5%;
        min-height: 180px;
        border-radius: 0 0 1.5rem 1.5rem;
    }
    
    .mini-hero h2 { font-size: 1.5rem; }
    
    .grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    
    .container {
        padding: 0 4%;
    }
    
    .auth-container {
        margin: 2rem 5%;
        padding: 1.5rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .history-card {
        flex-direction: column !important;
        padding: 1.25rem !important;
    }

    .history-actions {
        width: 100% !important;
        margin-top: 1rem;
    }

    .history-details {
        min-width: 100% !important;
    }
}

@media (max-width: 480px) {
    .btn {
        width: 100%;
        padding: 0.7rem 1.2rem;
    }
    .hero h1 { font-size: 1.75rem; }
    .nav-brand { font-size: 1.25rem; }
}

/* Ensure global footer is always exactly at the bottom of the viewport even if content is sparse */
footer {
    margin-top: auto !important;
}
