:root {
    --primary: #4a2311;
    --primary-light: #6d3a24;
    --primary-dark: #2d160b;
    --accent: #d9a066;
    --accent-light: #f5d1a4;
    --secondary: #7c4c37;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #0ea5e9;
    --light: #fdfaf8;
    --dark: #1a0d06;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.8);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    padding: 1.2rem 5%;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

@media (min-width: 1400px) {
    .navbar { padding: 1.2rem 10%; }
}

/* Dashboard Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--dark);
    color: var(--white);
    padding: 2rem 1rem;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 3rem;
    padding: 0 1rem;
    color: var(--white);
    text-decoration: none;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 1rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover, .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.nav-link.active {
    background: var(--primary);
}

.admin-main {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
    background: #fdfaf8;
}

/* Card System */
.card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

/* Stats Board */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.05);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--secondary);
    margin-bottom: 5px;
    font-weight: 600;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
}

/* Search & Filter Bar */
.search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: var(--white);
    padding: 15px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

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

.table th {
    text-align: left;
    padding: 12px;
    border-bottom: 2px solid var(--light);
    color: var(--secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    padding: 15px 12px;
    border-bottom: 1px solid var(--light);
    vertical-align: middle;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-pending { background: #fef3c7; color: #92400e; }
.badge-processing { background: #e0f2fe; color: #0369a1; }
.badge-resolved { background: #d1fae5; color: #065f46; }

/* Detail Page Components */
.detail-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 2rem;
}

.info-group {
    margin-bottom: 1.5rem;
}

.info-label {
    font-size: 0.8rem;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
}

.timeline {
    border-left: 2px solid var(--accent-light);
    margin-left: 10px;
    padding-left: 25px;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -31px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
}

.timeline-content {
    background: #fff;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    border: 1px solid var(--light);
}

.timeline-time {
    font-size: 0.75rem;
    color: var(--secondary);
    margin-bottom: 4px;
}

/* Forms */
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 35, 17, 0.1);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    font-weight: 600;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { 
    background: var(--primary-dark); 
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--primary-dark);
}
.btn-dark { background: var(--dark); color: var(--white); }
.btn-outline { 
    border: 2px solid var(--primary); 
    color: var(--primary); 
    background: transparent; 
}
.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

/* Utility */
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.w-100 { width: 100%; }

@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); }
    .admin-main { margin-left: 0; }
    .detail-grid { grid-template-columns: 1fr; }
}

/* Legacy support/Public form styles */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
}

.preview-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    align-items: center; justify-content: center;
}

.modal-content { max-width: 90%; max-height: 90%; }
.close-modal { position: absolute; top: 30px; right: 30px; color: white; font-size: 40px; cursor: pointer; }
