/* =========================================================
   NKWABIFIBRE APP — CLEAN GLOBAL CSS
   ========================================================= */

* {
    box-sizing: border-box;
}

:root {
    --bg-main: #070b12;
    --bg-sidebar: #07101b;
    --bg-panel: #111827;
    --bg-input: #0b1220;

    --border: #263143;
    --border-soft: #1f2937;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-soft: #8aa0c4;

    --orange: #f59e0b;
    --green: #00e6a8;
    --red: #ff6b6b;
    --blue: #60a5fa;
    --purple: #a78bfa;
    --pink: #ff4fc3;
    --yellow: #ffd400;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Sora', Arial, sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font-family: 'Sora', Arial, sans-serif;
}

button {
    border: 0;
    cursor: pointer;
    font-weight: 800;
}


/* =========================================================
   LOGIN PAGE
   ========================================================= */

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.15), transparent 30%),
        var(--bg-main);
}

.login-card {
    width: 390px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 34px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.brand-badge {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    background: var(--orange);
    color: #0b1120;
    border-radius: 16px;
    font-size: 26px;
    margin-bottom: 18px;
}

.login-card h1 {
    margin: 0;
    font-size: 30px;
}

.login-card p {
    color: var(--text-muted);
    margin-bottom: 26px;
}

.alert-error {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.35);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 18px;
}


/* =========================================================
   APP LAYOUT
   ========================================================= */

.app-body {
    display: flex;
    min-height: 100vh;
    animation: appFadeIn 0.45s ease both;
}

.sidebar {
    width: 245px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-soft);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideInLeft 0.5s ease both;
}

.main-content {
    margin-left: 245px;
    width: calc(100% - 245px);
    padding: 0 26px 42px;
}


/* =========================================================
   LOGO / BRAND
   ========================================================= */

.logo-box {
    height: 82px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
    border-bottom: 1px solid var(--border-soft);
    flex-shrink: 0;
    animation: fadeDown 0.5s ease both;
    animation-delay: 0.12s;
}

.logo-box .app-logo,
.logo-box img.app-logo {
    width: 46px;
    height: 46px;
    max-width: 46px;
    max-height: 46px;
    min-width: 46px;
    min-height: 46px;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 10px;
    flex: 0 0 46px;
    border: 1px solid rgba(0, 230, 168, 0.25);
    box-shadow: 0 0 18px rgba(0, 230, 168, 0.16);
    transition: transform 0.25s ease, filter 0.25s ease;
}

.logo-box:hover .app-logo {
    transform: scale(1.06) rotate(-2deg);
    filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.28));
}

.logo-box strong {
    display: block;
    font-size: 15px;
    line-height: 1.1;
    color: #ffffff;
}

.logo-box span {
    display: block;
    font-size: 10px;
    color: var(--orange);
    margin-top: 3px;
}


/* =========================================================
   SIDEBAR
   ========================================================= */

.view-toggle {
    display: flex;
    gap: 6px;
    padding: 16px;
    animation: fadeUp 0.5s ease both;
    animation-delay: 0.18s;
}

.view-toggle button {
    width: 100%;
    margin: 0;
    padding: 10px;
    background: var(--bg-panel);
    color: #64748b;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
}

.view-toggle button.active {
    background: var(--orange);
    color: #07101b;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
}

.sidebar nav a {
    position: relative;
    color: #cbd5e1;
    text-decoration: none;
    padding: 13px 20px;
    border-left: 3px solid transparent;
    font-size: 14px;
    font-weight: 600;
    animation: fadeUp 0.45s ease both;
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        color 0.2s ease,
        padding-left 0.2s ease;
}

