:root {
    --primary: #007bff;
    --primary-hover: #0056b3;
    --bg-color: #f4f6f9;
    --card-bg: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --error-color: #ef4444;
    --success-color: #10b981;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-color);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* 3-COLUMN DASHBOARD LAYOUT */
.dashboard-container {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 100%;
    /* FULL WIDTH */
    height: 98vh;
    /* Taller */
    padding: 0.5rem;
    /* Minimal padding */
    gap: 0.5rem;
    /* Minimal gap */
    box-sizing: border-box;
    align-items: stretch;
}

/* Column Wrappers - 30/43/27 split with 0.5rem gap */
.col-deploy {
    flex: 0 0 calc(30% - 0.35rem);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.col-config {
    flex: 0 0 calc(43% - 0.35rem);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.col-controls {
    flex: 0 0 calc(27% - 0.35rem);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

/* CARDS */
.card {
    background: var(--card-bg);
    border-radius: 8px;
    /* Slightly tighter radius */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    /* Tighter padding */
    box-sizing: border-box;
    width: 100%;
}

.full-height-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Deploy Card Specifics */
.card-header {
    text-align: center;
    margin-bottom: 1rem;
}

.card-header h1 {
    font-size: 1.5rem;
    margin: 0.5rem 0 0 0;
    color: var(--text-primary);
}

.icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.5rem;
    animation: float 3s ease-in-out infinite;
}

.upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 1rem;
    background-color: #fafafa;
}

.upload-area.drag-over {
    background-color: #eff6ff;
    border-color: var(--primary);
}

.upload-area.has-file {
    background-color: #f0fdf4;
    border-color: var(--success-color);
    border-style: solid;
}

.upload-content p {
    margin: 0.5rem 0 0 0;
    color: var(--text-secondary);
}

.upload-icon {
    font-size: 2.5rem;
    color: #cbd5e1;
    display: block;
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn-primary {
    width: 100%;
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-bottom: 1rem;
}

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

.btn-primary:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Progress & Status */
.progress-container {
    background-color: #e5e7eb;
    border-radius: 9999px;
    height: 8px;
    width: 100%;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-bar {
    background-color: var(--primary);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}

.status-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 1rem;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #d1d5db;
}

.status-indicator.active {
    background-color: #f59e0b;
}

.status-indicator.success {
    background-color: var(--success-color);
}

.status-indicator.error {
    background-color: var(--error-color);
}

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

/* Terminals */
.terminal-window {
    background-color: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.flex-grow-terminal {
    flex-grow: 1;
    min-height: 200px;
    /* Minimum height for build logs */
}

.terminal-header {
    background-color: #2d2d2d;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    display: inline-block;
}

.dot.red {
    background-color: #ff5f56;
}

.dot.yellow {
    background-color: #ffbd2e;
}

.dot.green {
    background-color: #27c93f;
}

.terminal-title {
    color: #9ca3af;
    font-size: 0.8rem;
    margin-left: 1rem;
}

.terminal-body {
    padding: 1rem;
    overflow-y: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    color: #d4d4d4;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.5;
    flex: 1;
    /* Grow to fill remaining terminal space */
}

.log-line {
    margin-bottom: 2px;
}

.log-line.text-muted {
    color: #6b7280;
}

.error-message {
    color: var(--error-color);
    text-align: center;
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Config & Controls Specifics */
.control-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    gap: 0.75rem;
}

.control-header h2 {
    font-size: 1.25rem;
    margin: 0;
    color: var(--text-primary);
}

.control-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.editor-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 300px;
}

.code-editor {
    flex-grow: 1;
    width: 100%;
    background-color: #1e1e1e;
    color: #d4d4d4;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    padding: 1rem;
    border: 1px solid #333;
    border-radius: 8px;
    resize: none;
    /* Disable resizing since we flex */
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
}

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

/* Responsive Breakpoints */
@media (max-width: 1200px) {
    .dashboard-container {
        flex-direction: column;
        height: auto;
    }

    .col-deploy,
    .col-config,
    .col-controls {
        flex: auto;
        width: 100%;
    }

    .full-height-card {
        height: auto;
    }

    .flex-grow-terminal {
        height: 300px;
    }

    .editor-container {
        height: 400px;
    }
}