:root {
    /* Light Mode Colors */
    --primary: #00658c;
    --primary-container: #3da5d9;
    --surface: #f6fafe;
    --surface-container-lowest: #ffffff;
    --surface-container-low: #f0f4f8;
    --surface-container: #ebeef3;
    --surface-container-high: #e5e8ed;
    --on-surface: #181c1f;
    --on-surface-variant: #3f484f;
    --outline-variant: #bec8d0;
    --secondary-container: #fece4b;
    --on-secondary-container: #725800;
    --background: #f6fafe;
    
    --font-family: 'Google Sans', 'Noto Sans Thai', sans-serif;

    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

[data-theme='dark'] {
    --primary: #89cff0;
    --primary-container: #004a6e;
    --surface: #1a1a1a;
    --surface-container-lowest: #121212;
    --surface-container-low: #1c1c1c;
    --surface-container: #2c2c2c;
    --surface-container-high: #3c3c3c;
    --on-surface: #ffffff;
    --on-surface-variant: #cccccc;
    --outline-variant: #606060;
    --secondary-container: #a37f00;
    --on-secondary-container: #ffeeaa;
    --background: #1a1a1a;

    color-scheme: dark;

    .exec-card {
        border: 1px solid var(--outline-variant);
    }
}

.exec-header {
    margin-bottom: 2rem;
}

.exec-header h2 {
    font-size: 1.5rem;
    color: var(--on-surface);
    margin-bottom: 0.5rem;
}

.exec-header p {
    color: var(--on-surface-variant);
    font-size: 0.9rem;
}

.exec-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.exec-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.exec-grid-1-2 {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Base class defined below but omitting duplicate background rule to prevent conflict */

.exec-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.exec-card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--primary);
}

.exec-card-title i {
    font-size: 1.2rem;
}

.exec-stat-main {
    font-size: 3rem;
    font-weight: 700;
    color: var(--on-surface);
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.exec-stat-trend {
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.trend-up { color: #d32f2f; }
.trend-down { color: #2e7d32; }
.trend-neutral { color: #f57c00; }
.trend-badge {
    background: #fff3e0;
    color: #e65100;
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
}

.exec-card-bottom {
    margin-top: auto;
    padding-top: 1rem;
}

.exec-progress-box {
    background: var(--surface-container-low);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.exec-progress-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: conic-gradient(var(--primary) 75%, var(--surface-container-high) 0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--primary);
    position: relative;
}

.exec-progress-circle::after {
    content: "";
    position: absolute;
    width: 45px;
    height: 45px;
    background: var(--surface-container-lowest);
    border-radius: 50%;
}

.exec-progress-circle span {
    position: relative;
    z-index: 1;
}

.exec-progress-info h4 {
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}
.exec-progress-info p {
    font-size: 0.8rem;
    color: var(--on-surface-variant);
}

.exec-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.exec-chart-bar {
    height: 20px;
    background: var(--surface-container-high);
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
    display: flex;
}

.exec-chart-fill {
    height: 100%;
    background: var(--primary);
}

.exec-bar-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
}
.exec-bar-label {
    width: 150px;
    font-size: 0.9rem;
    color: var(--on-surface-variant);
}
.exec-bar-track {
    flex-grow: 1;
    height: 12px;
    background: var(--surface-container-high);
    border-radius: 6px;
    position: relative;
}
.exec-bar-value {
    position: absolute;
    right: 10px;
    top: -2px;
    font-size: 0.8rem;
    color: #fff;
}

.exec-table {
    width: 100%;
    border-collapse: collapse;
}
.exec-table th, .exec-table td {
    padding: 1rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--surface-container);
    font-size: 0.9rem;
}
.exec-table th {
    color: var(--on-surface-variant);
    font-weight: 600;
}
.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}
.status-new { background: #ffebee; color: #d32f2f; }
.status-progress { background: #fff8e1; color: #f57c00; }
.status-done { background: #e3f2fd; color: #1976d2; }

/* Large circle progress for SLA */
.exec-large-circle {
    width: 200px;
    height: 200px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: conic-gradient(var(--primary) 85%, var(--surface-container-high) 0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.exec-large-circle::after {
    content: "";
    position: absolute;
    width: 170px;
    height: 170px;
    background: var(--surface-container-lowest);
    border-radius: 50%;
}
.exec-large-circle-content {
    position: relative;
    z-index: 1;
    text-align: center;
}
.exec-large-circle-content h3 {
    font-size: 3.5rem;
    color: var(--primary);
    line-height: 1;
}
.exec-large-circle-content span {
    font-size: 1rem;
    color: var(--on-surface-variant);
}

.map-placeholder {
    width: 100%;
    height: 300px;
    background: url('https://via.placeholder.com/600x400?text=Map+View') center/cover;
    border-radius: 12px;
}

.chart-placeholder {
    width: 100%;
    height: 200px;
    background: var(--surface-container-low);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--on-surface-variant);
}

/* Responsive Design */
@media (max-width: 1400px) {
    .exec-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .exec-grid-3 {
        grid-template-columns: 1fr;
    }
    .exec-grid-1-2 {
        grid-template-columns: 1fr;
    }
    .exec-stat-main {
        font-size: 2.5rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.exec-card {
    background: var(--surface-container-lowest);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.exec-card:nth-child(1) { animation-delay: 0.1s; }
.exec-card:nth-child(2) { animation-delay: 0.2s; }
.exec-card:nth-child(3) { animation-delay: 0.3s; }
.exec-grid-3:nth-of-type(2) .exec-card:nth-child(1) { animation-delay: 0.4s; }
.exec-grid-3:nth-of-type(2) .exec-card:nth-child(2) { animation-delay: 0.5s; }
.exec-grid-3:nth-of-type(2) .exec-card:nth-child(3) { animation-delay: 0.6s; }