.sidebar nav a:nth-child(1) { animation-delay: 0.10s; }
.sidebar nav a:nth-child(2) { animation-delay: 0.13s; }
.sidebar nav a:nth-child(3) { animation-delay: 0.16s; }
.sidebar nav a:nth-child(4) { animation-delay: 0.19s; }
.sidebar nav a:nth-child(5) { animation-delay: 0.22s; }
.sidebar nav a:nth-child(6) { animation-delay: 0.25s; }
.sidebar nav a:nth-child(7) { animation-delay: 0.28s; }
.sidebar nav a:nth-child(8) { animation-delay: 0.31s; }
.sidebar nav a:nth-child(9) { animation-delay: 0.34s; }
.sidebar nav a:nth-child(10) { animation-delay: 0.37s; }
.sidebar nav a:nth-child(11) { animation-delay: 0.40s; }

.sidebar nav a.active,
.sidebar nav a:hover {
    background: var(--bg-panel);
    border-left-color: var(--orange);
    color: #ffffff;
}

.sidebar nav a:hover {
    transform: translateX(5px);
    padding-left: 18px;
}

.user-panel {
    margin-top: auto;
    padding: 18px;
    border-top: 1px solid var(--border-soft);
}

.user-panel strong {
    display: block;
    color: #ffffff;
    font-size: 14px;
}

.user-panel span,
.user-panel a {
    display: block;
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 5px;
}

.user-panel a {
    color: var(--orange);
    text-decoration: none;
}


/* =========================================================
   TOPBAR / PAGE TITLE
   ========================================================= */

.topbar {
    height: 78px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-soft);
    margin-bottom: 8px;
    animation: fadeDown 0.5s ease both;
    animation-delay: 0.08s;
}

.topbar input {
    max-width: 430px;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-muted);
}

.top-actions span {
    transition: transform 0.18s ease;
}

.top-actions span:hover {
    transform: translateY(-2px) scale(1.04);
}

.page-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0 24px;
    gap: 20px;
    animation: fadeUp 0.55s ease both;
    animation-delay: 0.12s;
}

.page-title h1 {
    margin: 0;
    font-size: 23px;
}

.page-title p {
    margin: 7px 0 0;
    color: var(--text-soft);
    font-size: 14px;
}

.status-pills {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.status-pills span {
    padding: 8px 12px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 800;
}


/* =========================================================
   CARDS / PANELS / METRICS
   ========================================================= */

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.metric-card,
.panel {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 26px;
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        border-color 0.22s ease,
        background 0.22s ease;
}

.metric-card {
    animation: fadeUp 0.55s ease both;
}

.metrics-grid .metric-card:nth-child(1) { animation-delay: 0.12s; }
.metrics-grid .metric-card:nth-child(2) { animation-delay: 0.18s; }
.metrics-grid .metric-card:nth-child(3) { animation-delay: 0.24s; }
.metrics-grid .metric-card:nth-child(4) { animation-delay: 0.30s; }

.panel {
    animation: scaleIn 0.5s ease both;
}

.metric-card:hover,
.panel:hover,
.pipeline-card:hover,
.photo-card:hover,
.site-photo-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

.metric-card small,
.panel h3 {
    color: #7d90b5;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 12px;
    margin: 0;
}

.metric-card h2 {
    font-size: 30px;
    margin: 14px 0;
}

.metric-card p {
    color: var(--text-soft);
    margin: 0 0 10px;
}

.panel table {
    margin-top: 22px;
}


/* =========================================================
   DASHBOARD CHARTS
   ========================================================= */

.chart-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin: 18px 0;
}

.dashboard-chart-panel {
    position: relative;
    overflow: hidden;
}

.dashboard-chart-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        110deg,
        transparent 0%,
        rgba(245, 158, 11, 0.06) 45%,
        transparent 72%
    );
    transform: translateX(-120%);
    animation: chartSweep 2.6s ease 0.5s both;
}

/* Old placeholder support */
.placeholder-chart {
    height: 190px;
    display: flex;
    align-items: end;
    gap: 45px;
    padding: 20px 45px 0;
    border-top: 1px dashed var(--border-soft);
    border-bottom: 1px dashed var(--border-soft);
}

.placeholder-chart div {
    width: 36px;
    background: var(--orange);
    border-radius: 4px 4px 0 0;
    transform-origin: bottom center;
    animation: simpleBarRise 0.9s ease both;
}

