/* ============================================================
   ACW-SEDCI DESIGN SYSTEM - Marble/Brass/Ebony
   Unified styling for all modules
   ============================================================ */

:root {
    --ebony: #0D0C0A;
    --ebony-2: #141210;
    --ebony-3: #1C1916;
    --ebony-4: #262118;
    --marble: #F5F0E8;
    --brass: #C8963E;
    --brass-l: #E8B86D;
    --brass-d: #8A6220;
    --txt-light: #F5F0E8;
    --txt-mid: #B8A880;
    --txt-muted: #6B5C40;
    --green: #2D6A4F;
    --green-l: #52B788;
    --red: #9B2E2E;
    --serif: 'Cormorant Garamond', Georgia, serif;
    --sans: 'Josefin Sans', system-ui, sans-serif;
    --mono: 'DM Mono', monospace;
    --sh-card: 0 8px 40px rgba(0,0,0,0.5), inset 0 1px 0 rgba(200,150,62,0.15);
    --transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
}

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

body {
    font-family: var(--sans);
    background: var(--ebony);
    color: var(--txt-light);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Ambient Background */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(200,150,62,0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* ===== LAYOUT ===== */
.app-wrapper {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== HEADER ===== */
.main-header {
    padding: 24px 40px 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    animation: fadeDown 0.6s ease;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-seal {
    width: 52px;
    height: 52px;
    border: 1.5px solid var(--brass);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 400;
    color: var(--brass-l);
    position: relative;
}

.brand-seal::before {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(200,150,62,0.3);
    border-radius: 50%;
}

.brand-name {
    font-family: var(--serif);
    font-size: 15px;
    font-weight: 300;
    color: var(--brass-l);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.brand-sub {
    font-family: var(--mono);
    font-size: 8px;
    color: var(--txt-muted);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin-top: 4px;
}

/* ===== SIDEBAR ===== */
.main-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    background: rgba(13,12,10,0.95);
    backdrop-filter: blur(12px);
    border-right: 1px solid rgba(200,150,62,0.15);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 100;
}

.main-sidebar.open {
    transform: translateX(0);
}

.sidebar-nav {
    padding: 100px 20px 40px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    color: var(--txt-mid);
    text-decoration: none;
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.06em;
    border-radius: 8px;
    transition: var(--transition);
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(200,150,62,0.1);
    color: var(--brass-l);
}

/* ===== CONTENT ===== */
.content-wrapper {
    flex: 1;
    padding: 20px 40px 60px;
    margin-left: 0;
    transition: margin-left 0.3s ease;
}

.content-wrapper.sidebar-open {
    margin-left: 280px;
}

/* ===== CARDS ===== */
.card {
    background: var(--ebony-3);
    border: 1px solid rgba(200,150,62,0.12);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(200,150,62,0.3);
    box-shadow: var(--sh-card);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(200,150,62,0.1);
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 500;
    color: var(--brass-l);
}

.card-body {
    padding: 24px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 40px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brass), var(--brass-d));
    color: var(--ebony);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(200,150,62,0.3);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--brass);
    color: var(--brass-l);
}

.btn-outline:hover {
    background: rgba(200,150,62,0.1);
    border-color: var(--brass-l);
}

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

.data-table th {
    text-align: left;
    padding: 14px 12px;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--txt-muted);
    border-bottom: 1px solid rgba(200,150,62,0.15);
}

.data-table td {
    padding: 14px 12px;
    font-size: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: var(--txt-mid);
}

.data-table tr:hover td {
    background: rgba(200,150,62,0.05);
}

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

.form-group label {
    display: block;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--brass-d);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--ebony-4);
    border: 1px solid rgba(200,150,62,0.2);
    border-radius: 8px;
    color: var(--txt-light);
    font-family: var(--sans);
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--brass);
    box-shadow: 0 0 0 2px rgba(200,150,62,0.2);
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    background: var(--ebony-2);
    border: 1px solid var(--brass);
    border-radius: 16px;
}

/* ===== GRID SYSTEM ===== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .main-header { padding: 16px 20px; }
    .content-wrapper { padding: 16px 20px 40px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ===== UTILITIES ===== */
.text-brass { color: var(--brass-l); }
.text-muted { color: var(--txt-muted); }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.text-center { text-align: center; }