@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* Professional Modern Wapka CSS Design System */
:root {
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Theme Colors */
    --bg-color: #0b0d14;
    --text-color: #e2e8f0;
    --text-muted: #8a94a6;
    
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --accent-color: #22d3ee;
    --accent-hover: #08b6d4;
    
    --card-bg: #141724;
    --border-color: #222638;
    --workspace-bg: #191c2b;
    
    --header-bg: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    --header-text: #ffffff;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #22d3ee 100%);
    
    --success-color: #10b981;
    --danger-color: #f43f5e;
    
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: light) {
    :root {
        --bg-color: #f3f4f6;
        --text-color: #1f2937;
        --text-muted: #6b7280;
        
        --primary-color: #4f46e5;
        --primary-hover: #3730a3;
        --accent-color: #0891b2;
        --accent-hover: #0e7490;
        
        --card-bg: #ffffff;
        --border-color: #e5e7eb;
        --workspace-bg: #f9fafb;
        
        --header-bg: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
        --header-text: #ffffff;
        --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.03);
    }
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px 10px;
    max-width: 900px;
    margin: 0 auto;
    -webkit-font-smoothing: antialiased;
}

/* Header bar styled like a premium portal */
.header {
    background: var(--header-bg);
    color: var(--header-text);
    padding: 24px 20px;
    text-align: center;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    box-shadow: var(--shadow);
    border-bottom: 2px solid var(--accent-color);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.header h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.header .subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
}

.header .subtitle strong {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
}

.content {
    margin-top: 16px;
}

/* Cards & Sections */
.card, .pm-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card h3, .pm-card h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Workspace Navigation Bar */
.workspace-bar {
    background-color: var(--workspace-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 12px 18px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-color);
    box-shadow: var(--shadow-sm);
}

.workspace-bar strong {
    color: var(--text-color);
    font-weight: 600;
}

.workspace-bar a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.workspace-bar a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Form Styles */
.form-group {
    margin-bottom: 16px;
}

.form-group label, label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 0.92rem;
    font-family: var(--font-body);
    box-shadow: var(--shadow-sm) inset;
    transition: var(--transition);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-heading);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--card-bg);
    color: var(--text-color);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    background-color: var(--border-color);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary, .btn-save {
    background: var(--accent-gradient);
    border: none;
    color: #ffffff;
}

.btn-primary:hover, .btn-save:hover {
    opacity: 0.95;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

.btn-danger {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #e11d48;
    box-shadow: 0 0 12px rgba(244, 63, 94, 0.4);
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

/* Lists and Lists items - retro-styled striped list modernized */
ul.striped-list {
    list-style: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

ul.striped-list li {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--card-bg);
    transition: var(--transition);
}

ul.striped-list li:last-child {
    border-bottom: none;
}

ul.striped-list li:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

@media (prefers-color-scheme: light) {
    ul.striped-list li:hover {
        background-color: rgba(0, 0, 0, 0.01);
    }
}

/* Site Manager Sub-Navigation */
.site-nav-container {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
    box-shadow: var(--shadow-sm);
}

.site-nav-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.site-nav-breadcrumbs {
    padding: 14px 0 4px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.site-nav-breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.site-nav-breadcrumbs a:hover {
    text-decoration: underline;
}

.site-nav-links {
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
}

.site-nav-links a {
    padding: 12px 16px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.site-nav-links a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

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

/* Statistics Grid */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.stat-box {
    background: var(--workspace-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-box:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.stat-num {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent-color);
}

.stat-lbl {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Modules row styling */
.module-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.module-row:last-child {
    border-bottom: none;
}

.toggle-btn {
    padding: 8px 18px;
    border-radius: 6px;
    border: none;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.toggle-on {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.toggle-on:hover {
    background-color: rgba(16, 185, 129, 0.25);
}

.toggle-off {
    background-color: rgba(138, 148, 166, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(138, 148, 166, 0.2);
}

.toggle-off:hover {
    background-color: rgba(138, 148, 166, 0.2);
}

.theme-card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    transition: var(--transition);
}

.theme-active {
    border-color: var(--primary-color);
    background-color: rgba(99, 102, 241, 0.08);
}

/* Footer style */
.footer {
    text-align: center;
    margin-top: 32px;
    font-size: 0.85rem;
    padding: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

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

/* Alerts */
.alert, .alert-ok, .alert-err {
    padding: 12px 18px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert-success, .alert-ok {
    background-color: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success-color);
}

.alert-danger, .alert-err {
    background-color: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.3);
    color: var(--danger-color);
}