.line-placeholder {
    height: 190px;
    color: var(--orange);
    display: grid;
    place-items: center;
    border-top: 1px dashed var(--border-soft);
    border-bottom: 1px dashed var(--border-soft);
}

/* New animated bar chart */
.animated-bar-chart {
    height: 190px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 44px;
    padding: 20px 40px 0;
    border-top: 1px dashed var(--border-soft);
    border-bottom: 1px dashed var(--border-soft);
}

.chart-column {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 9px;
}

.bar-track {
    height: 135px;
    width: 38px;
    display: flex;
    align-items: flex-end;
}

.animated-chart-bar {
    width: 100%;
    height: 0;
    background: linear-gradient(180deg, #fbbf24 0%, var(--orange) 100%);
    border-radius: 8px 8px 0 0;
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.26);
    animation: dashboardBarRise 1.05s cubic-bezier(0.18, 0.88, 0.24, 1.1) forwards;
}

.chart-column:nth-child(1) .animated-chart-bar { animation-delay: 0.10s; }
.chart-column:nth-child(2) .animated-chart-bar { animation-delay: 0.22s; }
.chart-column:nth-child(3) .animated-chart-bar { animation-delay: 0.34s; }
.chart-column:nth-child(4) .animated-chart-bar { animation-delay: 0.46s; }
.chart-column:nth-child(5) .animated-chart-bar { animation-delay: 0.58s; }

.chart-column span {
    color: var(--text-soft);
    font-size: 12px;
    animation: chartLabelFade 0.6s ease both;
}

.chart-column:nth-child(1) span { animation-delay: 0.28s; }
.chart-column:nth-child(2) span { animation-delay: 0.40s; }
.chart-column:nth-child(3) span { animation-delay: 0.52s; }
.chart-column:nth-child(4) span { animation-delay: 0.64s; }
.chart-column:nth-child(5) span { animation-delay: 0.76s; }

.animated-chart-bar:hover {
    filter: brightness(1.08);
    box-shadow: 0 16px 34px rgba(245, 158, 11, 0.4);
}

/* Animated line chart */
.animated-line-chart {
    height: 190px;
    position: relative;
    border-top: 1px dashed var(--border-soft);
    border-bottom: 1px dashed var(--border-soft);
    padding: 0 18px;
}

.animated-line-chart svg {
    width: 100%;
    height: 150px;
    display: block;
    overflow: visible;
}

.chart-grid-line {
    stroke: rgba(148, 163, 184, 0.12);
    stroke-width: 1;
    animation: chartGridFade 0.7s ease both;
}

.loadshedding-chart-line {
    fill: none;
    stroke: var(--orange);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 900;
    stroke-dashoffset: 900;
    filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.35));
    animation: chartLineDraw 1.6s ease 0.25s forwards;
}

.chart-dot {
    fill: var(--orange);
    stroke: #111827;
    stroke-width: 3;
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    animation: chartDotPop 0.45s ease forwards;
}

.chart-dot:nth-of-type(1) { animation-delay: 0.75s; }
.chart-dot:nth-of-type(2) { animation-delay: 0.9s; }
.chart-dot:nth-of-type(3) { animation-delay: 1.05s; }
.chart-dot:nth-of-type(4) { animation-delay: 1.2s; }
.chart-dot:nth-of-type(5) { animation-delay: 1.35s; }

.week-labels {
    height: 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--orange);
    font-size: 13px;
    font-weight: 700;
}

.week-labels span {
    opacity: 0;
    animation: chartLabelFade 0.55s ease forwards;
}

.week-labels span:nth-child(1) { animation-delay: 0.45s; }
.week-labels span:nth-child(2) { animation-delay: 0.55s; }
.week-labels span:nth-child(3) { animation-delay: 0.65s; }
.week-labels span:nth-child(4) { animation-delay: 0.75s; }
.week-labels span:nth-child(5) { animation-delay: 0.85s; }


/* =========================================================
   TABLES
   ========================================================= */

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 10px;
    border-bottom: 1px solid var(--border-soft);
    text-align: left;
    color: #9fb2d8;
    font-size: 14px;
    vertical-align: middle;
}

