/* === Admin CSS === */

/* === Custom Properties === */
:root {
    --primary: #C9A84C;
    --primary-glow: rgba(201, 168, 76, 0.4);
    --bg: #0a0a0a;
    --bg-light: #111111;
    --bg-lighter: #1a1a1a;
    --text: #f0ede6;
    --text-muted: #a09b90;
    --error: #e53e3e;
    --success: #38a169;
    --warning: #ed8936;
    --font-display: 'Cinzel', Georgia, serif;
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* === Reset === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* === Base === */
html {
    font-size: 16px;
}

body {
    font-family: var(--font-stack);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* === Admin Layout === */
.admin-body {
    min-height: 100vh;
}

.admin-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 100vh;
}

/* === Sidebar === */
.sidebar {
    background-color: rgba(10, 10, 10, 0.95);
    border-right: 1px solid rgba(201, 168, 76, 0.2);
    padding: 2rem 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.sidebar-badge {
    display: inline-block;
    background-color: var(--primary);
    color: var(--bg);
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    margin-left: auto;
    font-weight: 700;
}

/* === Sidebar Navigation === */
.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    color: var(--text-muted);
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.nav-item:hover {
    background-color: var(--bg-lighter);
    color: var(--primary);
    text-decoration: none;
}

.nav-item.active {
    background-color: var(--primary);
    color: var(--bg);
}

.nav-icon {
    font-size: 1.2rem;
}

/* === Sidebar Footer === */
.sidebar-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(201, 168, 76, 0.2);
}

.sidebar-user {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.btn-logout {
    padding: 0.5rem 1rem;
    background-color: var(--error);
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background-color 0.2s ease;
}

.btn-logout:hover {
    background-color: #c92a2a;
}

/* === Admin Main === */
.admin-main {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.admin-header {
    background-color: var(--bg-light);
    border-bottom: 1px solid rgba(201, 168, 76, 0.2);
    padding: 2rem 2rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-header h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--primary);
}

.admin-content {
    padding: 2rem;
    flex: 1;
}

/* === Forms === */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--bg-lighter);
    border: 1px solid rgba(201, 168, 76, 0.2);
    border-radius: 4px;
    color: var(--text);
    font-family: var(--font-stack);
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-stack);
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--bg);
}

.btn-primary:hover {
    background-color: #d4b55f;
}

.btn-secondary {
    background-color: var(--bg-lighter);
    color: var(--text);
    border: 1px solid rgba(201, 168, 76, 0.2);
}

.btn-secondary:hover {
    background-color: var(--bg-light);
}

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

.btn-danger:hover {
    background-color: #c92a2a;
}

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

.btn-success:hover {
    background-color: #2f8659;
}

.btn-block {
    width: 100%;
}

/* === Tables === */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background-color: var(--bg-lighter);
    border-radius: 4px;
    overflow: hidden;
}

.table thead {
    background-color: var(--bg-light);
}

.table th {
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    color: var(--primary);
    border-bottom: 1px solid rgba(201, 168, 76, 0.2);
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(201, 168, 76, 0.1);
}

.table tr:hover {
    background-color: var(--bg);
}

/* === Alerts === */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-danger {
    background-color: rgba(229, 62, 62, 0.1);
    border: 1px solid var(--error);
    color: #ff6b6b;
}

.alert-success {
    background-color: rgba(56, 161, 105, 0.1);
    border: 1px solid var(--success);
    color: #51cf66;
}

.alert-warning {
    background-color: rgba(237, 137, 54, 0.1);
    border: 1px solid var(--warning);
    color: #ffa94d;
}

/* === Cards === */
.card {
    background-color: var(--bg-lighter);
    border: 1px solid rgba(201, 168, 76, 0.2);
    border-radius: 4px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* === Login Page === */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: var(--bg);
}

.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.login-card {
    background-color: var(--bg-lighter);
    border: 1px solid rgba(201, 168, 76, 0.2);
    border-radius: 8px;
    padding: 3rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.login-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: block;
    object-fit: contain;
}

.login-title {
    font-family: var(--font-display);
    font-size: 2rem;
    text-align: center;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.login-footer {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
}

/* === Responsive === */
@media (max-width: 768px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .admin-header {
        padding: 1.5rem;
    }

    .admin-header h1 {
        font-size: 1.5rem;
    }

    .admin-content {
        padding: 1rem;
    }

    .login-card {
        padding: 2rem;
        margin: 1rem;
    }
}

/* === Utility Classes === */
.inline {
    display: inline;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
