/* Head Admin Dashboard - Dark & Light Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root, [data-theme="dark"] {
    --bg-primary: #141414;
    --bg-secondary: #1c1c1c;
    --bg-tertiary: #252525;
    --bg-card: rgba(28, 28, 28, 0.9);
    --bg-hover: rgba(45, 45, 45, 0.9);
    --bg-overlay: rgba(20, 20, 20, 0.95);

    --topnav-height: 38px;
    --topnav-bg: linear-gradient(180deg, #111111 0%, #1a1a1a 100%);
    --topnav-hover: rgba(70, 70, 70, 0.5);

    --text-primary: #ebebeb;
    --text-secondary: #a0a0a0;
    --text-muted: #686868;

    /* Accent: Teal/Emerald instead of blue */
    --accent-primary: #10b981;
    --accent-secondary: #059669;
    --accent-gold: #10b981;

    --border-color: rgba(255, 255, 255, 0.10);
    --border-light: rgba(255, 255, 255, 0.06);

    --success: #4a9f6e;
    --warning: #d4a437;
    --danger: #c45a4a;
    --info: #4a8fb3;

    --btn-bg: linear-gradient(135deg, #333333 0%, #282828 100%);
    --btn-bg-hover: linear-gradient(135deg, #404040 0%, #333333 100%);
    --btn-primary-bg: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --btn-primary-hover: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    --btn-primary-text: #ffffff;

    --input-bg: rgba(10, 10, 10, 0.6);

    --shadow-card: 0 4px 15px rgba(0, 0, 0, 0.3);
    --shadow-card-hover: 0 6px 20px rgba(0, 0, 0, 0.4);
    --shadow-modal: 0 10px 40px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] {
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eeeeee;
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-hover: rgba(0, 0, 0, 0.04);
    --bg-overlay: rgba(245, 245, 248, 0.95);

    --topnav-bg: linear-gradient(180deg, #1f1f1f 0%, #2a2a2a 100%);
    --topnav-hover: rgba(80, 80, 80, 0.5);

    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --text-muted: #888888;

    --accent-primary: #059669;
    --accent-secondary: #047857;
    --accent-gold: #059669;

    --border-color: rgba(0, 0, 0, 0.12);
    --border-light: rgba(0, 0, 0, 0.06);

    --btn-bg: linear-gradient(135deg, #e8e8e8 0%, #dddddd 100%);
    --btn-bg-hover: linear-gradient(135deg, #dddddd 0%, #d0d0d0 100%);
    --btn-primary-bg: linear-gradient(135deg, #059669 0%, #047857 100%);
    --btn-primary-hover: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --btn-primary-text: #ffffff;

    --input-bg: rgba(0, 0, 0, 0.04);

    --shadow-card: 0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-card-hover: 0 6px 20px rgba(0, 0, 0, 0.12);
    --shadow-modal: 0 10px 40px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.25;
    font-size: 13px;
}

/* Top Navigation */
.topnav {
    height: var(--topnav-height);
    background: var(--topnav-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.topnav-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topnav-brand {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-gold);
    letter-spacing: 0.5px;
}

.topnav-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topnav-btn {
    background: transparent;
    border: none;
    color: #a0a0a0;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
}

.topnav-btn:hover {
    background: var(--topnav-hover);
    color: #ebebeb;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-card);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
}

/* Settings Card */
.settings-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.settings-row label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 120px;
}

.settings-row input {
    flex: 1;
    padding: 8px 12px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: 'Inter', sans-serif;
}

.settings-row input:focus {
    outline: none;
    border-color: var(--accent-gold);
}

/* Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 10px 12px;
    font-size: 13px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

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

/* Status Badge */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.badge-active {
    background: rgba(74, 159, 110, 0.15);
    color: var(--success);
}

.badge-inactive {
    background: rgba(196, 90, 74, 0.15);
    color: var(--danger);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--btn-bg);
    color: var(--text-primary);
}

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

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

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

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #a04a3a 100%);
    color: white;
}

.btn-danger:hover {
    opacity: 0.9;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-group {
    display: flex;
    gap: 6px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 200;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-modal);
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.form-row {
    display: flex;
    gap: 12px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
}

/* Notification */
.notification {
    position: fixed;
    top: 50px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    z-index: 300;
    animation: slideIn 0.3s ease;
}

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

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

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Detail View */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.detail-item {
    font-size: 13px;
}

.detail-label {
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 500;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.stat-box {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.stat-number {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent-gold);
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Audit Log */
.audit-list {
    list-style: none;
    padding: 0;
}

.audit-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
}

.audit-action {
    font-weight: 600;
    min-width: 100px;
}

.audit-time {
    color: var(--text-muted);
    font-size: 12px;
    min-width: 140px;
}

.audit-details {
    color: var(--text-secondary);
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* Link style */
.link {
    color: var(--accent-gold);
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}