th {
    color: var(--text-soft);
    font-weight: 800;
}

td strong {
    color: #ffffff;
}

td small {
    color: var(--text-muted);
}

tbody tr {
    animation: fadeUp 0.45s ease both;
    transition:
        transform 0.18s ease,
        background 0.18s ease;
}

tbody tr:nth-child(1) { animation-delay: 0.05s; }
tbody tr:nth-child(2) { animation-delay: 0.08s; }
tbody tr:nth-child(3) { animation-delay: 0.11s; }
tbody tr:nth-child(4) { animation-delay: 0.14s; }
tbody tr:nth-child(5) { animation-delay: 0.17s; }
tbody tr:nth-child(6) { animation-delay: 0.20s; }
tbody tr:nth-child(7) { animation-delay: 0.23s; }
tbody tr:nth-child(8) { animation-delay: 0.26s; }

tbody tr:hover {
    transform: scale(1.006);
}


/* =========================================================
   FORMS
   ========================================================= */

label {
    display: block;
    color: #dbeafe;
    margin: 0 0 9px;
    font-size: 14px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 48px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 13px 16px;
    border-radius: 10px;
    outline: none;
    font-size: 14px;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

textarea {
    min-height: 120px;
    line-height: 1.6;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.08);
    transform: translateY(-1px);
}

.data-form {
    margin-top: 26px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px 24px;
    margin-bottom: 24px;
}

.form-grid > div {
    min-width: 0;
}

.form-actions {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 14px;
}


/* =========================================================
   BUTTONS / ACTIONS
   ========================================================= */

.primary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--orange);
    color: #07101b;
    padding: 11px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 800;
    font-size: 13px;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.18);
}

.secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 18px;
    border-radius: 9px;
    background: var(--bg-panel);
    color: #cbd5e1;
    border: 1px solid var(--border);
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
}

.submit-button {
    width: auto;
    min-width: 180px;
    margin-top: 0;
    padding: 13px 22px;
    border-radius: 9px;
    background: var(--orange);
    color: #07101b;
}

.table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 12px;
    border-radius: 7px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: var(--orange);
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
}

.danger-button {
    width: auto;
    margin: 0;
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 7px;
    font-weight: 700;
    cursor: pointer;
}

button,
.primary-action,
.secondary-action,
.submit-button,
.table-action {
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        filter 0.18s ease,
        background 0.18s ease;
}

button:hover,
.primary-action:hover,
.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.22);
    filter: brightness(1.05);
}

.secondary-action:hover,
.table-action:hover {
    transform: translateY(-2px);
    color: #ffffff;
    border-color: var(--orange);
}

.danger-button:hover {
    background: rgba(239, 68, 68, 0.22);
}


/* =========================================================
   FLASH MESSAGES / INFO BOXES
   ========================================================= */

.flash-message {
    margin-top: 18px;
    padding: 13px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    animation: fadeDown 0.4s ease both;
}

.success-flash {
    background: rgba(16, 185, 129, 0.12);
    color: var(--green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.error-flash {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.info-box {
    margin-top: 24px;
    margin-bottom: 4px;
    padding: 14px 16px;
    background: rgba(59, 130, 246, 0.10);
    color: #bfdbfe;
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
}


/* =========================================================
   COLOUR HELPERS
   ========================================================= */

.up,
.green {
    color: var(--green);
}

.down {
    color: var(--red);
}

.yellow {
    color: var(--yellow);
}

.blue {
    color: #3b82f6;
}

.purple {
    color: var(--purple);
}

.pink {
    color: var(--pink);
}

.danger {
    color: var(--red);
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.success {
    color: var(--green);
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
}


/* =========================================================
   STATUS / ROLE BADGES
   ========================================================= */

.status-badge,
.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    border: 1px solid transparent;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.status-badge:hover {
    transform: scale(1.04);
}

.status-active,
.status-wayleave-approved {
    color: var(--green);
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
}

.status-delayed,
.status-wayleave-rejected,
.status-wayleave-expired {
    color: var(--red);
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
}

.status-paused,
.status-wayleave-in_negotiation {
    color: var(--yellow);
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
}

.status-completed,
.status-wayleave-submitted {
    color: var(--blue);
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.35);
}

.status-disabled,
.status-wayleave-draft {
    color: var(--text-muted);
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.25);
}

.role-adm {
    color: var(--orange);
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
}

.role-sup {
    color: var(--blue);
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.35);
}

.role-cli {
    color: var(--green);
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
}


/* =========================================================
   DETAILS / TIMELINE
   ========================================================= */

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 18px;
}

