/* =====================================================
   ARMANI ESTATE - DASHBOARD STYLESHEET
===================================================== */

:root {
    /* Base Colors from Frontend */
    --black: #080808;
    --black-soft: #101010;
    --black-card: #111111;

    --gold: #d9a441;
    --gold-light: #f0c15d;
    --gold-dark: #a97920;

    --white: #ffffff;
    --white-soft: #e8e8e8;
    --gray: #999999;
    --gray-dark: #202020;

    --border: rgba(217, 164, 65, 0.45);
    --border-light: rgba(255, 255, 255, 0.1);

    /* Fonts */
    --serif: "Playfair Display", Georgia, serif;
    --sans: "DM Sans", Arial, sans-serif;

    /* Dashboard Specific */
    --sidebar-width: 260px;
    --sidebar-width-collapsed: 80px;
    --header-height: 70px;
    --radius: 8px;
    
    /* Semantic Colors */
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
}

/* =====================================================
   RESET & GLOBAL
===================================================== */

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

body {
    background: var(--black);
    color: var(--white);
    font-family: var(--sans);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    font: inherit;
}

button {
    cursor: pointer;
    background: none;
    border: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--sans); /* Defaulting to sans for dash readability, serif for special headers */
    font-weight: 500;
}

.serif-heading {
    font-family: var(--serif);
    color: var(--gold);
}

/* =====================================================
   LAYOUT
===================================================== */

.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--black-soft);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: transform 0.3s ease, width 0.3s ease;
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-header img {
    height: 40px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: var(--gray);
    transition: all 0.2s;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.nav-item i {
    width: 24px;
    font-size: 18px;
    margin-right: 12px;
    text-align: center;
}

.nav-item:hover, .nav-item.active {
    color: var(--gold);
    background: rgba(217, 164, 65, 0.05);
}

.nav-item.active {
    border-left-color: var(--gold);
}

.nav-label {
    text-transform: uppercase;
    font-size: 11px;
    color: var(--gray-dark);
    letter-spacing: 1px;
    padding: 15px 25px 5px;
    font-weight: 700;
}

/* MAIN CONTENT */
.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* TOPBAR */
.admin-topbar {
    height: var(--header-height);
    background: var(--black-soft);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.topbar-left, .topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-toggle {
    color: var(--white);
    font-size: 20px;
    display: none; /* Desktop hidden by default if not collapsing */
}

.page-title {
    font-family: var(--serif);
    font-size: 24px;
    color: var(--white);
    margin: 0;
}

.topbar-icon {
    position: relative;
    color: var(--gray);
    font-size: 18px;
    transition: color 0.2s;
}

.topbar-icon:hover {
    color: var(--gold);
}

.badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 10px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.user-profile img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold);
}

.user-profile span {
    font-size: 14px;
    font-weight: 500;
}

/* CONTENT AREA */
.admin-content {
    padding: 30px;
    flex: 1;
}

/* =====================================================
   COMPONENTS
===================================================== */

/* BUTTONS */
.gold-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 20px;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    color: #111;
    border-radius: 5px;
    font-weight: 600;
    font-size: 14px;
    transition: 0.3s ease;
    border: none;
}

.gold-btn i {
    margin-right: 8px;
}

.gold-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(217, 164, 65, .2);
}

.outline-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 20px;
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
    border-radius: 5px;
    font-weight: 600;
    font-size: 14px;
    transition: 0.3s ease;
}

.outline-btn:hover {
    background: var(--gold);
    color: #111;
}

.danger-btn {
    color: var(--danger);
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 13px;
    transition: 0.2s;
}
.danger-btn:hover {
    background: var(--danger);
    color: white;
}

/* CARDS */
.dash-card {
    background: var(--black-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

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

.card-title {
    font-family: var(--serif);
    font-size: 18px;
    color: var(--gold);
}

/* KPI CARDS */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.kpi-card {
    background: var(--black-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s, border-color 0.3s;
}

.kpi-card:hover {
    transform: translateY(-3px);
    border-color: var(--border);
}

.kpi-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: rgba(217, 164, 65, 0.1);
    color: var(--gold);
    display: grid;
    place-items: center;
    font-size: 24px;
}

.kpi-info h4 {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 5px;
    font-weight: 500;
}

.kpi-info .kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
}

/* TABLES */
.table-responsive {
    overflow-x: auto;
}

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

.admin-table th, .admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.admin-table th {
    color: var(--gray);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.admin-table td {
    font-size: 14px;
    color: var(--white-soft);
}

.admin-table tbody tr {
    transition: background 0.2s;
}

.admin-table tbody tr:hover {
    background: rgba(255,255,255,0.02);
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active { background: rgba(40, 167, 69, 0.15); color: #4ade80; border: 1px solid rgba(40, 167, 69, 0.3); }
.status-pending { background: rgba(255, 193, 7, 0.15); color: #fbbf24; border: 1px solid rgba(255, 193, 7, 0.3); }
.status-inactive { background: rgba(108, 117, 125, 0.15); color: #9ca3af; border: 1px solid rgba(108, 117, 125, 0.3); }

/* FORMS */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    color: var(--gray);
    font-size: 13px;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    background: #000;
    border: 1px solid var(--border-light);
    color: white;
    padding: 12px 15px;
    border-radius: 5px;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: var(--gold);
    outline: none;
}

/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 992px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    
    .admin-sidebar.show {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
}
