@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap');

:root {
    --admin-sidebar-bg: #2C1E1A;
    --admin-sidebar-hover: #3E2B26;
    --admin-text-white: #ECEFF1;
    --admin-bg-light: #F7F5F0;
    --admin-card-bg: #FFFFFF;
    --primary: #E8A598;
    --accent: #C5A880;
    --text-dark: #3E2723;
    --text-muted: #7E6861;
    --border-color: #EFEBE9;
    
    --success: #4E6C50;
    --warning: #C58940;
    --danger: #B2533E;
    --info: #3F72AF;
    
    --radius: 12px;
    --shadow: 0 4px 20px rgba(62, 39, 35, 0.05);
    --transition: all 0.3s ease;
}

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

body {
    background-color: var(--admin-bg-light);
    color: var(--text-dark);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    min-height: 100vh;
    display: flex;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--admin-sidebar-bg);
    color: var(--admin-text-white);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    box-shadow: 4px 0 10px rgba(0,0,0,0.15);
}

.sidebar-brand {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid var(--admin-sidebar-hover);
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
}

.sidebar-brand span {
    color: var(--primary);
}

.sidebar-menu {
    list-style: none;
    padding: 1.5rem 0;
    flex-grow: 1;
}

.sidebar-menu li {
    margin-bottom: 0.5rem;
    padding: 0 1rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1.2rem;
    color: #CFD8DC;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-menu a:hover,
.sidebar-menu li.active a {
    background-color: var(--admin-sidebar-hover);
    color: var(--admin-text-white);
}

.sidebar-menu li.active a i {
    color: var(--accent);
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--admin-sidebar-hover);
}

/* Main Content Area */
.admin-wrapper {
    margin-left: 260px;
    flex-grow: 1;
    padding: 2rem;
    min-width: 0; /* Prevents flex items from overflowing */
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.admin-header-title h1 {
    font-size: 2rem;
    font-family: 'Playfair Display', serif;
    color: var(--text-dark);
}

.admin-header-user {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 600;
}

/* Dashboard Metrics */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.metric-card {
    background-color: var(--admin-card-bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.metric-info h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.metric-info .value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
}

.metric-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.metric-icon.blue { background-color: rgba(63, 114, 175, 0.1); color: var(--info); }
.metric-icon.green { background-color: rgba(78, 108, 80, 0.1); color: var(--success); }
.metric-icon.gold { background-color: rgba(197, 168, 128, 0.15); color: var(--accent); }
.metric-icon.red { background-color: rgba(178, 83, 62, 0.1); color: var(--danger); }

/* Tables and Panels */
.panel {
    background-color: var(--admin-card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.panel-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
}

.table-responsive {
    overflow-x: auto;
}

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

.admin-table th {
    background-color: #FAF8F5;
    padding: 1rem;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

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

/* Badges for status */
.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-pending { background-color: rgba(197, 137, 64, 0.1); color: var(--warning); }
.badge-processing { background-color: rgba(63, 114, 175, 0.1); color: var(--info); }
.badge-completed { background-color: rgba(78, 108, 80, 0.1); color: var(--success); }
.badge-cancelled { background-color: rgba(178, 83, 62, 0.1); color: var(--danger); }

/* Forms & UI Controls */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

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

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #D7CCC8;
    border-radius: 8px;
    background-color: #FCFBFA;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(197, 168, 128, 0.15);
}

.btn-admin {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-admin-primary {
    background-color: var(--accent);
    color: white;
}

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

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

.btn-admin-success:hover {
    background-color: #3C543E;
}

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

.btn-admin-danger:hover {
    background-color: #923B28;
}

.btn-admin-outline {
    background-color: transparent;
    border: 1px solid #D7CCC8;
    color: var(--text-dark);
}

.btn-admin-outline:hover {
    background-color: #FAF8F5;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Modal and Overlays (Optional helper) */
.alert-box {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background-color: rgba(78, 108, 80, 0.1);
    color: var(--success);
    border: 1px solid var(--success);
}

.alert-danger {
    background-color: rgba(178, 83, 62, 0.1);
    color: var(--danger);
    border: 1px solid var(--danger);
}

/* Login Page Specific styling */
.login-body {
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #2C1E1A 0%, #3E2B26 100%);
}

.login-card {
    background-color: var(--admin-card-bg);
    padding: 3rem 2.5rem;
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 420px;
    border: 1px solid rgba(255,255,255,0.05);
}

.login-card h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.login-card p {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}