.detail-list {
    margin-top: 22px;
    display: grid;
    gap: 16px;
}

.detail-list div {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-soft);
}

.detail-list span {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.detail-list strong {
    color: #ffffff;
    font-size: 15px;
}

.timeline {
    margin-top: 22px;
    display: grid;
    gap: 18px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 14px;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    background: var(--orange);
    border-radius: 999px;
    margin-top: 8px;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.35);
}

.timeline-card {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
}

.timeline-meta {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    color: var(--text-soft);
    font-size: 13px;
    margin-bottom: 10px;
}

.timeline-meta strong {
    color: #ffffff;
}

.timeline-card p {
    color: #cbd5e1;
    margin: 0;
    line-height: 1.7;
}


/* =========================================================
   PROGRESS / POLE DELIVERY
   ========================================================= */

.progress-wrap {
    width: 120px;
    height: 9px;
    background: #0b1220;
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-bar {
    height: 100%;
    background: var(--orange);
    border-radius: 999px;
    position: relative;
    overflow: hidden;
    animation: progressGrow 0.85s ease both;
    transform-origin: left center;
}

.progress-bar::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 45px;
    left: -50px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.35),
        transparent
    );
    animation: progressShine 1.8s ease-in-out 0.9s infinite;
}

.progress-large {
    width: 100%;
    height: 16px;
    margin-bottom: 8px;
}

.status-pole-ordered {
    color: var(--blue);
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.35);
}

.status-pole-partial {
    color: var(--yellow);
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
}

.status-pole-delivered {
    color: var(--green);
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
}

.status-pole-delayed,
.status-pole-cancelled {
    color: var(--red);
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
}


/* =========================================================
   SMME / BBBEE
   ========================================================= */

.status-smme-active {
    color: var(--green);
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
}

.status-smme-pending {
    color: var(--yellow);
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
}

.status-smme-suspended {
    color: var(--red);
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
}

.status-smme-completed {
    color: var(--blue);
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.35);
}


/* =========================================================
   LEAD PIPELINE
   ========================================================= */

.pipeline-board {
    display: grid;
    grid-template-columns: repeat(6, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 22px;
    margin-bottom: 22px;
    overflow-x: auto;
    padding: 4px 0 12px;
    align-items: stretch;
}

.pipeline-column {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    min-height: 360px;
    animation: fadeUp 0.55s ease both;
}

.pipeline-column:nth-child(1) { animation-delay: 0.08s; }
.pipeline-column:nth-child(2) { animation-delay: 0.14s; }
.pipeline-column:nth-child(3) { animation-delay: 0.20s; }
.pipeline-column:nth-child(4) { animation-delay: 0.26s; }
.pipeline-column:nth-child(5) { animation-delay: 0.32s; }
.pipeline-column:nth-child(6) { animation-delay: 0.38s; }

.pipeline-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-soft);
}

.pipeline-column-header strong {
    color: #ffffff;
    font-size: 14px;
    line-height: 1.3;
}

.pipeline-column-header span {
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    background: rgba(245, 158, 11, 0.12);
    color: var(--orange);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.pipeline-card {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    animation: scaleIn 0.45s ease both;
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        border-color 0.22s ease;
}

.pipeline-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.pipeline-card-top strong {
    color: #ffffff;
    font-size: 14px;
    line-height: 1.45;
}

.pipeline-card-top span {
    color: var(--green);
    font-size: 12px;
    font-weight: 800;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 4px 7px;
    border-radius: 999px;
    white-space: nowrap;
}

.pipeline-card p {
    color: var(--text-soft);
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.5;
}

.pipeline-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    margin-bottom: 10px;
    color: #9fb2d8;
    font-size: 12px;
}

