/* File: style.css */

/* === Pengaturan Global & Font === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg-dark: #0d1117;
    --bg-card: #161b22;
    --border-color: #30363d;
    --text-primary: #c9d1d9;
    --text-secondary: #8b949e;
    --accent-blue: #58a6ff;
    --accent-green: #3fb950;
    --accent-red: #f85149;
    --accent-yellow: #e3b341;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

/* === Layout Kontainer Utama === */
.container {
    width: 100%;
    max-width: 1200px;
    margin: auto;
}

/* === Desain Form (Login & Register) === */
.form-wrapper {
    max-width: 400px;
    width: 100%;
}

.form-container {
    background-color: var(--bg-card);
    padding: 30px 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.form-container h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 25px;
    color: #fff;
    font-weight: 600;
}

.form-container .input-group {
    margin-bottom: 15px;
}

.form-container label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9em;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-container input, .form-container select {
    width: 100%;
    padding: 12px;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-container input:focus, .form-container select:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);
}

.form-container button {
    width: 100%;
    padding: 12px;
    background-color: var(--accent-blue);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    margin-top: 10px;
    transition: background-color 0.2s;
}

.form-container button:hover {
    background-color: #459cff;
}

.form-container .message {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9em;
}

.form-container .message a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 500;
}

.form-container .error {
    color: var(--accent-red);
    background-color: rgba(248, 81, 73, 0.1);
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 15px;
}

.form-container .success {
    color: var(--accent-green);
    background-color: rgba(63, 185, 80, 0.1);
    padding: 10px;
    border-radius: 6px;
    text-align: center;
}

/* === Desain Dashboard === */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.dashboard-header h1 {
    margin: 0;
}

.dashboard-header .logout-btn {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s, border-color 0.2s;
}

.dashboard-header .logout-btn:hover {
    background-color: #21262d;
    border-color: var(--text-secondary);
}

.card {
    background-color: var(--bg-card);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 25px;
}

.card h2 {
    margin-top: 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 20px;
    font-size: 1.5em;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
}

tbody tr:last-child td {
    border-bottom: none;
}

.status-PENDING { color: var(--accent-yellow); font-weight: bold; }
.status-ACTIVE { color: var(--accent-green); font-weight: bold; }
.status-EXPIRED { color: var(--accent-red); font-weight: bold; }

/* === Responsif === */
@media (max-width: 768px) {
    body {
        align-items: flex-start;
    }
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}