:root {
    --kakyah-red: #d62828;
    --kakyah-red-dark: #a81f1f;
    --kakyah-orange: #f77f00;
    --kakyah-cream: #fdf6ec;
    --kakyah-cream-dark: #f5e8d3;
    --kakyah-text: #3a2e26;
    --kakyah-green: #2a9d8f;
    --kakyah-gold: #e9b44c;
}

body {
    background-color: var(--kakyah-cream);
    font-family: 'Nunito', sans-serif;
    color: var(--kakyah-text);
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: 'Poppins', sans-serif;
}

/* Navbar */
.app-navbar {
    background: linear-gradient(135deg, var(--kakyah-red) 0%, var(--kakyah-orange) 100%) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.app-navbar .nav-link {
    font-weight: 600;
    opacity: 0.92;
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.app-navbar .nav-link:hover {
    opacity: 1;
    color: #fff !important;
    transform: translateY(-1px);
}
.navbar-brand {
    font-size: 1.3rem;
}

/* Hero banner (dashboard header) */
.hero-banner {
    background: linear-gradient(135deg, var(--kakyah-red) 0%, var(--kakyah-orange) 100%);
    border-radius: 16px;
    padding: 1.75rem 2rem;
    color: #fff;
    box-shadow: 0 6px 18px rgba(214, 40, 40, 0.25);
    margin-bottom: 1.5rem;
}
.hero-banner h3 { color: #fff; margin-bottom: 0.15rem; }
.hero-banner .text-muted { color: rgba(255,255,255,0.85) !important; }
.hero-banner .btn-light-action {
    background: #fff;
    color: var(--kakyah-red);
    font-weight: 700;
    border: none;
    border-radius: 10px;
    padding: 0.65rem 1.4rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hero-banner .btn-light-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.2);
    color: var(--kakyah-red-dark);
}

/* Cards */
.card {
    border: none;
    border-radius: 14px;
    box-shadow: 0 3px 10px rgba(58, 46, 38, 0.08);
}

/* Stat boxes */
.stat-box {
    border-radius: 14px;
    padding: 1.1rem 1rem;
    background: #fff;
    text-align: center;
    box-shadow: 0 3px 10px rgba(58, 46, 38, 0.08);
    border-top: 3px solid var(--kakyah-orange);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.stat-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(58, 46, 38, 0.14);
}
.stat-box .text-muted.small {
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 0.7rem !important;
}
.stat-box .value {
    font-size: 1.45rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    color: var(--kakyah-text);
}

/* Buttons */
.btn-danger {
    background-color: var(--kakyah-red);
    border-color: var(--kakyah-red);
    font-weight: 600;
    border-radius: 10px;
}
.btn-danger:hover, .btn-danger:focus {
    background-color: var(--kakyah-red-dark);
    border-color: var(--kakyah-red-dark);
}
.btn-outline-danger {
    border-radius: 10px;
    font-weight: 600;
}
.btn-lg { border-radius: 12px; }
.btn { border-radius: 10px; }

/* Tables */
.table thead {
    background-color: var(--kakyah-cream-dark);
}
.table thead th {
    font-family: 'Poppins', sans-serif;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--kakyah-text);
    border-bottom: none;
    white-space: nowrap;
}
.table-report-total td {
    background-color: var(--kakyah-cream-dark);
    border-top: 2px solid var(--kakyah-orange);
}

.low-stock { background-color: #fff3cd !important; }

/* Badges */
.badge.bg-success { background-color: var(--kakyah-green) !important; }
.price-badge-cheap {
    background-color: var(--kakyah-green);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.25em 0.6em;
    vertical-align: middle;
}
.event-badge {
    background-color: var(--kakyah-gold) !important;
    color: #2b1d10 !important;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.3em 0.6em;
    cursor: help;
    border: 1px solid #c9932f;
}

/* Forecast banner */
.forecast-ok {
    background: #e8f6f3;
    border-left: 4px solid var(--kakyah-green);
    border-radius: 10px;
}
.forecast-warn {
    background: #fdecea;
    border-left: 4px solid var(--kakyah-red);
    border-radius: 10px;
}
.event-banner {
    background: #fff4e0;
    border-left: 4px solid var(--kakyah-gold);
    border-radius: 10px;
    color: var(--kakyah-text);
}

/* Supplier cards */
.supplier-card { border-top: 3px solid var(--kakyah-orange); }
.supplier-item-row {
    border-bottom: 1px dashed var(--kakyah-cream-dark);
    padding-bottom: 0.6rem;
    margin-bottom: 0.6rem;
}
.supplier-item-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Loan preset cards */
.border.rounded, .loan-preset-card {
    border-radius: 14px !important;
    border-color: var(--kakyah-cream-dark) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.loan-preset-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(58, 46, 38, 0.12);
}

/* Auth pages */
body.auth-page {
    background: linear-gradient(135deg, var(--kakyah-red) 0%, var(--kakyah-orange) 100%);
    min-height: 100vh;
}
.auth-card {
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

/* Section headings */
h4 i, h5 i { color: var(--kakyah-orange); margin-right: 0.3rem; }

/* Panduan / Instructions accordion */
.accordion-item {
    border: none;
    border-radius: 12px !important;
    margin-bottom: 0.75rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(58, 46, 38, 0.06);
}
.accordion-button {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    background: #fff;
    color: var(--kakyah-text);
}
.accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, var(--kakyah-red) 0%, var(--kakyah-orange) 100%);
    color: #fff;
    box-shadow: none;
}
.accordion-button:not(.collapsed) i {
    color: #fff !important;
}
.accordion-button:focus {
    box-shadow: none;
    border-color: var(--kakyah-orange);
}
.accordion-body ul { padding-left: 1.2rem; }
.accordion-body li { margin-bottom: 0.35rem; }

/* Welcome modal */
.welcome-modal-content {
    border-radius: 16px;
    border: none;
}
.welcome-modal-content .modal-title {
    font-family: 'Poppins', sans-serif;
    color: var(--kakyah-text);
}

/* Overlay animasi "berniaga sepanjang hari" */
.business-day-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(58, 46, 38, 0.55);
    z-index: 2000;
    align-items: flex-start;
    justify-content: center;
    padding-top: 2rem;
}
.business-day-overlay.active {
    display: flex;
}
.business-day-card {
    background: #fff;
    border-radius: 20px;
    padding: 2.5rem 2.5rem;
    text-align: center;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}
