/**
 * MahaeJournal - Full-width website design
 * Same functionality as MahaJ, desktop-first layout
 */
:root {
    --primary: #b45309;
    --primary-light: #c2410c;
    --primary-dark: #92400e;
    --primary-soft: #fff7ed;
    --accent: #ea580c;
    --accent-soft: #ffedd5;
    --text: #1a1a1a;
    --text-soft: #4a4a4a;
    --muted: #6b6b6b;
    --border: #fed7aa;
    --surface: #ffffff;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #fef3e2;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* Full-width header - horizontal nav (dark orange) */
.site-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 0 24px;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
}

.site-logo img {
    height: 40px;
    width: auto;
}

.brand-name { font-size: 1.25rem; font-weight: 700; }
.brand-tagline { font-size: 0.75rem; opacity: 0.9; }

/* Main nav - horizontal links */
.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.main-nav a {
    color: rgba(255,255,255,0.95);
    text-decoration: none;
    padding: 12px 16px;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.main-nav a:hover {
    background: rgba(255,255,255,0.15);
    color: white;
}

.main-nav a.active {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* User dropdown area */
.header-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-user .user-name {
    font-size: 0.9rem;
    opacity: 0.95;
}

.btn-logout {
    padding: 8px 16px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.3);
    color: white;
}

/* Main content - full width container */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px;
    width: 100%;
}

/* Flash messages */
.flash {
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.flash-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.flash-error { background: #fff1f2; color: #991b1b; border: 1px solid #fecdd3; }

/* Cards */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.card-title { font-size: 1.25rem; font-weight: 700; margin: 0 0 8px 0; color: var(--text); }
.page-subtitle { font-size: 0.95rem; color: var(--muted); margin-bottom: 20px; }

/* Quick action grid - dashboard */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding: 24px 16px;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}

.action-item:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
    box-shadow: var(--shadow-md);
}

.action-item i { font-size: 2rem; margin-bottom: 12px; color: var(--primary); }
.action-item span { font-size: 0.95rem; font-weight: 600; color: var(--text-soft); }

/* Search container */
.search-container {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 28px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.search-input, .form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    margin-bottom: 16px;
}

.search-input:focus, .form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(180,83,9,0.2);
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    margin-bottom: 16px;
    background: var(--surface);
}

.form-label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 0.9rem; color: var(--text-soft); }
.instructions { color: var(--muted); font-size: 0.9rem; margin-top: 16px; line-height: 1.5; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, #2d4a6f 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(180,83,9,0.35);
}

.btn-block { width: 100%; }

/* Judgement cards */
.judgement-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    border-left: 4px solid var(--primary);
    border: 1px solid var(--border);
    border-left-width: 4px;
    box-shadow: var(--shadow);
}

.judgement-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.judgement-meta span { font-size: 0.8rem; color: var(--primary); font-weight: 500; }
.judgement-parties { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.judgement-parties .vs { font-weight: 500; color: var(--muted); margin: 0 4px; }
.summary-section { margin-bottom: 12px; }
.summary-label { font-weight: 600; font-size: 0.85rem; margin-bottom: 4px; }
.summary-text { font-size: 0.9rem; color: var(--text-soft); line-height: 1.5; }

.btn-view {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white !important;
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.2s;
}

.btn-view:hover { color: white !important; box-shadow: 0 4px 12px rgba(180,83,9,0.4); }

/* Pagination */
.pagination-nav { display: flex; justify-content: center; gap: 12px; margin: 24px 0; }
.pagination-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
}
.pagination-btn:disabled { background: var(--border); color: var(--muted); cursor: not-allowed; opacity: 0.7; }

/* Empty state */
.empty-state { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty-state i { font-size: 3rem; margin-bottom: 16px; opacity: 0.4; }

/* Auth pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-card {
    max-width: 420px;
    width: 100%;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.auth-card .logo { width: 72px; height: 72px; margin: 0 auto 20px; display: block; }
.auth-card .form-group { margin-bottom: 20px; }
.auth-card input { width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 1rem; }
.auth-card input:focus { outline: none; border-color: var(--primary); }
.auth-link { color: var(--primary); font-weight: 600; text-decoration: none; }
.auth-link:hover { text-decoration: underline; }

.results-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 16px; }
.results-count { color: var(--muted); font-weight: 500; font-size: 0.9rem; }
