/* =========================================
   1. STANDARD BLAZOR STYLES
   ========================================= */
   html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    height: 100%;
}

h1:focus { outline: none; }

a, .btn-link { color: #0071c1; }

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content { padding-top: 1.1rem; }

.valid.modified:not([type=checkbox]) { outline: 1px solid #26b050; }
.invalid { outline: 1px solid red; }
.validation-message { color: red; }
/* =========================================
   0. LOADING SPINNER (Restored)
   ========================================= */
   .loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #1b6ec2;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

/* Error UI */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* =========================================
   2. APP LAYOUT (Header & Main)
   ========================================= */
.app-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 20px;
    height: 60px;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    font-family: 'Segoe UI', sans-serif;
}

.current-project-label {
    margin-right: 15px;
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-icon {
    font-size: 1.5rem;
    color: #333;
    text-decoration: none;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
}

.settings-icon:hover {
    transform: rotate(45deg);
    color: #0078d4;
}

/* =========================================
   3. TREE & TASK UI
   ========================================= */
.tree-container {
    display: flex;
    gap: 20px;
    padding: 20px;
    height: calc(100vh - 80px);
    background-color: #f4f7f6;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Sidebar */
.phase-sidebar {
    width: 300px;
    flex-shrink: 0;
    overflow-y: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    padding: 15px;
}

.phase-header {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-weight: bold;
}

.phase-item {
    padding: 15px;
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.phase-item:hover {
    border-color: #0078d4;
    background-color: #f0f8ff;
}

.phase-item.active {
    background-color: #0078d4;
    color: white;
    border-color: #0078d4;
    box-shadow: 0 4px 10px rgba(0, 120, 212, 0.3);
}

/* Detail Area */
.detail-area {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0 20px;
}

/* Task Cards */
.task-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    border-left: 5px solid #ddd;
    transition: border-left-color 0.3s ease;
}

.task-card.expanded {
    /* Optional: highlight expanded card slightly */
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
}

.task-icon { transition: transform 0.3s ease; }
.rotate-icon { transform: rotate(180deg); }

/* Steps */
.step-list {
    margin-top: 15px;
    padding-left: 20px;
    border-top: 1px solid #eee;
    padding-top: 10px;
    animation: fadeIn 0.3s ease-in;
}

.step-item {
    padding: 8px 0;
    color: #555;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95rem;
}

.step-item.completed span {
    text-decoration: line-through;
    color: #aaa;
}

.custom-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #00cc6a;
}

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

/* =========================================
   4. STATUS INDICATORS (Colors)
   ========================================= */
/* Dots */
.dot {
    height: 10px;
    width: 10px;
    border-radius: 50%;
    margin-left: auto;
    transition: background-color 0.3s ease;
}

/* 1. Not Started */
.status-none { border-left-color: #ddd !important; }
.dot-none { display: none; }

/* 2. In Progress */
.status-progress { border-left-color: #f0ad4e !important; }
.dot-progress { background-color: #f0ad4e; display: inline-block; }

/* 3. Finished */
.status-done { border-left-color: #00cc6a !important; }
.dot-done { background-color: #00cc6a; display: inline-block; }


/* =========================================
   5. SETTINGS PAGE & BUTTONS
   ========================================= */
.settings-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Header with Back Button */
.settings-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #555;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.2s;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 10px 5px 0;
}
.btn-back:hover { color: #0078d4; }

/* Universal Card */
.card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    gap: 10px;
}

.input-group input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Lists */
.project-list { list-style: none; padding: 0; }
.project-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

/* Action Rows (Import/Export) */
.action-row {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    align-items: center;
}
.file-upload { display: flex; }

/* --- UNIFIED BUTTON STYLES --- */
button { 
    cursor: pointer; 
    border: none; 
    border-radius: 4px; 
    font-weight: 600; 
    transition: background 0.2s; 
}

/* Create Button */
.btn-primary { 
    background: #0078d4; 
    color: white; 
    padding: 8px 16px; 
}
.btn-primary:hover { background: #005a9e; }

/* Delete Button */
.btn-danger { 
    background: #e81123; 
    color: white; 
    padding: 6px 12px; 
    font-size: 0.85rem; 
}
.btn-danger:hover { background: #b80d1b; }

/* Action Button (Export/Import) */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;          /* Fixed height */
    padding: 0 20px;       /* Fixed padding */
    background-color: white;
    border: 2px solid #0078d4;
    color: #0078d4;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    box-sizing: border-box;
    line-height: 1;
}

.btn-action:hover {
    background-color: #0078d4;
    color: white;
}
/* Custom Select Styling */
.custom-select {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
}

.custom-select:focus {
    outline: 2px solid #0078d4;
    border-color: #0078d4;
}