.business-day-icon {
    font-size: 3rem;
    color: var(--kakyah-orange);
    margin-bottom: 0.5rem;
}
.business-day-time {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: var(--kakyah-text);
    opacity: 0.7;
    font-weight: 700;
}
.business-day-label {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--kakyah-text);
}
.business-day-progress {
    height: 12px;
    border-radius: 20px;
    background: var(--kakyah-cream-dark);
    overflow: hidden;
}
.business-day-progress .progress-bar {
    background: linear-gradient(90deg, var(--kakyah-red), var(--kakyah-orange));
    transition: width 0.6s ease;
}

/* KKM inspection card - mendesak, perlu jawapan segera */
.kkm-card {
    background: linear-gradient(135deg, #6a1b1b 0%, #a83232 100%);
    border-radius: 16px;
    padding: 1.5rem 1.75rem;
    color: #fff;
    box-shadow: 0 6px 20px rgba(106, 27, 27, 0.4);
    animation: kkm-pulse 2s ease-in-out infinite;
}
.kkm-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}
.kkm-question {
    font-family: 'Poppins', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}
@keyframes kkm-pulse {
    0%, 100% { box-shadow: 0 6px 20px rgba(106, 27, 27, 0.4); }
    50% { box-shadow: 0 6px 28px rgba(168, 50, 50, 0.7); }
}

/* Weather forecast card (gaya Lemonade Stand) */
.weather-card {
    background: linear-gradient(135deg, #4a6fa5 0%, #6b9ac4 100%);
    border-radius: 16px;
    padding: 1.25rem 1.75rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: 0 6px 18px rgba(74, 111, 165, 0.3);
}
.weather-icon {
    font-size: 3rem;
    flex-shrink: 0;
}
.weather-label {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
}

/* Achievement popup */
.achievement-popup {
    background: linear-gradient(135deg, #fff8e6 0%, #ffe9b8 100%);
    border: 1px solid var(--kakyah-gold);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    box-shadow: 0 4px 14px rgba(233, 180, 76, 0.35);
    animation: achievement-glow 1.8s ease-in-out infinite alternate;
}
.achievement-popup-item:not(:last-child) {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed rgba(0,0,0,0.08);
}
.achievement-icon {
    font-size: 1.8rem;
    color: #c9932f;
    background: #fff;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    flex-shrink: 0;
}
@keyframes achievement-glow {
    from { box-shadow: 0 4px 14px rgba(233, 180, 76, 0.35); }
    to   { box-shadow: 0 6px 22px rgba(233, 180, 76, 0.6); }
}

/* Customer reviews */
.review-item {
    background: var(--kakyah-cream);
    border-radius: 10px;
    padding: 0.6rem 0.8rem;
    border-left: 3px solid var(--kakyah-gold);
}
.review-stars { font-size: 0.85rem; letter-spacing: 1px; }
.review-quote { font-style: italic; font-size: 0.9rem; color: var(--kakyah-text); }

/* Achievement gallery page */
.achievement-card {
    border-radius: 14px;
    padding: 1rem;
    text-align: center;
    background: #fff;
    box-shadow: 0 3px 10px rgba(58, 46, 38, 0.08);
    transition: transform 0.15s ease;
}
.achievement-card.locked {
    opacity: 0.45;
    filter: grayscale(1);
}
.achievement-card:not(.locked):hover {
    transform: translateY(-3px);
}
.achievement-card .icon-circle {
    font-size: 1.8rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--kakyah-cream-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.6rem;
    color: var(--kakyah-orange);
}
