:root {
    --bg-dark: #0a0f1d;
    --card-bg: #131d33;
    --card-border: #1e293b;
    --accent-emerald: #10b981;
    --accent-glow: rgba(16, 185, 129, 0.25);
    --sloth-gold: #f59e0b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --danger: #ef4444;
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Header */
header {
    background: rgba(19, 29, 51, 0.7);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-icon {
    font-size: 2.2rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    box-shadow: 0 0 20px var(--accent-glow);
    animation: gentleBreathe 4s ease-in-out infinite alternate;
}

@keyframes gentleBreathe {
    0% { transform: scale(1); filter: brightness(1); }
    100% { transform: scale(1.05); filter: brightness(1.2); }
}

.brand-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-badge {
    font-size: 0.65rem;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 20px;
    background: rgba(245, 158, 11, 0.15);
    color: var(--sloth-gold);
    border: 1px solid rgba(245, 158, 11, 0.3);
    font-weight: 600;
}

.brand-text p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.system-badges {
    display: flex;
    gap: 10px;
    align-items: center;
}

.pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    padding: 6px 12px;
    border-radius: 20px;
    background: #1e293b;
    border: 1px solid #334155;
    color: var(--text-secondary);
}

.pill-badge.active {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

/* Layout */
.main-wrapper {
    max-width: 1300px;
    margin: 2rem auto;
    padding: 0 2rem;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Hero Control Panel */
.hero-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #10b981, #f59e0b, #3b82f6);
}

.path-input-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.input-group {
    flex: 1;
    min-width: 280px;
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.path-input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    background: #0d1527;
    border: 1px solid #23314d;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: 'Consolas', monospace;
    outline: none;
    transition: var(--transition);
}

.path-input:focus {
    border-color: var(--accent-emerald);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
    text-decoration: none;
}

.btn-secondary {
    background: #1e293b;
    color: var(--text-primary);
    border: 1px solid #334155;
}

.btn-secondary:hover {
    background: #27354a;
    border-color: #475569;
}

.btn-primary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #34d399, #10b981);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Sloth Mascot Status Bar */
.sloth-status-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #0d1527;
    border: 1px solid #1a243a;
    border-radius: var(--radius-md);
    padding: 12px 18px;
}

.sloth-avatar {
    font-size: 2rem;
    animation: gentleFloat 3s ease-in-out infinite;
}

@keyframes gentleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.sloth-status-text {
    flex: 1;
}

.sloth-status-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--sloth-gold);
    display: flex;
    align-items: center;
    gap: 6px;
}

.sloth-status-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* Toggles */
.options-row {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding-top: 4px;
    flex-wrap: wrap;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.toggle-label input[type="checkbox"] {
    accent-color: var(--accent-emerald);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Tabs */
.tabs-nav {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 4px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
    color: #34d399;
    font-weight: 600;
    border-bottom: 2px solid var(--accent-emerald);
    background: rgba(16, 185, 129, 0.08);
}

/* Content Area */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Table Card */
.content-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.table-responsive {
    overflow-x: auto;
}

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

th {
    padding: 12px 16px;
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 1px solid var(--card-border);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-voice { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.badge-finance { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-code { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-doc { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-media { background: rgba(236, 72, 153, 0.15); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.3); }
.badge-data { background: rgba(20, 184, 166, 0.15); color: #2dd4bf; border: 1px solid rgba(20, 184, 166, 0.3); }

/* Morning Digest Card */
.digest-container {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .digest-container {
        grid-template-columns: 1fr;
    }
}

.digest-main {
    background: #0d1527;
    border: 1px solid #1e293b;
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
}

.digest-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #1e293b;
    padding-bottom: 1.25rem;
    margin-bottom: 1.5rem;
}

.digest-greeting h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.digest-greeting p {
    color: var(--sloth-gold);
    font-size: 0.9rem;
}

.digest-audio-player {
    background: #131d33;
    border: 1px solid #23314d;
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 14px;
}

audio {
    width: 100%;
    outline: none;
    border-radius: 20px;
}

.digest-body {
    font-size: 1rem;
    line-height: 1.7;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
}

.digest-stats-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-box {
    background: #0d1527;
    border: 1px solid #1e293b;
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.stat-val {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent-emerald);
}

/* Comparison Table */
.manifesto-table {
    margin-top: 1rem;
}

.manifesto-table th {
    background: #0d1527;
}

.open-check {
    color: var(--accent-emerald);
    font-weight: 600;
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

/* Footer */
footer {
    border-top: 1px solid var(--card-border);
    padding: 1.5rem 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: auto;
}

footer a {
    color: var(--accent-emerald);
    text-decoration: none;
}
