:root {
    --bg-base: #09090b;
    --bg-panel: rgba(24, 24, 27, 0.7);
    --bg-hover: rgba(39, 39, 42, 0.8);

    --border-light: rgba(63, 63, 70, 0.5);

    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;

    --primary: #10b981;
    /* emerald 500 */
    --primary-hover: #059669;
    /* emerald 600 */
    --primary-op: rgba(16, 185, 129, 0.2);

    --radius-xl: 16px;
    --radius-lg: 12px;
    --radius-md: 8px;
}

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
}

/* Utils */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-1 {
    flex: 1;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.h-screen {
    height: 100vh;
}

.w-4 {
    width: 1rem;
}

.h-4 {
    height: 1rem;
}

.w-5 {
    width: 1.25rem;
}

.h-5 {
    height: 1.25rem;
}

.w-6 {
    width: 1.5rem;
}

.h-6 {
    height: 1.5rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.pb-8 {
    padding-bottom: 2rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.pr-2 {
    padding-right: 0.5rem;
}

.hidden {
    display: none !important;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.z-10 {
    z-index: 10;
}

.z-50 {
    z-index: 50;
}

.min-h-0 {
    min-height: 0;
}

.overflow-hidden {
    overflow: hidden;
}

.overflow-y-auto {
    overflow-y: auto;
}

.break-all {
    word-break: break-all;
}

.text-center {
    text-align: center;
}

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

.font-semibold {
    font-weight: 600;
}

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

.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

.text-xl {
    font-size: 1.25rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-base {
    font-size: 1rem;
}

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

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

.text-white {
    color: #fff;
}

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

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

.text-red-400 {
    color: #f87171;
}

.bg-black\/50 {
    background-color: rgba(0, 0, 0, 0.5);
}

.bg-black\/30 {
    background-color: rgba(0, 0, 0, 0.3);
}

.bg-gray-900 {
    background-color: #111827;
}

.bg-primary\/20 {
    background-color: var(--primary-op);
}

.backdrop-blur-sm {
    backdrop-filter: blur(4px);
}

.rounded-full {
    border-radius: 9999px;
}

.rounded-xl {
    border-radius: var(--radius-xl);
}

.rounded-2xl {
    border-radius: 24px;
}

.border {
    border-width: 1px;
    border-style: solid;
}

.border-b {
    border-bottom-width: 1px;
    border-style: solid;
    border-color: inherit;
}

.border-light {
    border-color: var(--border-light);
}

.border-t {
    border-top-width: 1px;
    border-style: solid;
    border-color: inherit;
}

.border-r-0 {
    border-right-width: 0 !important;
}

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.transition-transform {
    transition-property: transform;
    transition-duration: 0.2s;
}

.scale-95 {
    transform: scale(0.95);
}

.scale-100 {
    transform: scale(1);
}

.opacity-0 {
    opacity: 0;
}

.opacity-100 {
    opacity: 1;
    transition: opacity 0.2s;
}

.uppercase {
    text-transform: uppercase;
}

.tracking-wider {
    letter-spacing: 0.05em;
}

/* Components */
.glass-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-light);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-xl);
}

.card {
    padding: 1.5rem;
    border-radius: var(--radius-xl);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    outline: none;
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-primary {
    background: var(--primary);
    color: #000;
}

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

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

.btn-outline:hover {
    background: var(--bg-hover);
    border-color: var(--text-muted);
}

.section-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.code-editor {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-light);
    color: var(--text-main);
    resize: none;
}

.code-editor:focus {
    border-color: var(--primary);
}

/* Job List Item */
.job-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-light);
    padding: 1rem;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.job-card:hover {
    border-color: var(--primary);
    background: var(--bg-hover);
}

.job-card.active {
    border-color: var(--primary);
    background: var(--primary-op);
}

.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

/* Timeline Grid */
.time-axis {
    display: flex;
}

.hour-marker {
    flex: 1;
    border-right: 1px dashed var(--border-light);
    position: relative;
}

.hour-label {
    position: absolute;
    bottom: -1.75rem;
    left: 0;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

/* Timeline Track */
.track-row {
    height: 32px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    position: relative;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.track-row.hovered {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
}

.run-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 6px;
    border-radius: 3px;
    transform: translateX(-50%);
    box-shadow: 0 0 8px currentColor;
    opacity: 0.8;
}

.run-marker:hover {
    opacity: 1;
    z-index: 10;
    transform: translateX(-50%) scale(1.5);
}

.run-segment {
    position: absolute;
    top: 8px;
    bottom: 8px;
    border-radius: 4px;
    opacity: 0.4;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}