/* ==========================================
   RESET + GLOBAL LAYOUT
   ========================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background: #f3f5fb;
    color: #1f2937;
    position: relative;
}

/* Konten mendorong footer ke bawah */
.site-main {
    flex: 1 0 auto;
}

/* Footer tetap di bawah */
.site-footer {
    flex-shrink: 0;
}

/* ==========================================
   GLOBAL BACKGROUND (DISET ADMIN)
   ========================================== */
.app-bg {
    position: fixed;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
}

.app-bg-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(4px);
    z-index: -1;
}

/* ==========================================
   LINK
   ========================================== */
a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ==========================================
   HEADER (BACKGROUND KHUSUS)
   ========================================== */
.site-header {
    background: linear-gradient(90deg, rgba(124,58,237,0.95), rgba(59,130,246,0.92));
    color: #ffffff;
    padding: 16px 22px 20px;
    box-shadow: 0 2px 12px rgba(15,23,42,0.22);
    position: relative;
    z-index: 10;
}

.kop-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.kop-logo img {
    height: 70px;
    width: 70px;
    background: rgba(255,255,255,0.8);
    border-radius: 18px;
    padding: 6px;
    object-fit: contain;
    box-shadow: 0 6px 14px rgba(15,23,42,0.25);
}

.kop-text h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #ffffff;
}

.kop-text p {
    font-size: 13px;
    color: #e5e7eb;
}

/* ==========================================
   NAV MENU
   ========================================== */
.main-nav {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.main-nav a {
    color: #f9fafb;
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 999px;
    transition: all .2s;
}

.main-nav a:hover {
    background: rgba(255,255,255,0.22);
}

.nav-user {
    margin-left: auto;
    font-size: 12px;
    color: #e5e7eb;
    opacity: .95;
}

/* ==========================================
   MAIN CONTENT
   ========================================== */
.site-main {
    padding: 28px 18px 40px;
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

/* ==========================================
   FOOTER (STICKY)
   ========================================== */
.site-footer {
    background: rgba(15,23,42,0.92);
    color: #e5e7eb;
    padding: 14px 22px;
    text-align: center;
    font-size: 12px;
}

/* ==========================================
   CARDS & GRID
   ========================================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.card {
    background: rgba(255,255,255,0.95);
    border-radius: 18px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 25px rgba(15,23,42,0.12);
}

.card h3 {
    margin-bottom: 6px;
}

/* ==========================================
   BUTTON
   ========================================== */
.btn,
button.btn {
    background: #7c3aed;
    border: none;
    color: #fff;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(124,58,237,0.45);
    transition: 0.2s;
}

.btn:hover,
button.btn:hover {
    background: #6d28d9;
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(124,58,237,0.55);
}

/* ==========================================
   FORM
   ========================================== */
.form-basic {
    width: 100%;
    max-width: 520px;
    background: rgba(255,255,255,0.96);
    padding: 22px;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    margin: auto;
    box-shadow: 0 12px 28px rgba(15,23,42,0.15);
}

.form-basic label {
    display: block;
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 500;
}

.form-basic input,
.form-basic textarea,
.form-basic select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    font-size: 14px;
    background: #f8fafc;
}

.form-basic input:focus,
.form-basic textarea:focus,
.form-basic select:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 2px rgba(124,58,237,0.25);
    background: #fff;
}

/* ==========================================
   TOGGLE PASSWORD
   ========================================== */
.input-with-icon {
    position: relative;
}

.input-with-icon input {
    padding-right: 38px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.6;
}

.toggle-password:hover {
    opacity: 1;
}

/* ==========================================
   ALERT
   ========================================== */
.alert {
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: 14px;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

/* ==========================================
   TABLE
   ========================================== */
.table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255,255,255,0.97);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(15,23,42,0.15);
}

.table th,
.table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 13px;
}

.table th {
    background: #eef2ff;
    font-weight: 600;
}

/* ==========================================
   AUTH PAGES (LOGIN / REGISTER)
   ========================================== */
.auth-wrapper {
    min-height: calc(100vh - 140px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 18px;
}

.auth-card {
    background: rgba(255,255,255,0.97);
    width: 100%;
    max-width: 360px;
    padding: 28px 26px;
    border-radius: 22px;
    box-shadow: 0 18px 40px rgba(15,23,42,0.25);
    border: 1px solid #e5e7eb;
}

.auth-card h2 {
    font-size: 26px;
    margin-bottom: 6px;
    color: #7c3aed;
}

.auth-subtitle {
    font-size: 14px;
    color: #4b5563;
    margin-bottom: 20px;
}

.auth-card .form-basic {
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 640px) {
    .site-header {
        padding: 14px;
    }
    .auth-card {
        max-width: 320px;
        padding: 22px 20px;
    }
}
