/* 
 * PROJECT: SEJM ROLEPLAY CEIDG
 * DATE: 2026-03-03
 * STYLE: Modern Government Portal (Based on gov.pl aesthetics)
 */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap");

/* =========================================
   1. VARIABLES & THEME
   ========================================= */
:root {
    /* Brand Colors */
    --primary: #DC143C;        /* Polish Red */
    --primary-dark: #b91c1c;
    --primary-light: #fff5f5;
    
    --secondary: #003399;      /* EU Blue */
    --secondary-dark: #1e3a8a;
    --secondary-light: #eff6ff;
    
    --accent: #FFD700;         /* Gold details */
    
    /* UI Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    /* Neutrals */
    --text-primary: #1e293b;   /* Slate 800 */
    --text-secondary: #475569; /* Slate 600 */
    --text-muted: #94a3b8;     /* Slate 400 */
    
    --bg-body: #f8fafc;        /* Slate 50 */
    --bg-surface: #ffffff;
    --bg-alt: #f1f5f9;         /* Slate 100 */
    
    --border-color: #e2e8f0;   /* Slate 200 */
    --border-hover: #cbd5e1;   /* Slate 300 */
    
    /* Spacing & Sizing */
    --container-width: 1200px;
    --header-height: auto;
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    
    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   2. GLOBAL RESET & BASE
   ========================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* =========================================
   3. LAYOUT STRUCTURE
   ========================================= */
.app-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

main {
    padding: 2rem 0;
    flex: 1;
}

/* =========================================
   4. HEADER COMPONENT
   ========================================= */
.main-header {
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 100;
}

/* Top Bar (Rzeczpospolita Polska) */
.header-top-bar {
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 0;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

.header-top-bar .container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.top-godlo {
    height: 16px; /* Coat of arms icon */
    width: auto;
    opacity: 0.8;
}

/* Header Main Content */
.header-content {
    padding: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-text h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0;
    line-height: 1;
    letter-spacing: -0.02em;
}

.brand-text p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
    font-weight: 500;
}

/* Navigation Bar */
.main-nav {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    display: flex;
    align-items: center;
    overflow-x: auto; /* Allow scroll on mobile */
    scrollbar-width: none;
    gap: 0.5rem;
}

.nav-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9375rem;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none !important;
}

.nav-item i {
    font-size: 1.1em;
    opacity: 0.7;
}

.nav-item:hover, .nav-item.active {
    color: var(--primary);
    background-color: var(--primary-light);
    border-bottom-color: var(--primary);
}

.admin-link {
    color: var(--danger);
}
.admin-link:hover {
    color: var(--danger);
    background-color: #fef2f2;
    border-bottom-color: var(--danger);
}

/* User Greeting / Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-greeting {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    background: var(--bg-alt);
    border-radius: 50px;
    border: 1px solid var(--border-color);
}

.greeting-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* =========================================
   5. LANDING PAGE
   ========================================= */
.landing-page {
    background-color: var(--bg-body);
}

.hero-section {
    position: relative;
    padding: 6rem 0 4rem;
    background: radial-gradient(circle at top right, rgba(220, 20, 60, 0.04), transparent 50%),
                radial-gradient(circle at bottom left, rgba(0, 51, 153, 0.04), transparent 50%);
    overflow: hidden;
}

/* Typography Overrides for Hero */
.display-4 { line-height: 1.1; letter-spacing: -0.02em; }
.lead { font-weight: 400; color: var(--text-secondary); }

.hero-stats {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.stat-item h3 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
    color: var(--secondary);
}

/* Features Grid */
.features-section {
    padding: 4rem 0;
    background-color: #fff;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-body);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    background: white;
    border-color: var(--border-hover);
}

.icon-wrapper {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.bg-blue-100 { background: #dbeafe; color: #2563eb; }
.bg-green-100 { background: #dcfce7; color: #16a34a; }
.bg-purple-100 { background: #f3e8ff; color: #9333ea; }
.bg-orange-100 { background: #ffedd5; color: #ea580c; }

/* Info Banner */
.info-banner {
    padding: 4rem 0;
    margin-bottom: -2rem; /* Pull footer closer */
}

.banner-content {
    background: linear-gradient(135deg, var(--secondary-dark), var(--secondary));
    color: white;
    padding: 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

/* =========================================
   6. UI COMPONENTS (Boostrap Overrides mostly)
   ========================================= */

/* Cards */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-body {
    padding: 1.5rem;
}

/* Buttons */
.btn {
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 0.01em;
}

.btn-primary {
    background-color: var(--secondary); /* Gov Blue as primary action */
    border-color: var(--secondary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-dark);
    border-color: var(--secondary-dark);
    color: white;
}

.btn-outline-primary {
    color: var(--secondary);
    border-color: var(--secondary);
}

.btn-outline-primary:hover {
    background-color: var(--secondary);
    color: white;
}

.btn-outline-secondary {
    color: var(--text-secondary);
    border-color: var(--border-color);
}
.btn-outline-secondary:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

/* Forms */
.form-control, .form-select {
    border-radius: var(--radius-md);
    border-color: var(--border-color);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1); /* Primary color glow */
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Tables */
.table {
    margin-bottom: 0;
}
.table thead th {
    background: var(--bg-alt);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    color: var(--text-primary);
    border-bottom-color: var(--border-color);
}

/* Badges */
.badge {
    padding: 0.5em 0.8em;
    font-weight: 600;
    border-radius: 4px;
    font-size: 0.75rem;
}

.bg-success { background-color: var(--success) !important; color: white; }
.bg-warning { background-color: var(--warning) !important; color: #78350f; }
.bg-danger { background-color: var(--danger) !important; color: white; }
.bg-secondary { background-color: var(--text-muted) !important; color: white; }

/* =========================================
   7. FOOTER
   ========================================= */
footer {
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    margin-top: auto;
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-align: center;
}

/* =========================================
   8. RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
        margin-top: 1rem;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .hero-section {
        padding: 3rem 0;
        text-align: center;
    }
}