.pipeline-meta span:last-child {
    color: #ffffff;
    font-weight: 800;
}

.pipeline-card small {
    display: block;
    color: var(--text-muted);
    margin-bottom: 14px;
    line-height: 1.5;
}

.pipeline-update-form {
    display: grid;
    grid-template-columns: 1fr 74px;
    gap: 9px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-soft);
}

.pipeline-update-form select,
.pipeline-update-form input {
    min-height: 40px;
    padding: 9px 10px;
    font-size: 12px;
    border-radius: 8px;
}

.pipeline-update-form button {
    grid-column: 1 / -1;
    min-height: 38px;
    padding: 9px 12px;
    border-radius: 8px;
    background: var(--orange);
    color: #07101b;
    font-size: 12px;
    font-weight: 900;
}

.pipeline-empty {
    color: var(--text-muted);
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 18px 14px;
    font-size: 13px;
    text-align: center;
    line-height: 1.6;
    background: rgba(11, 18, 32, 0.45);
}

.status-lead-new_lead {
    color: var(--text-muted);
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.25);
}

.status-lead-qualified {
    color: var(--blue);
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.35);
}

.status-lead-proposal_sent {
    color: var(--purple);
    background: rgba(167, 139, 250, 0.12);
    border-color: rgba(167, 139, 250, 0.35);
}

.status-lead-negotiation {
    color: var(--yellow);
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
}

.status-lead-won {
    color: var(--green);
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
}

.status-lead-lost {
    color: var(--red);
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
}


/* =========================================================
   SITE PHOTOS
   ========================================================= */

.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.photo-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    max-width: 100%;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.18);
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        border-color 0.22s ease;
}

.photo-card img {
    width: 100%;
    height: 240px;
    max-height: 240px;
    display: block;
    object-fit: cover;
    object-position: center;
    background: var(--bg-input);
    transition:
        transform 0.35s ease,
        filter 0.35s ease;
}

.photo-card:hover img {
    transform: scale(1.045);
    filter: brightness(1.05) saturate(1.05);
}

.photo-card-body {
    padding: 18px;
}

.photo-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.photo-card-top strong {
    color: #ffffff;
    font-size: 15px;
    line-height: 1.35;
}

.photo-card-body p {
    color: var(--text-soft);
    line-height: 1.6;
    margin: 0 0 14px;
    font-size: 14px;
}

.photo-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #9fb2d8;
    font-size: 12px;
    margin-bottom: 8px;
}

.photo-card-body small {
    display: block;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.photo-rejection {
    padding: 10px 12px;
    border-radius: 9px;
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.35);
    font-size: 12px;
    margin-bottom: 12px;
}

.photo-approval-form {
    display: grid;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--border-soft);
}

.photo-approval-form select,
.photo-approval-form input {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 9px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-main);
}

.photo-approval-form button {
    width: 100%;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 9px;
    background: var(--orange);
    color: #07101b;
    font-size: 13px;
    font-weight: 900;
    border: 0;
    cursor: pointer;
}

.status-photo-pending {
    color: var(--yellow);
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
}

.status-photo-approved {
    color: var(--green);
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
}

.status-photo-rejected {
    color: var(--red);
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
}

/* Site photo page-specific classes */
.site-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
    margin-top: 18px;
}

.site-photo-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    max-width: 100%;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.18);
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        border-color 0.22s ease;
}

.site-photo-image-wrap {
    width: 100%;
    height: 240px;
    background: #0b1220;
    overflow: hidden;
}

.site-photo-image-wrap img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 240px;
    display: block;
    object-fit: cover;
    object-position: center;
    transition:
        transform 0.35s ease,
        filter 0.35s ease;
}

.site-photo-card:hover img {
    transform: scale(1.045);
    filter: brightness(1.05) saturate(1.05);
}

.site-photo-body {
    padding: 18px;
}

