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

:root {
    /* Clean MediaLinkers Corporate Palette */
    --bg-base: #0b0f17;
    --bg-surface: #111827;
    --bg-surface-elevated: #1a2233;
    --bg-surface-active: #222d42;

    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-medium: rgba(255, 255, 255, 0.12);
    --border-strong: rgba(255, 255, 255, 0.2);

    /* MediaLinkers Brand Teal */
    --brand-teal: #0fa38c;
    --brand-teal-hover: #0c8875;
    --brand-teal-light: rgba(15, 163, 140, 0.12);
    --brand-teal-border: rgba(15, 163, 140, 0.3);

    --primary: var(--brand-teal);
    --primary-hover: var(--brand-teal-hover);
    --primary-light: var(--brand-teal-light);

    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.1);
    --success-border: rgba(16, 185, 129, 0.25);

    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.1);
    --warning-border: rgba(245, 158, 11, 0.25);

    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.1);
    --danger-border: rgba(239, 68, 68, 0.25);

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.6);
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.55;
    min-height: 100vh;
}

a {
    color: var(--brand-teal);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover {
    color: #2dd4bf;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 270px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 10;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-y: auto;
}

.topbar {
    height: 68px;
    padding: 0 2rem;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 9;
}

.content-body {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Brand Section */
.brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.5rem 0.5rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 1.25rem;
}

.brand-logo {
    max-height: 38px;
    width: auto;
    display: block;
    margin-bottom: 0.5rem;
    background: #ffffff;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
}

.brand-subtitle {
    font-size: 0.72rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

/* Navigation */
.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.15s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
}

.nav-link.active {
    background: var(--brand-teal-light);
    color: #2dd4bf;
    font-weight: 600;
    border: 1px solid var(--brand-teal-border);
}

.nav-icon {
    font-size: 1.05rem;
    width: 20px;
    display: flex;
    justify-content: center;
}

/* User profile section in sidebar */
.user-widget {
    padding: 0.9rem;
    background: var(--bg-surface-elevated);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    margin-top: auto;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    background: #243147;
    border: 1px solid var(--border-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: #2dd4bf;
}

.user-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-main);
}

.user-role {
    font-size: 0.68rem;
    color: var(--brand-teal);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
    border-top: 1px solid var(--border-subtle);
    padding-top: 0.65rem;
}

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

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

.card-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* Stat Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-content h3 {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-main);
}

.stat-content p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
    font-weight: 500;
}

.stat-badge-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1.15rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
    text-decoration: none;
    line-height: 1.2;
}

.btn-sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
}

.btn-primary {
    background: var(--brand-teal);
    color: #ffffff;
}
.btn-primary:hover {
    background: var(--brand-teal-hover);
    color: #ffffff;
}

.btn-secondary {
    background: var(--bg-surface-elevated);
    color: var(--text-main);
    border: 1px solid var(--border-medium);
}
.btn-secondary:hover {
    background: var(--bg-surface-active);
    color: #ffffff;
}

.btn-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid var(--warning-border);
}
.btn-warning:hover {
    background: #f59e0b;
    color: #111827;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid var(--danger-border);
}
.btn-danger:hover {
    background: var(--danger);
    color: #ffffff;
}

.btn-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid var(--success-border);
}
.btn-success:hover {
    background: var(--success);
    color: #ffffff;
}

/* Badges / Status Pills (Subdued, Clean) */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-locked {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-unlocked {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-pending {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.badge-primary {
    background: var(--brand-teal-light);
    color: #2dd4bf;
    border: 1px solid var(--brand-teal-border);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

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

.table th {
    background: var(--bg-surface-elevated);
    color: var(--text-muted);
    font-weight: 600;
    padding: 0.8rem 1.15rem;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-subtle);
}

.table td {
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-main);
    vertical-align: middle;
}

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

.table tr:hover td {
    background: rgba(255, 255, 255, 0.015);
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.15rem;
}

.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.65rem 0.9rem;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.15s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-teal);
    box-shadow: 0 0 0 2px var(--brand-teal-light);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* Alerts */
.alert {
    padding: 0.9rem 1.15rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.88rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #fcd34d;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fda4af;
}

.alert-info {
    background: var(--brand-teal-light);
    border: 1px solid var(--brand-teal-border);
    color: #2dd4bf;
}

/* Modals */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1.5rem;
}

