/* Modern Mild Slate & Glass CMS Dashboard Stylesheet
   Warezone Relocations Admin Panel */

:root {
    --admin-bg: #f8fafc;
    --admin-card: #ffffff;
    --admin-card-hover: #f1f5f9;
    --admin-sidebar: #ffffff;
    --admin-sidebar-border: #e2e8f0;
    --admin-border: #e2e8f0;
    --admin-primary: #4f46e5;
    --admin-primary-hover: #4338ca;
    --admin-accent: #0284c7;
    --admin-text: #0f172a;
    --admin-text-secondary: #334155;
    --admin-muted: #64748b;
    --admin-danger: #dc2626;
    --admin-success: #16a34a;
    --admin-warning: #d97706;
    --admin-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.04);
    --admin-radius: 12px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
    background-color: var(--admin-bg);
    color: var(--admin-text);
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

a:hover {
    text-decoration: underline;
}

/* Fixed Non-Overlapping Layout Structure */
.admin-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

.admin-sidebar {
    width: 260px;
    background-color: var(--admin-sidebar);
    border-right: 1px solid var(--admin-sidebar-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    min-height: 100vh;
    z-index: 50;
}

.sidebar-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-header img {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.sidebar-brand-badge {
    font-size: 11px;
    font-weight: 700;
    background: #e0e7ff;
    color: #4338ca;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    padding: 20px 14px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--admin-muted);
    border-radius: 10px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.15s ease-in-out;
}

.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: #64748b;
    flex-shrink: 0;
    transition: color 0.15s ease-in-out;
}

.nav-link:hover {
    background-color: #f1f5f9;
    color: var(--admin-text);
    text-decoration: none;
}

.nav-link:hover .nav-icon {
    color: var(--admin-text);
}

.nav-link.active {
    background-color: #e0e7ff;
    color: var(--admin-primary);
    font-weight: 600;
}

.nav-link.active .nav-icon {
    color: var(--admin-primary);
}

.sidebar-footer {
    padding: 18px 20px;
    border-top: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #fafafa;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #4f46e5;
    color: #ffffff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* Main Content Area (Clean Header, Zero Overlap) */
.admin-main {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-topbar {
    height: 64px;
    background-color: #ffffff;
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 36px;
    flex-shrink: 0;
}

.page-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--admin-text);
}

.admin-content {
    padding: 32px 36px;
    flex-grow: 1;
    background-color: var(--admin-bg);
}

/* Dashboard Stat Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background-color: var(--admin-card);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    padding: 22px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--admin-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.08);
}

.stat-val {
    font-size: 30px;
    font-weight: 800;
    color: var(--admin-text);
    margin-top: 4px;
}

.stat-lbl {
    font-size: 12px;
    color: var(--admin-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #f1f5f9;
    color: var(--admin-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

/* Clean Data Tables */
.table-card {
    background-color: var(--admin-card);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    overflow: hidden;
    margin-bottom: 28px;
    box-shadow: var(--admin-shadow);
}

.table-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #ffffff;
}

.table-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--admin-text);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th {
    padding: 14px 24px;
    background-color: #f8fafc;
    color: var(--admin-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--admin-border);
}

.admin-table td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--admin-border);
    color: var(--admin-text-secondary);
    vertical-align: middle;
    font-size: 14px;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background-color: #f8fafc;
}

/* Mild Pastel Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-danger  { background: #fee2e2; color: #b91c1c; }
.badge-info    { background: #e0e7ff; color: #4338ca; }
.badge-role    { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease-in-out;
    text-decoration: none;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-primary {
    background-color: var(--admin-primary);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.2);
}

.btn-primary:hover {
    background-color: var(--admin-primary-hover);
    color: #ffffff;
    text-decoration: none;
}

.btn-secondary {
    background-color: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
}

.btn-secondary:hover {
    background-color: #e2e8f0;
    text-decoration: none;
}

.btn-danger {
    background-color: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}

.btn-danger:hover {
    background-color: #dc2626;
    color: #ffffff;
    text-decoration: none;
}

/* Form Cards & Inputs */
.form-card {
    background-color: var(--admin-card);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    padding: 32px;
    box-shadow: var(--admin-shadow);
    max-width: 860px;
}

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

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: var(--admin-text);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

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

/* Mild Alerts */
.alert {
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
}

.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-danger  { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