.site-photo-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.site-photo-top strong {
    color: #ffffff;
    font-size: 15px;
    line-height: 1.35;
}

.site-photo-body p {
    color: var(--text-soft);
    line-height: 1.6;
    margin: 0 0 14px;
    font-size: 14px;
}

.site-photo-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #9fb2d8;
    font-size: 12px;
    margin-bottom: 8px;
}

.site-photo-date {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 14px;
}

.site-photo-form {
    display: grid;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--border-soft);
}

.site-photo-form select,
.site-photo-form input {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 9px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-main);
}

.site-photo-form button {
    width: 100%;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 9px;
    background: var(--orange);
    color: #07101b;
    font-size: 13px;
    font-weight: 900;
    border: 0;
    cursor: pointer;
}

.site-photo-rejection {
    padding: 10px 12px;
    border-radius: 9px;
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.35);
    font-size: 12px;
    margin-bottom: 12px;
}


/* =========================================================
   REPORTS
   ========================================================= */

.report-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.report-stat-list {
    margin-top: 22px;
    display: grid;
    gap: 14px;
}

.report-stat-list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--border-soft);
}

.report-stat-list span {
    color: var(--text-muted);
    font-size: 13px;
}

.report-stat-list strong {
    color: #ffffff;
    font-size: 15px;
    text-align: right;
}


/* =========================================================
   KEYFRAMES
   ========================================================= */

@keyframes appFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-18px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes progressGrow {
    from {
        width: 0;
    }
}

@keyframes progressShine {
    0% {
        left: -50px;
    }

    55% {
        left: 110%;
    }

    100% {
        left: 110%;
    }
}

@keyframes simpleBarRise {
    from {
        transform: scaleY(0);
        opacity: 0;
    }

    to {
        transform: scaleY(1);
        opacity: 1;
    }
}

@keyframes dashboardBarRise {
    0% {
        height: 0;
        opacity: 0;
        filter: blur(2px);
    }

    65% {
        opacity: 1;
        filter: blur(0);
    }

    100% {
        height: var(--bar-height);
        opacity: 1;
        filter: blur(0);
    }
}

