.admin-layout {
    min-height: 100vh;
    background: #F0F2F5;
}

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.admin-sidebar .nav-link {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    margin: 1px 0;
    font-size: 0.875rem;
}

.admin-sidebar .nav-link:hover {
    background: rgba(255, 255, 255, .1);
}

.admin-sidebar .nav-link.active {
    background: rgba(255, 255, 255, .15);
    font-weight: 600;
}

.admin-header {
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-content {
    min-height: 100vh;
    overflow-x: hidden;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-header h2 {
    font-weight: 700;
    margin: 0;
}

.data-table {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
    overflow: hidden;
}

.data-table .table {
    margin: 0;
}

.data-table .table th {
    background: #F8F9FA;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    border-bottom: 2px solid #dee2e6;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.data-table .table th:hover {
    color: #333;
}

.data-table .table td {
    vertical-align: middle;
    font-size: 0.875rem;
}

.data-table-toolbar {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.pipeline-board {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.pipeline-column {
    min-width: 250px;
    max-width: 280px;
    background: #F8F9FA;
    border-radius: 8px;
    flex-shrink: 0;
}

.pipeline-column-header {
    padding: 0.75rem;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    border-bottom: 2px solid;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pipeline-card {
    background: white;
    border-radius: 6px;
    padding: 0.75rem;
    margin: 0.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
    cursor: pointer;
    transition: box-shadow 0.2s;
}

.pipeline-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}

.pipeline-card .job-ref {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--primary);
}

.pipeline-card .job-customer {
    font-size: 0.8rem;
    color: #666;
}

.pipeline-card .job-price {
    font-weight: 600;
    font-size: 0.9rem;
}

.pipeline-card-actions .btn {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
}

.btn-purple {
    background-color: #6A1B9A;
    border-color: #6A1B9A;
    color: white;
}

.btn-purple:hover {
    background-color: #4A148C;
    border-color: #4A148C;
    color: white;
}

.form-section {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
    margin-bottom: 1rem;
}

.estimate-builder .panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
}

.calendar-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}

.calendar-day {
    min-height: 100px;
    border: 1px solid #eee;
    padding: 0.25rem;
    cursor: pointer;
}

.calendar-day:hover {
    background: #F8F9FA;
}

.calendar-day.today {
    background: #E3F2FD;
}

.calendar-day.other-month {
    opacity: 0.4;
}

.calendar-event {
    font-size: 0.7rem;
    padding: 2px 4px;
    border-radius: 3px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.confirm-dialog {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .2);
}

.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 99999;
}

.toast-item {
    background: white;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease;
    min-width: 300px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-success {
    border-left: 4px solid #4CAF50;
}

.toast-error {
    border-left: 4px solid #F44336;
}

.toast-info {
    border-left: 4px solid #2196F3;
}

/* ── Site Content Tree View ────────────────────────── */

.content-tree-layout {
    display: flex;
    gap: 0;
    min-height: calc(100vh - 180px);
}

.content-tree-panel {
    width: 260px;
    min-width: 260px;
    background: #1b1f23;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.content-tree-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #c9d1d9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.content-tree-header i {
    color: #58a6ff;
}

.content-tree-list {
    list-style: none;
    margin: 0;
    padding: 0.25rem 0;
}

.content-tree-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1rem 0.5rem 1.25rem;
    font-size: 0.875rem;
    color: #c9d1d9;
    cursor: pointer;
    border-left: 2px solid transparent;
    transition: background 0.15s, border-color 0.15s;
    user-select: none;
}

.content-tree-item:hover {
    background: rgba(255, 255, 255, .06);
}

.content-tree-item.active {
    background: rgba(33, 150, 243, .12);
    border-left-color: #58a6ff;
    color: #fff;
    font-weight: 600;
}

.content-tree-item i {
    font-size: 1rem;
    color: #8b949e;
    flex-shrink: 0;
}

.content-tree-item.active i {
    color: #58a6ff;
}

.content-editor-panel {
    flex: 1;
    min-width: 0;
    margin-left: 1rem;
}

.content-editor-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #6a737d;
    margin-bottom: 1rem;
}

.content-editor-breadcrumb .separator {
    color: #d1d5da;
}

.content-editor-breadcrumb .current-page {
    color: #24292f;
    font-weight: 600;
}

.content-editor-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
    overflow: hidden;
}

.content-editor-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background: #f6f8fa;
    border-bottom: 1px solid #d1d5da;
    font-size: 0.85rem;
    font-weight: 600;
    color: #24292f;
}

.content-editor-card-header .file-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.content-editor-card-header .file-info i {
    color: #57606a;
}

.content-editor-card-body {
    padding: 1.5rem;
}

.content-editor-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: #8b949e;
    text-align: center;
}

.content-editor-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.content-editor-empty p {
    font-size: 0.95rem;
    max-width: 300px;
}