:root {
    --primary: #EF4444;
    /* Danger/Alert Primary */
    --primary-hover: #DC2626;
    --accent: #3B82F6;
    /* Blue Accent */
    --accent-hover: #2563EB;

    --bg-base: #020617;
    /* Slate 950 */
    --bg-surface: #0F172A;
    /* Slate 900 */
    --bg-surface-light: #1E293B;
    /* Slate 800 */

    --text-main: #F8FAFC;
    --text-muted: #94A3B8;

    --border: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.2);

    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;

    --font: 'Inter', system-ui, sans-serif;

    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;

    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
}

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

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font);
    line-height: 1.5;
    height: 100vh;
    overflow: hidden;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(239, 68, 68, 0.05) 0%, transparent 40%);
}

.text-muted {
    color: var(--text-muted);
}

.text-danger {
    color: var(--danger);
}

.text-success {
    color: var(--success);
}

.text-accent {
    color: var(--accent);
}

.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

.font-medium {
    font-weight: 500;
}

.font-bold {
    font-weight: 700;
}

.mt-auto {
    margin-top: auto;
}

.mt-xs {
    margin-top: var(--space-xs);
}

.mt-sm {
    margin-top: var(--space-sm);
}

.mt-md {
    margin-top: var(--space-md);
}

.mt-lg {
    margin-top: var(--space-lg);
}

.mb-md {
    margin-bottom: var(--space-md);
}

.hidden {
    display: none !important;
}

/* App Layout */
.app-wrap {
    display: flex;
    height: 100vh;
    width: 100vw;
}

.glass-panel {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
}

.glass-panel-inner {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--space-md);
}

/* Sidebar */
.sidebar {
    width: 300px;
    display: flex;
    flex-direction: column;
    padding: var(--space-lg) var(--space-md);
    border-right: 1px solid var(--border);
    border-top: none;
    border-bottom: none;
    border-left: none;
    border-radius: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 0 var(--space-sm);
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

.sidebar-header h2 {
    font-size: 1.25rem;
    line-height: 1.1;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #94A3B8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
    padding: 0 var(--space-sm);
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px var(--space-sm);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--accent);
}

.nav-item-progress {
    font-size: 0.7rem;
    background: var(--bg-surface-light);
    padding: 2px 6px;
    border-radius: 12px;
    color: var(--text-muted);
}

.nav-item.active .nav-item-progress {
    background: var(--accent);
    color: white;
}

.action-card h3 {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: all 0.2s;
}

.btn i {
    width: 16px;
    height: 16px;
}

.full-width {
    width: 100%;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-strong);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-text {
    background: transparent;
}

.btn-text:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.topbar {
    padding: var(--space-lg) var(--space-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
}

.topbar-left h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.progress-container {
    width: 250px;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: var(--bg-surface-light);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.workspace {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-xl);
}

.workspace::-webkit-scrollbar {
    width: 8px;
}

.workspace::-webkit-scrollbar-track {
    background: transparent;
}

.workspace::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 4px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    gap: 16px;
}

.empty-icon {
    width: 64px;
    height: 64px;
    opacity: 0.5;
}

.empty-state h2 {
    font-size: 1.5rem;
}

/* Checklist Items */
.checklist-container {
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 100px;
}

.section-block {
    margin-bottom: var(--space-xl);
}

.section-header {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.section-header h2 {
    font-size: 1.25rem;
    color: var(--text-main);
}

.section-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.item-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.check-item {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    transition: all 0.2s;
}

.check-item:hover {
    border-color: var(--border-strong);
    background: var(--bg-surface-light);
}

.check-item.completed {
    border-color: rgba(16, 185, 129, 0.3);
    /* Success border */
    background: rgba(16, 185, 129, 0.05);
}

.item-main {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

/* Custom Checkbox */
.checkbox-wrap {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.checkbox-wrap input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 24px;
    width: 24px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: all 0.2s;
}

.checkbox-wrap input:checked~.checkmark {
    background-color: var(--success);
    border-color: var(--success);
    color: var(--bg-base);
}

.checkmark svg {
    width: 16px;
    height: 16px;
}

.item-content {
    flex: 1;
}

.item-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
    color: var(--text-main);
    transition: color 0.2s;
}

.check-item.completed .item-title {
    color: var(--text-muted);
    text-decoration: line-through;
}

.item-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 12px;
}

.item-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: color 0.2s;
}

.action-btn:hover {
    color: var(--accent);
}

.action-btn.has-data {
    color: var(--accent);
    font-weight: 500;
}

.action-btn svg {
    width: 14px;
    height: 14px;
}


/* Expandable Areas */
.expandable-area {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.input-pill {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    color: var(--text-main);
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 0.8rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.input-pill:focus {
    border-color: var(--accent);
}

.textarea-pill {
    width: 100%;
    min-height: 60px;
    resize: vertical;
}

/* Print Only Styles */
.print-only {
    display: none;
}

@media print {
    .noprint {
        display: none !important;
    }

    .print-only {
        display: block !important;
    }

    body {
        background: white !important;
        color: black !important;
        height: auto;
        overflow: visible;
    }

    .print-layout {
        padding: 2cm;
        font-family: 'Inter', sans-serif;
    }

    .print-header {
        border-bottom: 2px solid #ccc;
        padding-bottom: 20px;
        margin-bottom: 30px;
    }

    .print-header h1 {
        font-size: 24pt;
        margin-bottom: 5px;
        color: #111;
    }

    .print-header p {
        color: #555;
    }

    .print-section {
        margin-bottom: 30px;
        page-break-inside: avoid;
    }

    .print-section h2 {
        font-size: 16pt;
        color: #333;
        border-bottom: 1px solid #eee;
        padding-bottom: 5px;
        margin-bottom: 15px;
    }

    .print-item {
        display: flex;
        margin-bottom: 10px;
        break-inside: avoid;
        align-items: flex-start;
    }

    .print-status {
        width: 30px;
        font-weight: bold;
        font-size: 14pt;
    }

    .print-status.done {
        color: #10B981;
    }

    .print-status.pending {
        color: #EF4444;
    }

    .print-title {
        font-weight: bold;
        font-size: 11pt;
    }

    .print-evidence {
        font-size: 10pt;
        color: #666;
        font-style: italic;
        margin-top: 2px;
    }
}