:root {
    --accent: #ED4F18;
    --dark: #283948;
    --light-bg: #f5f7fa;
}

body {
    background: var(--light-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* HEADER */
.app-header {
    background: linear-gradient(135deg, #283948, #1c2833);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

/* CARDS */
.dashboard-card {
    border-radius: 16px;
    backdrop-filter: blur(12px);
    background: rgba(255,255,255,0.75);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

/* KPI ICON */
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:18px;
}

.section-title {
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 16px;
}
.kpi-progress {
    height: 4px;
    background: rgba(0,0,0,0.05);
    margin-top: 6px;
    border-radius: 4px;
    overflow: hidden;
}

.kpi-progress-bar {
    height: 100%;
    width: 0%;
    transition: width 0.6s ease;
}

.kpi-accent { background: linear-gradient(90deg,#ED4F18,#ff9a6b); }
.kpi-success { background: linear-gradient(90deg,#4CAF50,#81C784); }
.kpi-dark { background: linear-gradient(90deg,#283948,#5c7280); }

canvas { max-height: 320px; }
#siteMap { height: 420px; border-radius: 16px; }

body {
    background: var(--light-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* HEADER */
.app-header {
    background: linear-gradient(135deg, #283948, #1c2833);
    border-radius: 18px;
    padding: 18px 22px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
    animation: fadeInDown 0.6s ease;
}

.app-header::after {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(237,79,24,0.25), transparent);
    filter: blur(40px);
    animation: pulseGlow 6s infinite alternate;
}

.mac-dots { display: flex; gap: 6px; }
.mac-dots .dot {
    width: 12px; height: 12px; border-radius: 50%;
}
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.header-status {
    background: rgba(255,255,255,0.1);
    color: white;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* CARDS */
.card {
    border: none;
    border-radius: 16px;
    backdrop-filter: blur(12px);
    background: rgba(255,255,255,0.75);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    transition: all 0.25s ease;
    animation: fadeInUp 0.5s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 35px rgba(0,0,0,0.08);
}

/* INPUT */
.form-control, .form-select {
    border-radius: 10px;
    border: 1px solid #ddd;
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(237,79,24,0.15);
}

/* BUTTON */
.btn-primary {
    background: #ED4F18;
    border: none;
    border-radius: 12px;
    font-weight: 600;
}

.btn-primary:hover {
    background: #ED4F18;
}

/* PROGRESS */
.progress {
    height: 8px;
    border-radius: 20px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--accent), #ff7a45);
    box-shadow: 0 0 10px rgba(237,79,24,0.4);
}

/* STATUS */
.status-badge {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    padding: 10px 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    font-weight: 600;
    z-index: 999;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    background: #ccc;
}

.status-progress {
    background: var(--accent);
    animation: pulse 1.5s infinite;
}

.status-complete { background: #28c76f; }

/* SIGNATURE */
#signaturePad {
    border-radius: 12px;
    background: #fff;
}

/* ICON */
.icon {
    margin-right: 6px;
    color: var(--accent);
}

/* ANIMATION */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px);}
    to { opacity: 1; transform: translateY(0);}
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px);}
    to { opacity: 1; transform: translateY(0);}
}

@keyframes pulseGlow {
    from { transform: scale(1); opacity: 0.6; }
    to { transform: scale(1.2); opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}
/* =========================
   APPLE STYLE KPI
========================= */

.dashboard-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.55);
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition:
        transform 0.28s ease,
        box-shadow 0.28s ease,
        border-color 0.28s ease;
}

/* glow orb */
.dashboard-card::before {
    content: "";
    position: absolute;
    top: -40px;
    right: -40px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(237,79,24,0.18),
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* top glass shine */
.dashboard-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            rgba(255,255,255,0.22),
            transparent 30%
        );
    pointer-events: none;
}

/* hover */
.dashboard-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow:
        0 20px 40px rgba(0,0,0,0.08),
        0 4px 12px rgba(0,0,0,0.04);
    border-color: rgba(255,255,255,0.85);
}

.dashboard-card:hover::before {
    opacity: 1;
}

/* KPI LABEL */
.dashboard-card p {
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: rgba(40,57,72,0.65);
    text-transform: uppercase;
}

/* KPI NUMBER */
.dashboard-card h3,
.dashboard-card h5 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--dark);
    margin-bottom: 10px;
}

/* subtle animated gradient */
.dashboard-card h3 {
    background: linear-gradient(
        90deg,
        #283948,
        #4b5f6b
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* completed green */
#kpiCompleted {
    background: linear-gradient(
        90deg,
        #28c76f,
        #81fbb8
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* TOTAL HANDOVER ORANGE */
#kpiTotal {
    background: linear-gradient(
        90deg,
        #ED4F18,
        #ff9a6b
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* KPI VALUE */
#kpiValue {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.8px;
}

/* PROGRESS BAR */
.kpi-progress {
    height: 6px;
    border-radius: 999px;
    background: rgba(0,0,0,0.05);
    overflow: hidden;
    margin-top: 10px;
    position: relative;
}

/* glossy effect */
.kpi-progress::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 100%;
    background: rgba(255,255,255,0.25);
    filter: blur(6px);
}

/* animated progress */
.kpi-progress-bar {
    border-radius: 999px;
    transition:
        width 0.8s cubic-bezier(.4,0,.2,1);
    position: relative;
    overflow: hidden;
}

/* moving shimmer */
.kpi-progress-bar::after {
    content: "";
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 100%;
    background: rgba(255,255,255,0.35);
    transform: skewX(-20deg);

    animation: shimmer 2.5s infinite;
}

@keyframes shimmer {
    from {
        left: -40%;
    }
    to {
        left: 140%;
    }
}

/* floating animation */
.dashboard-card {
    animation: cardFloat 0.7s ease;
}

@keyframes cardFloat {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}