/* assets/css/style.css */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #2547f4;
    --primary-hover: #1a35c0;
    --bg-dark: #0f1115; /* Deep dark background */
    --bg-card: #161b22; /* Slightly lighter for cards */
    --bg-input: #0d1117;
    --border-color: #30363d;
    --text-main: #f0f6fc;
    --text-muted: #8b949e;
    --danger-color: #da3633;
    --success-color: #238636;
    --warning-color: #d29922;
    --info-color: #388bfd;
    --radius: 8px; /* ROUND_EIGHT */
    --font-family: 'Inter', sans-serif;
    --sidebar-width: 260px;
    --header-height: 64px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

/* Utilities */
.hidden { display: none !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.mt-4 { margin-top: 1rem; }
.text-right { text-align: right; }
.text-center { text-align: center; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}
.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}
.btn-secondary:hover {
    background-color: rgba(255,255,255,0.05);
}

.btn-danger {
    background-color: rgba(218, 54, 51, 0.1);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}
.btn-danger:hover {
    background-color: var(--danger-color);
    color: white;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}
.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}
.form-control {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-main);
    font-family: inherit;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 71, 244, 0.2);
}

/* Cards */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
}

/* Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    padding: 1rem;
}

.sidebar-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2rem;
    padding-left: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    border-radius: var(--radius);
    margin-bottom: 0.25rem;
    font-weight: 500;
}
.nav-link:hover, .nav-link.active {
    background-color: rgba(37, 71, 244, 0.1);
    color: var(--primary-color);
}
.nav-link i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: var(--header-height);
    background-color: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.page-content {
    padding: 2rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
}
.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.table th {
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-color);
}
.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}
.table tr:last-child td {
    border-bottom: none;
}

/* Badges */
.badge {
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}
.badge-success { background-color: rgba(35, 134, 54, 0.15); color: var(--success-color); }
.badge-warning { background-color: rgba(210, 153, 34, 0.15); color: var(--warning-color); }
.badge-danger { background-color: rgba(218, 54, 51, 0.15); color: var(--danger-color); }
.badge-neutral { background-color: rgba(139, 148, 158, 0.15); color: var(--text-muted); }

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
.modal.open {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    width: 500px;
    max-width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.2s;
}
.modal.open .modal-content {
    transform: scale(1);
}
.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
}
.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}
.modal-body {
    padding: 1.5rem;
}
.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Login Page specific */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
.auth-card {
    width: 400px;
}