.modal-backdrop.active {
    display: flex;
}

.modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
}
.modal-close:hover {
    color: var(--text-main);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.1rem 1.5rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    background: rgba(0, 0, 0, 0.15);
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
}

/* Developer Checklist */
.checklist-container {
    max-width: 820px;
    margin: 2.5rem auto;
    padding: 0 1.25rem;
}

.checklist-hero {
    text-align: center;
    margin-bottom: 2rem;
}

.checklist-hero h1 {
    font-size: 1.85rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
    color: var(--text-main);
}

.checklist-hero p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.checklist-item-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.15rem 1.35rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: border-color 0.15s ease;
}

.checklist-item-card:hover {
    border-color: var(--border-medium);
}

.checklist-item-card.is-checked {
    border-color: var(--brand-teal-border);
    background: rgba(15, 163, 140, 0.03);
}

.custom-checkbox {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 5px;
    border: 2px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    background: var(--bg-surface-elevated);
    font-size: 0.8rem;
    font-weight: 700;
}

.custom-checkbox.checked {
    background: var(--brand-teal);
    border-color: var(--brand-teal);
    color: white;
}

.item-content {
    flex: 1;
}

.item-title {
    font-weight: 600;
    font-size: 0.96rem;
    margin-bottom: 0.2rem;
    color: var(--text-main);
}

.item-desc {
    font-size: 0.83rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.token-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    color: #2dd4bf;
}

.copy-btn {
    cursor: pointer;
    background: none;
    border: none;
    color: var(--brand-teal);
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    transition: background 0.15s ease;
}
.copy-btn:hover {
    background: var(--brand-teal-light);
}

.progress-bar-container {
    background: var(--bg-surface-elevated);
    border-radius: var(--radius-full);
    height: 8px;
    width: 100%;
    overflow: hidden;
    margin: 0.75rem 0;
}

.progress-bar-fill {
    background: var(--brand-teal);
    height: 100%;
    transition: width 0.3s ease;
}

/* SweetAlert2 Styling */
.swal2-container {
    backdrop-filter: blur(5px) !important;
}

.swal2-popup.custom-swal-popup {
    background: #111827 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 16px !important;
    color: #f8fafc !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8) !important;
    padding: 2rem 1.75rem !important;
}

.swal2-title.custom-swal-title {
    color: #f8fafc !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    margin-bottom: 0.5rem !important;
}

.swal2-html-container.custom-swal-html {
    color: #94a3b8 !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 0.92rem !important;
    line-height: 1.5 !important;
    margin: 0 0 1.25rem 0 !important;
}

.swal2-actions {
    gap: 0.6rem !important;
    width: 100% !important;
    justify-content: center !important;
}

.swal2-confirm.custom-swal-confirm {
    background: var(--danger) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 600 !important;
    font-size: 0.88rem !important;
    padding: 0.65rem 1.4rem !important;
    border: none !important;
    cursor: pointer !important;
}

.swal2-confirm.custom-swal-submit {
    background: var(--brand-teal) !important;
}

.swal2-cancel.custom-swal-cancel {
    background: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 8px !important;
    color: #cbd5e1 !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 600 !important;
    font-size: 0.88rem !important;
    padding: 0.65rem 1.4rem !important;
    cursor: pointer !important;
}

@media (max-width: 900px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    .topbar {
        padding: 0 1rem;
    }
    .content-body {
        padding: 1rem;
    }
}
