/* ==========================================================================
   Base Variables & Design Tokens
   ========================================================================== */
:root {
    /* Brand & Accent Colors */
    --brand-primary: #2563eb;       /* Professional Trust Blue */
    --brand-primary-hover: #1d4ed8;
    --success-color: #10b981;       /* Validation Success Green */
    --warning-color: #f59e0b;
    --danger-color: #ef4444;

    /* Backgrounds & Surfaces */
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-subtle: #f1f5f9;

    /* Borders */
    --border-color: #e2e8f0;
    --border-color-hover: #cbd5e1;
    --border-radius-sm: 6px;
    --border-radius-md: 12px;

    /* Typography */
    --text-main: #0f172a;
    --text-muted: #64748b;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.25s ease;
}

/* ==========================================================================
   CSS Reset & Global Defaults
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.dashboard-body {
    font-family: var(--font-sans);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */
.main-navbar {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.25rem;
    color: var(--text-main);
    letter-spacing: -0.025em;
}

.dashboard-wrapper,
.dashboard-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

.dashboard-header {
    margin-bottom: 2.5rem;
}

.dashboard-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    color: var(--text-muted);
    font-size: 1.125rem;
}

/* ==========================================================================
   Buttons & UI Elements
   ========================================================================== */
.ui-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--brand-primary);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--brand-primary-hover);
}

.btn-secondary {
    background-color: var(--bg-surface);
    border-color: var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: var(--bg-subtle);
    border-color: var(--border-color-hover);
}

.badge {
    display: inline-block;
    background: #eff6ff; /* Light blue tint */
    color: var(--brand-primary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   Dashboard Metrics
   ========================================================================== */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.metric-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.metric-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-main);
}

.status-ready {
    color: var(--success-color);
}

/* ==========================================================================
   Schema Cards Grid (index.php)
   ========================================================================== */
.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.schema-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.schema-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.schema-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--border-color-hover);
}

.card-icon {
    font-size: 1.75rem;
    background: var(--bg-subtle);
    padding: 0.75rem;
    border-radius: var(--border-radius-sm);
    flex-shrink: 0;
}

.card-details h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.card-details p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* ==========================================================================
   Generator Workspace (article.php, faq.php, etc.)
   ========================================================================== */
.dashboard-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.form-section, 
.json-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 2rem;
    flex: 1 1 400px; /* Responsive flexbox */
    box-shadow: var(--shadow-sm);
}

.form-section h2,
.json-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

/* Form Inputs */
label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

input[type="text"],
input[type="url"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.875rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); /* Focus ring */
}

/* Live JSON Output Area */
.json-section {
    position: relative;
    display: flex;
    flex-direction: column;
}

pre {
    background-color: #1e1e1e; /* Standard IDE dark */
    color: #d4d4d4;
    padding: 1.5rem;
    border-radius: var(--border-radius-sm);
    overflow-x: auto;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    flex-grow: 1;
    margin-bottom: 1rem;
    border: 1px solid #000;
}

/* Footer */
.main-footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    border-top: 1px solid var(--border-color);
    margin-top: 3rem;
}