@keyframes chartLineDraw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes chartDotPop {
    from {
        opacity: 0;
        transform: scale(0);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes chartGridFade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes chartLabelFade {
    from {
        opacity: 0;
        transform: translateY(7px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes chartSweep {
    to {
        transform: translateX(120%);
    }
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1500px) {
    .pipeline-board {
        grid-template-columns: repeat(6, minmax(250px, 1fr));
    }
}

@media (max-width: 1300px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .chart-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .photo-grid,
    .site-photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .sidebar {
        width: 210px;
    }

    .main-content {
        margin-left: 210px;
        width: calc(100% - 210px);
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .pipeline-board {
        grid-template-columns: repeat(3, minmax(260px, 1fr));
    }
}

@media (max-width: 1000px) {
    .detail-grid,
    .report-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 800px) {
    .sidebar {
        position: relative;
        width: 100%;
        min-height: auto;
    }

    .app-body {
        display: block;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 0 16px 32px;
    }

    .page-title {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .submit-button,
    .form-actions .secondary-action {
        width: 100%;
    }

    .photo-grid,
    .site-photo-grid,
    .pipeline-board {
        grid-template-columns: 1fr;
    }

    .animated-bar-chart {
        gap: 26px;
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* =========================================================
   REDUCED MOTION ACCESSIBILITY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

/* =========================================================
   WORKSPACE TOGGLE — NKWABI / VELOCITY
   ========================================================= */

.workspace-toggle button {
    position: relative;
}

.workspace-toggle button.active {
    background: var(--orange);
    color: #07101b;
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.2);
}

.workspace-toggle button.disabled {
    opacity: 0.48;
    cursor: not-allowed;
    background: #0b1220;
    color: #64748b;
    border: 1px solid var(--border);
}

.workspace-toggle button.disabled:hover {
    transform: none !important;
    box-shadow: none !important;
    filter: none !important;
}

/* =========================================================
   LOGIN PAGE
   ========================================================= */

.login-body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Sora', sans-serif;
    background:
        linear-gradient(180deg, rgba(3, 10, 24, 0.96), rgba(2, 8, 20, 1)),
        #020817;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.login-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 520px;
    background: #0f172a;
    border: 1px solid rgba(59, 130, 246, 0.12);
    border-radius: 24px;
    padding: 42px 44px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.login-brand {
    margin-bottom: 28px;
}

.login-logo {
    width: 86px;
    height: 86px;
    object-fit: cover;
    border-radius: 22px;
    display: block;
    margin-bottom: 22px;
    background: #f8a909;
    padding: 6px;
}

.login-brand h1 {
    margin: 0 0 10px;
    font-size: 3rem;
    line-height: 1.05;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.04em;
}

.login-brand p {
    margin: 0;
    font-size: 1.05rem;
    color: #9fb3d9;
    font-weight: 400;
}

.login-alert {
    margin: 0 0 20px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(220, 38, 38, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.25);
    color: #fecaca;
    font-size: 0.95rem;
    font-weight: 500;
}

.login-form {
    margin-top: 26px;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.98rem;
    font-weight: 700;
    color: #ffffff;
}

.form-group input {
    width: 100%;
    box-sizing: border-box;
    padding: 17px 18px;
    border-radius: 14px;
    border: 1px solid rgba(59, 130, 246, 0.15);
    background: #071226;
    color: #ffffff;
    font-size: 1rem;
    font-family: 'Sora', sans-serif;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input::placeholder {
    color: #6f84a8;
}

.form-group input:focus {
    border-color: #f8a909;
    box-shadow: 0 0 0 4px rgba(248, 169, 9, 0.12);
}

.login-btn {
    width: 100%;
    margin-top: 12px;
    padding: 16px 18px;
    border: none;
    border-radius: 14px;
    background: #f8a909;
    color: #07101b;
    font-size: 1rem;
    font-weight: 800;
    font-family: 'Sora', sans-serif;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
    box-shadow: 0 12px 24px rgba(248, 169, 9, 0.22);
}

.login-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 16px 30px rgba(248, 169, 9, 0.28);
}

.login-btn:active {
    transform: translateY(0);
}

@media (max-width: 640px) {
    .login-card {
        padding: 30px 22px;
        border-radius: 20px;
    }

    .login-logo {
        width: 74px;
        height: 74px;
        border-radius: 18px;
    }

    .login-brand h1 {
        font-size: 2.35rem;
    }

    .login-brand p {
        font-size: 0.98rem;
    }
}


/* =========================================================
   LOGIN LOGO — WIDE LOGO FIX
   ========================================================= */

.login-logo {
    display: none !important;
}

.login-logo-wide {
    width: 145px !important;
    height: auto !important;
    max-height: 110px !important;
    display: block !important;
    object-fit: contain !important;
    object-position: left center !important;
    margin: 0 0 24px !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.login-brand h1 {
    margin-top: 0 !important;
}

.login-btn {
    margin-top: 18px !important;
}

/* =========================================================
   MY ACCOUNT
   ========================================================= */

.account-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 18px;
}

.account-profile {
    margin-top: 24px;
    display: grid;
    gap: 18px;
}

.account-profile div {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-soft);
}

.account-profile span {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.account-profile strong {
    display: block;
    color: #ffffff;
    font-size: 15px;
    line-height: 1.5;
}

@media (max-width: 1000px) {
    .account-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   MISSING DAILY LOG ALERTS
   ========================================================= */

.missing-log-card {
    border-color: rgba(239, 68, 68, 0.25);
}

.missing-log-card:hover {
    border-color: rgba(239, 68, 68, 0.45);
}

.missing-log-filter {
    margin-top: 22px;
    display: grid;
    grid-template-columns: minmax(240px, 320px) 180px;
    gap: 16px;
    align-items: end;
}

.missing-log-filter .submit-button {
    width: 100%;
    min-width: 0;
}

@media (max-width: 800px) {
    .missing-log-filter {
        grid-template-columns: 1fr;
    }
}

}