:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --sidebar-bg: #0f172a;
    --sidebar-hover: #1e293b;
    --card-bg: #ffffff;
    --body-bg: #f8fafc;
    --text-primary: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
}

body {
    background-color: var(--body-bg);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

.app-sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: #94a3b8;
    flex-shrink: 0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.app-sidebar .sidebar-brand {
    padding: 1.5rem 1.25rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid #1e293b;
    text-decoration: none;
}

.app-sidebar .nav-link {
    color: #94a3b8;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 0.375rem;
    margin: 0.2rem 0.75rem;
    transition: all 0.2s;
}

.app-sidebar .nav-link:hover,
.app-sidebar .nav-link.active {
    color: #ffffff;
    background-color: var(--sidebar-hover);
}

.app-sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: #ffffff;
}

.app-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.app-topbar {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-main {
    flex: 1;
}

/* Cards & Stats */
.stat-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.25rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

/* Gauge & Score Visualizer */
.readiness-gauge {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 2rem;
    font-weight: 700;
}

/* Table Enhancements */
.card-table {
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
    background: #fff;
}

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

.table td {
    padding: 0.9rem 1rem;
    vertical-align: middle;
}

/* Badges */
.badge-ready { background-color: #d1fae5; color: #065f46; font-weight: 600; }
.badge-warning { background-color: #fef3c7; color: #92400e; font-weight: 600; }
.badge-danger { background-color: #fee2e2; color: #991b1b; font-weight: 600; }

/* Custom Code Block & Previews */
.code-preview-box {
    background-color: #1e293b;
    color: #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.875rem;
    max-height: 400px;
    overflow-y: auto;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1090;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .app-sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        bottom: 0;
    }
    .app-sidebar.show {
        left: 0;
    }
}
