:root {
    --bg: #0f172a;
    --accent: #38bdf8;   
    --ai-purp: #a855f7;
    --glass: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
    --text: #f8fafc;
    --text-dim: #94a3b8;
}

body {
    background-color: var(--bg);
    background-image: radial-gradient(circle at 2px 2px, rgba(56, 189, 248, 0.05) 1px, transparent 0);
    background-size: 30px 30px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    margin: 0; padding: 20px;
    display: flex; justify-content: center;
}

.container { width: 100%; max-width: 1200px; position: relative; }

/* Fixed & Isolated Absolute Identity Management Wrapper */
.auth-container {
    position: absolute;
    top: 0; right: 0;
    display: flex; gap: 10px;
    z-index: 90;
}

.btn-login {
    background: transparent; color: var(--text);
    border: 1px solid var(--border); padding: 8px 16px;
    font-size: 0.85rem; border-radius: 8px;
}
.btn-signup {
    background: var(--ai-purp); color: white;
    padding: 8px 16px; font-size: 0.85rem; border-radius: 8px;
}
.btn-login:hover { background: rgba(255, 255, 255, 0.05); }
.btn-signup:hover { box-shadow: 0 5px 15px rgba(168, 85, 247, 0.4); }

/* Improved Functional Toolbar Layout block */
.header-block {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
    padding-right: 220px; /* Stop overlap protection rules against absolute auth UI */
}

.controls-toolbar {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.action-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 5px;
}

.input-group { display: flex; flex-direction: column; gap: 6px; }
label { font-size: 0.65rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; }

select, input {
    background: rgba(15, 23, 42, 0.8); border: 1px solid var(--border);
    color: white; padding: 10px; border-radius: 8px; outline: none; font-size: 0.85rem;
}
.scenario-select { border-color: var(--ai-purp); background: rgba(168, 85, 247, 0.1); }

/* Functional Utility Action Buttons Styling rules */
button {
    padding: 11px 20px; border-radius: 8px; border: none;
    cursor: pointer; font-weight: 600; transition: all 0.25s ease;
}
.btn-run { background: var(--accent); color: #0f172a; }
.btn-add { background: var(--border); color: white; border: 1px solid rgba(255,255,255,0.05); }
.btn-history { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-reset { background: transparent; color: #ef4444; border: 1px solid #ef4444; }

button:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(56, 189, 248, 0.2); }
.btn-add:hover { background: rgba(255, 255, 255, 0.15); }
.btn-history:hover { background: rgba(56, 189, 248, 0.1); }
.btn-reset:hover { background: rgba(239, 68, 68, 0.1); box-shadow: 0 5px 15px rgba(239, 68, 68, 0.15); }
button:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

.glass {
    background: var(--glass); backdrop-filter: blur(12px);
    border: 1px solid var(--border); border-radius: 16px;
    padding: 24px; margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.main-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 0.8rem; color: var(--text-dim); border-bottom: 1px solid var(--border); padding: 12px; }
td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.03); }
td input { padding: 6px; background: rgba(0,0,0,0.2); box-sizing: border-box; }
td input[type="number"] { width: 65px; }

.gantt-wrapper {
    display: flex; height: 60px; border-radius: 10px;
    overflow: hidden; background: rgba(0,0,0,0.3); margin-top: 15px;
    border: 1px solid var(--border);
}
.gantt-box {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: var(--accent); color: #0f172a; font-weight: bold; font-size: 0.75rem;
    border-right: 1px solid rgba(0,0,0,0.15); min-width: 0; width: 0;
    white-space: nowrap; overflow: hidden;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1); 
}

.ai-box {
    border-left: 4px solid var(--ai-purp); background: rgba(168, 85, 247, 0.06);
    padding: 16px; border-radius: 0 12px 12px 0; margin-bottom: 20px;
}
.chart-container { height: 250px; width: 100%; margin-top: 10px; }

/* Modal Box Structures */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.65); backdrop-filter: blur(8px);
    z-index: 100; justify-content: center; align-items: center;
}
.modal-content {
    width: 90%; max-width: 400px; position: relative;
    border-color: rgba(255, 255, 255, 0.15); background: rgba(30, 41, 59, 0.95);
}
.modal-close { position: absolute; top: 15px; right: 20px; color: var(--text-dim); font-size: 1.5rem; cursor: pointer; }
.modal-close:hover { color: white; }
.modal-input-group { display: flex; flex-direction: column; gap: 8px; }
.modal-input-group input { width: 100%; box-sizing: border-box; }

/* Custom Password Input relative inline positioning layout setups */
.pwd-wrapper {
    position: relative;
    display: flex;
    width: 100%;
}
.pwd-wrapper input {
    width: 100%;
    padding-right: 40px; /* Leave space so text doesn't flow behind the eye symbol */
    box-sizing: border-box;
}
.pwd-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    user-select: none;
    font-size: 1.1rem;
    z-index: 5;
    transition: transform 0.1s ease;
}
.pwd-toggle:active {
    transform: translateY(-50%) scale(0.85);
}

/* Custom Center Formatting Utilities */
.text-center {
    text-align: center;
}

/* Responsive Grid Adapters */
@media (max-width: 992px) {
    .main-grid { grid-template-columns: 1fr; }
    .header-block { padding-right: 0; margin-top: 60px; }
}