/* =========================================================================
   1. Premium Design System Tokens & Color Variables
   ========================================================================= */
:root {
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    /* Elegant Architectural Core Colors */
    --text-main: #0f172a;        /* High-contrast Slate Text */
    --text-muted: #4b5563;       /* Soft Muted Grey text */
    --bg-white: #ffffff;         /* Pure Card White */
    --border-color: rgba(15, 23, 42, 0.08); /* Sophisticated translucent line separation */
    
    /* System Feedback Visual Tokens */
    --success-bg: #f0fdf4;
    --success-border: #bbf7d0;
    --success-text: #166534;
    
    /* Layout Engineering Properties */
    --max-width: 1000px;
    --radius-sm: 6px;
    --radius-md: 12px;
    
    /* Micro-Interaction Shadows */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.02);
    --shadow-md: 0 12px 30px -10px rgba(15, 23, 42, 0.04), 0 4px 12px -5px rgba(15, 23, 42, 0.02);
    --shadow-lg: 0 20px 40px -15px rgba(15, 23, 42, 0.06);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset Engine */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    color: var(--text-main);
    background-color: var(--bg-brand-light); /* Binds cleanly to the hex injection in header.ejs */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* =========================================================================
   2. Typography System
   ========================================================================= */
h1, h2, h3 {
    letter-spacing: -0.03em;
    font-weight: 800;
    color: var(--text-main);
}

h1 { font-size: 3rem; line-height: 1.1; margin-bottom: 1.5rem; }
h2 { font-size: 1.85rem; line-height: 1.25; margin-bottom: 0.75rem; }
p { color: var(--text-muted); line-height: 1.65; margin-bottom: 1.5rem; font-size: 1.05rem; }

/* =========================================================================
   3. Premium Structural Layout Components
   ========================================================================= */
.main-header {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.02em;
}

.site-logo:hover {
    color: var(--primary-color);
}

.site-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.site-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.site-nav a:hover {
    color: var(--primary-color);
}

.content-wrapper {
    flex: 1 0 auto;
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

/* =========================================================================
   4. High-End UI Component Visual Styling
   ========================================================================= */
.hero-banner {
    position: relative;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 5.5rem 3rem;
    text-align: center;
    margin-bottom: 3.5rem;
    overflow: hidden;
    background-image: linear-gradient(rgba(15, 23, 42, 0.015) 1px, transparent 1px), linear-gradient(90deg, rgba(15, 23, 42, 0.015) 1px, transparent 1px);
    background-size: 32px 32px;
    background-position: center center;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, transparent 20%, var(--bg-white) 85%);
    pointer-events: none;
    z-index: 1;
}

.hero-banner > * {
    position: relative;
    z-index: 2;
}

.hero-banner h1 span {
    color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ui-card {
    background: var(--bg-white);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 2.5rem;
    transition: var(--transition);
}

.ui-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px); 
}

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

.form-group label {
    display: block;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: var(--font-sans);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--bg-light);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--bg-white);
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.04);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    letter-spacing: -0.01em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--bg-white);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
    opacity: 0.95;
}

.alert-success {
    background-color: var(--success-bg);
    border: 1px solid var(--success-border);
    color: var(--success-text);
    padding: 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.data-table-wrapper {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.data-table th {
    background-color: var(--bg-card-header); 
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

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

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

.status-badge {
    display: inline-flex;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    background-color: var(--bg-light);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.main-footer {
    background-color: var(--bg-white);
    border-top: 1px solid var(--border-color);
    padding: 3.5rem 1.5rem;
    margin-top: auto;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

@media (max-width: 680px) {
    .header-container { flex-direction: column; gap: 1rem; text-align: center; }
    .site-nav ul { gap: 1.25rem; }
    .content-wrapper { padding: 2.5rem 1rem; }
    h1 { font-size: 2.25rem; }
    .hero-banner { padding: 3.5rem 1.5rem; }
    .ui-card { padding: 1.75rem; }
}
