@charset "utf-8";

/* ============================================================
   LOTTO 6/45 - Complete Unified Stylesheet
   ============================================================ */

/* ------------------------------------------------------------
   1. Global Base & Layout Reset
   ------------------------------------------------------------ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", Roboto, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, dl, dd {
    margin: 0;
    padding: 0;
}

ul, ol {
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

img, svg {
    display: block;
    max-width: 100%;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

button {
    cursor: pointer;
    background: none;
    border: none;
}

main {
    flex: 1 0 auto;
    width: 100%;
}

/* ------------------------------------------------------------
   2. Lotto 3D Ball Common Colors (동행복권 공식 컬러 규격)
   ------------------------------------------------------------ */
.ball-yellow { background: radial-gradient(circle at 35% 30%, #ffdf00 0%, #f59e0b 60%, #d97706 100%); }
.ball-blue   { background: radial-gradient(circle at 35% 30%, #60a5fa 0%, #2563eb 60%, #1d4ed8 100%); }
.ball-red    { background: radial-gradient(circle at 35% 30%, #f87171 0%, #dc2626 60%, #b91c1c 100%); }
.ball-gray   { background: radial-gradient(circle at 35% 30%, #cbd5e1 0%, #64748b 60%, #475569 100%); }
.ball-green  { background: radial-gradient(circle at 35% 30%, #a3e635 0%, #65a30d 60%, #4d7c0f 100%); }

/* ------------------------------------------------------------
   3. Header Navigation Styles (header.php)
   ------------------------------------------------------------ */
.lotto-navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.lotto-navbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lotto-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
}

.lotto-brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.lotto-brand-title {
    display: flex;
    flex-direction: column;
}

.brand-main {
    font-size: 19px;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.brand-main .brand-highlight {
    color: #2563eb;
}

.brand-sub {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    letter-spacing: -0.3px;
    margin-top: -2px;
}

.lotto-nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lotto-nav-item a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    transition: all 0.2s ease;
}

.lotto-nav-item a:hover {
    color: #2563eb;
    background: #f1f5f9;
}

.lotto-nav-item.active a {
    color: #2563eb;
    background: #eff6ff;
    font-weight: 700;
}

.lotto-nav-item.active a i {
    color: #2563eb;
}

.lotto-nav-extra {
    display: flex;
    align-items: center;
    gap: 12px;
}

.draw-schedule-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}

.draw-schedule-badge .pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.lotto-mobile-toggle {
    display: none;
    font-size: 22px;
    color: #334155;
    padding: 6px;
}

@media (max-width: 768px) {
    .lotto-navbar-inner {
        height: 60px;
        padding: 0 16px;
    }
    .draw-schedule-badge {
        display: none;
    }
    .lotto-mobile-toggle {
        display: block;
    }
    .lotto-nav-menu {
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: #ffffff;
        border-bottom: 1px solid #e2e8f0;
        flex-direction: column;
        padding: 12px 16px;
        gap: 6px;
        display: none;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    }
    .lotto-nav-menu.show {
        display: flex;
    }
    .lotto-nav-item {
        width: 100%;
    }
    .lotto-nav-item a {
        width: 100%;
        padding: 10px 14px;
    }
}

/* ------------------------------------------------------------
   4. Main Winning Result Page Styles (main.php)
   ------------------------------------------------------------ */
.lotto-container {
    max-width: 980px;
    margin: 40px auto 70px auto;
    padding: 0 20px;
}

.lotto-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    border: 1px solid #edf2f7;
    overflow: hidden;
    margin-bottom: 30px;
    transition: transform 0.2s ease;
}

.lotto-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: #ffffff;
    padding: 35px 25px;
    text-align: center;
    position: relative;
}

.lotto-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    color: #f8fafc;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.lotto-round-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 8px 0;
}

.round-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.round-btn:hover {
    background: rgba(255, 255, 255, 0.45);
    transform: scale(1.08);
    color: #ffffff;
}

.round-btn.disabled {
    opacity: 0.3;
    pointer-events: none;
    cursor: default;
}

.lotto-round-title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.lotto-round-title span {
    color: #fde047;
}

.lotto-date {
    font-size: 14px;
    color: #dbeafe;
    margin-top: 6px;
    font-weight: 400;
}

.lotto-quick-select {
    margin-top: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.lotto-select {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.95);
    color: #1e3a8a;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.balls-section {
    padding: 45px 20px 40px 20px;
    text-align: center;
    background: #ffffff;
}

.balls-title {
    font-size: 15px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 25px;
    letter-spacing: -0.3px;
}

.balls-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
}

.ball-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lotto-ball {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    position: relative;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18), inset -3px -5px 10px rgba(0, 0, 0, 0.25), inset 3px 5px 10px rgba(255, 255, 255, 0.4);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lotto-ball:hover {
    transform: translateY(-4px) scale(1.06);
}

.plus-symbol {
    font-size: 26px;
    font-weight: 700;
    color: #94a3b8;
    margin: 0 6px;
    user-select: none;
}

.bonus-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.bonus-label {
    font-size: 11px;
    font-weight: 700;
    color: #dc2626;
    background: #fee2e2;
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: -0.2px;
}

.prize-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.prize-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 26px;
    border: 1px solid #edf2f7;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.prize-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
}

.prize-card.rank-1::before {
    background: linear-gradient(to bottom, #f59e0b, #d97706);
}

.prize-card.rank-2::before {
    background: linear-gradient(to bottom, #3b82f6, #1d4ed8);
}

.prize-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.rank-1 .prize-badge {
    background: #fef3c7;
    color: #b45309;
}

.rank-2 .prize-badge {
    background: #dbeafe;
    color: #1e40af;
}

.prize-amount-wrap {
    margin: 10px 0 16px 0;
}

.prize-amount-main {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
}

.prize-amount-korean {
    font-size: 13px;
    font-weight: 600;
    color: #2563eb;
    margin-top: 3px;
}

.prize-detail-list {
    border-top: 1px dashed #e2e8f0;
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.prize-detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #64748b;
}

.prize-detail-row strong {
    color: #1e293b;
    font-weight: 700;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #f8fafc;
    border-radius: 16px;
    border: 2px dashed #cbd5e1;
    margin: 30px 0;
}

.empty-state i {
    font-size: 48px;
    color: #94a3b8;
    margin-bottom: 15px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: #64748b;
}

@media (max-width: 640px) {
    .lotto-container {
        margin: 20px auto 40px auto;
        padding: 0 12px;
    }
    .lotto-header {
        padding: 25px 15px;
    }
    .lotto-round-title {
        font-size: 24px;
    }
    .lotto-ball {
        width: 48px;
        height: 48px;
        font-size: 19px;
    }
    .balls-section {
        padding: 30px 10px;
    }
    .balls-wrap {
        gap: 8px;
    }
    .plus-symbol {
        font-size: 20px;
        margin: 0 2px;
    }
    .prize-amount-main {
        font-size: 22px;
    }
}

/* ------------------------------------------------------------
   5. Generator Page Styles (generator.php)
   ------------------------------------------------------------ */
.gen-container {
    max-width: 980px;
    margin: 35px auto 70px auto;
    padding: 0 20px;
}

.gen-header {
    text-align: center;
    margin-bottom: 30px;
}

.gen-badge {
    display: inline-block;
    background: #eff6ff;
    color: #2563eb;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.gen-title {
    font-size: 30px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.gen-desc {
    font-size: 15px;
    color: #64748b;
}

.control-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid #edf2f7;
    margin-bottom: 30px;
}

.option-group {
    margin-bottom: 24px;
}

.option-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mode-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.mode-tab-btn {
    flex: 1;
    min-width: 140px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 2px solid #e2e8f0;
    background: #ffffff;
    text-align: center;
    transition: all 0.2s;
    font-weight: 700;
    font-size: 14px;
    color: #475569;
}

.mode-tab-btn:hover {
    border-color: #93c5fd;
    background: #f8fafc;
}

.mode-tab-btn.active {
    border-color: #2563eb;
    background: #eff6ff;
    color: #2563eb;
}

.count-selector {
    display: flex;
    gap: 10px;
}

.count-btn {
    padding: 10px 20px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    font-weight: 700;
    font-size: 14px;
    color: #334155;
    transition: all 0.2s;
}

.count-btn.active {
    background: #1e293b;
    color: #ffffff;
    border-color: #1e293b;
}

.number-board-wrap {
    display: none;
    background: #f8fafc;
    border-radius: 16px;
    padding: 20px;
    margin-top: 15px;
    border: 1px dashed #cbd5e1;
}

.board-guide {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 14px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.board-legend {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-fixed { background: #2563eb; }
.legend-excluded { background: #ef4444; }

.number-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 8px;
}

.board-num-btn {
    height: 42px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    transition: all 0.15s;
    user-select: none;
}

.board-num-btn:hover {
    border-color: #2563eb;
    transform: scale(1.05);
}

.board-num-btn.fixed {
    background: #2563eb;
    color: #ffffff;
    border-color: #1d4ed8;
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.board-num-btn.excluded {
    background: #ef4444;
    color: #ffffff;
    border-color: #dc2626;
    text-decoration: line-through;
    opacity: 0.7;
}

.generate-cta-btn {
    width: 100%;
    padding: 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.generate-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.45);
}

.generate-cta-btn:active {
    transform: translateY(1px);
}

.result-section {
    display: none;
    background: #ffffff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid #edf2f7;
    margin-bottom: 30px;
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.result-title {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.action-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
}

.game-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.game-item {
    background: #f8fafc;
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s;
}

.game-item:hover {
    transform: translateX(4px);
    border-color: #cbd5e1;
}

.game-label {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #1e293b;
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-balls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ball {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15), inset -2px -4px 8px rgba(0, 0, 0, 0.25), inset 2px 4px 8px rgba(255, 255, 255, 0.4);
    animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

@keyframes popIn {
    0% { transform: scale(0.4); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.game-meta {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    min-width: 80px;
    text-align: right;
}

.stat-tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.stat-tip-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #edf2f7;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

.tip-card-title {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mini-balls {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.mini-ball {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

@media (max-width: 640px) {
    .game-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .ball {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    .game-meta {
        text-align: left;
    }
}

/* ------------------------------------------------------------
   6. Stats Page Styles (stats.php)
   ------------------------------------------------------------ */
.stats-container {
    max-width: 1040px;
    margin: 35px auto 70px auto;
    padding: 0 20px;
}

.stats-header {
    text-align: center;
    margin-bottom: 30px;
}

.stats-badge {
    display: inline-block;
    background: #f0fdf4;
    color: #16a34a;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.stats-title {
    font-size: 30px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.stats-desc {
    font-size: 15px;
    color: #64748b;
}

.filter-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 20px 24px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #edf2f7;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.filter-btn.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.summary-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 22px;
    border: 1px solid #edf2f7;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

.summary-card-label {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.summary-card-value {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lotto-ball-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15), inset -2px -4px 6px rgba(0, 0, 0, 0.25), inset 2px 4px 6px rgba(255, 255, 255, 0.4);
}

.stats-section-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid #edf2f7;
    margin-bottom: 30px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.section-title {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.freq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.freq-item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.15s, border-color 0.15s;
}

.freq-item:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.freq-info {
    flex: 1;
}

.freq-cnt {
    font-size: 14px;
    font-weight: 800;
    color: #1e293b;
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.freq-cnt span {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
}

.freq-bar-bg {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.freq-bar-fill {
    height: 100%;
    background: #2563eb;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.two-col-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.stat-table {
    width: 100%;
    border-collapse: collapse;
}

.stat-table th {
    text-align: left;
    font-size: 12px;
    color: #64748b;
    padding: 10px 12px;
    border-bottom: 2px solid #edf2f7;
}

.stat-table td {
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    color: #334155;
    vertical-align: middle;
}

.stat-bar-cell {
    width: 45%;
}

.stat-progress-bg {
    width: 100%;
    height: 8px;
    background: #edf2f7;
    border-radius: 6px;
    overflow: hidden;
}

.stat-progress-fill {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

/* ------------------------------------------------------------
   7. History Page Styles (history.php)
   ------------------------------------------------------------ */
.hist-container {
    max-width: 1040px;
    margin: 35px auto 70px auto;
    padding: 0 20px;
}

.hist-header {
    text-align: center;
    margin-bottom: 30px;
}

.hist-badge {
    display: inline-block;
    background: #fef3c7;
    color: #b45309;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.hist-title {
    font-size: 30px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.hist-desc {
    font-size: 15px;
    color: #64748b;
}

.search-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #edf2f7;
    margin-bottom: 25px;
}

.search-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.search-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-label {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
}

.search-input {
    padding: 9px 14px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    background: #ffffff;
}

.search-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-btn {
    padding: 9px 20px;
    border-radius: 10px;
    background: #2563eb;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.search-btn:hover {
    background: #1d4ed8;
}

.reset-btn {
    padding: 9px 16px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.reset-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.table-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid #edf2f7;
    overflow: hidden;
    margin-bottom: 25px;
}

.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.hist-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    white-space: nowrap;
}

.hist-table th {
    background: #f8fafc;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
}

.hist-table td {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    color: #334155;
    vertical-align: middle;
}

.hist-table tr:hover td {
    background: #f8fafc;
}

.round-link {
    font-weight: 800;
    font-size: 15px;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.round-link:hover {
    text-decoration: underline;
    color: #1d4ed8;
}

.table-balls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hist-ball {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.plus-char {
    font-size: 14px;
    font-weight: bold;
    color: #94a3b8;
    margin: 0 2px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s;
}

.page-link:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.page-link.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.page-link.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ------------------------------------------------------------
   8. Global Footer Styling (footer.php)
   ------------------------------------------------------------ */
.footerWrap {
    flex-shrink: 0;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 24px 20px;
    margin-top: auto;
}

.footerArea {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 24px;
}

.leftCon {
    flex: 1;
    min-width: 0;
}

.leftCon .data-source-notice {
    font-size: 13px;
    color: #475569;
    margin-bottom: 6px;
    line-height: 1.5;
}

.leftCon address {
    font-style: normal;
    font-size: 12px;
    color: #64748b;
    line-height: 1.6;
}

.leftCon address span {
    color: #cbd5e1;
    margin: 0 4px;
}

.leftCon .copyright {
    font-size: 12px;
    font-weight: 500;
    color: #94a3b8;
    margin-top: 4px;
    letter-spacing: 0.3px;
}

.rightCon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* Family Site Selector */
.family-site-box {
    position: relative;
    width: 180px;
}

.family-site-select {
    width: 100%;
    height: 38px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0 32px 0 14px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.family-site-select:hover,
.family-site-select:focus {
    border-color: #166534;
    background: #f0fdf4;
    color: #166534;
}

.family-site-box .select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #94a3b8;
    pointer-events: none;
}

@media (max-width: 860px) {
    .footerArea {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .rightCon,
    .family-site-box {
        width: 100%;
    }
}
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.family-site-select:hover {
    background: #ffffff;
    border-color: #94a3b8;
    color: #0f172a;
}

.family-site-select:focus {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.family-site-box .select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: #64748b;
    pointer-events: none;
}

/* ------------------------------------------------------------
   9. Webkit Scrollbar
   ------------------------------------------------------------ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

@media (max-width: 640px) {
    .footerWrap {
        padding: 24px 16px;
    }
    .footerArea {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .family-site-box,
    .family-site-select {
        width: 100%;
    }
    .leftCon address {
        font-size: 12px;
    }
    .leftCon address span {
        display: none;
    }
}

/* ------------------------------------------------------------
   8. Store & Famous Lotto Shop Styles (stores/index.php)
   ------------------------------------------------------------ */
.store-container {
    max-width: 1080px;
    margin: 35px auto 70px auto;
    padding: 0 20px;
}

.store-header {
    text-align: center;
    margin-bottom: 28px;
}

.store-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.store-title {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.store-desc {
    font-size: 15px;
    color: #64748b;
}

/* Tabs */
.store-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    background: #e2e8f0;
    padding: 6px;
    border-radius: 14px;
}

.store-tab-btn {
    flex: 1;
    text-align: center;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #64748b;
    background: transparent;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.store-tab-btn:hover:not(.active) {
    color: #1e293b;
    background: rgba(255, 255, 255, 0.4);
}

.store-tab-btn.active {
    background: #ffffff;
    color: #1e293b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Region Filter Bar */
.store-region-bar {
    background: #ffffff;
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 22px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.region-label {
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.region-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.region-chip {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.region-chip:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.region-chip.active {
    background: #2563eb;
    color: #ffffff;
    font-weight: 700;
    border-color: #1d4ed8;
}

/* Round Control Box */
.round-control-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    background: #ffffff;
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.round-select-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.round-select-label {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
}

.round-select {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    background: #ffffff;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s;
}

.round-select:focus {
    border-color: #2563eb;
}

.round-nav-btns {
    display: flex;
    gap: 8px;
}

.btn-round-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #334155;
    transition: all 0.15s;
}

.btn-round-nav:hover:not(.disabled) {
    background: #e2e8f0;
    color: #0f172a;
}

.btn-round-nav.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Round Draw Summary */
.round-draw-summary {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #ffffff;
    border-radius: 16px;
    padding: 18px 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.15);
}

.summary-round-title {
    font-size: 16px;
    color: #f8fafc;
}

.summary-round-title strong {
    color: #facc15;
    font-size: 18px;
}

.draw-dt {
    font-size: 13px;
    color: #94a3b8;
    margin-left: 6px;
}

.summary-balls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.summary-balls .plus-sign {
    font-weight: 800;
    font-size: 18px;
    color: #94a3b8;
    margin: 0 2px;
}

/* Store Table Card */
.store-table-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #edf2f7;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    padding: 24px;
}

.card-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
    flex-wrap: wrap;
    gap: 8px;
}

.list-count-badge {
    font-size: 15px;
    color: #334155;
    font-weight: 600;
}

.list-count-badge strong {
    color: #2563eb;
    font-weight: 800;
}

.filtered-region-tag,
.ranking-info-tag {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 6px;
}

/* Store Grid (Round tab) */
.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 16px;
}

.store-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.store-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}

.store-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.store-seq-badge {
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
}

.store-name {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auto-type-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
}

.badge-auto {
    background: #dbeafe;
    color: #1e40af;
}

.badge-manual {
    background: #fef3c7;
    color: #92400e;
}

.badge-semi {
    background: #e0e7ff;
    color: #3730a3;
}

.store-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    margin-bottom: 14px;
}

.store-info-row {
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.store-info-row .info-label {
    color: #64748b;
    white-space: nowrap;
    width: 62px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.store-info-row .info-val {
    color: #334155;
    word-break: break-all;
    flex: 1;
}

.store-info-row .address-val {
    color: #475569;
    line-height: 1.4;
}

.store-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px dashed #e2e8f0;
    padding-top: 12px;
    margin-top: auto;
}

.accum-win-badge {
    font-size: 12px;
    color: #dc2626;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-map-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #2563eb;
    background: #eff6ff;
    padding: 5px 11px;
    border-radius: 6px;
    transition: background 0.15s;
    margin-left: auto;
}

.btn-map-link:hover {
    background: #dbeafe;
    color: #1d4ed8;
}

/* Ranking Table */
.ranking-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: left;
}

.ranking-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    font-size: 13px;
    padding: 12px 14px;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.ranking-table td {
    padding: 13px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}

.ranking-table tbody tr:hover {
    background: #f8fafc;
}

.top-rank-row {
    background: #fffdf5;
}

.rank-col {
    text-align: center;
}

.rank-crown {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-weight: 800;
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 20px;
}

.rank-crown.gold {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

.rank-crown.silver {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.rank-crown.bronze {
    background: #ffedd5;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.rank-num {
    font-weight: 700;
    color: #64748b;
    font-size: 14px;
}

.store-name-col strong {
    color: #0f172a;
    font-size: 15px;
}

.badge-win-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fee2e2;
    color: #b91c1c;
    font-weight: 800;
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 20px;
}

.second-win-col {
    color: #64748b;
    font-size: 13px;
    text-align: center;
}

.region-pill {
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
}

.addr-text {
    color: #64748b;
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 280px;
}

.last-round-col {
    font-size: 13px;
    color: #64748b;
    white-space: nowrap;
}

.btn-table-map {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    transition: all 0.15s;
}

.btn-table-map:hover {
    background: #2563eb;
    color: #ffffff;
}

/* Pagination */
.store-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 30px;
}

.store-pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.15s;
}

.store-pagination .page-link:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.store-pagination .page-link.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

/* Empty State */
.empty-store-box {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.empty-icon {
    font-size: 40px;
    margin-bottom: 12px;
    color: #cbd5e1;
}

.empty-text {
    font-size: 16px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 6px;
}

.empty-sub {
    font-size: 13px;
    color: #94a3b8;
}

@media (max-width: 768px) {
    .store-container {
        margin: 20px auto 40px auto;
        padding: 0 12px;
    }
    .store-title {
        font-size: 22px;
    }
    .store-tabs {
        flex-direction: column;
    }
    .store-table-card {
        padding: 16px;
    }
    .store-grid {
        grid-template-columns: 1fr;
    }
    .round-control-box {
        flex-direction: column;
        align-items: stretch;
    }
    .round-select-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
    .round-select {
        width: 100%;
    }
    .round-nav-btns {
        justify-content: space-between;
    }
    .btn-round-nav {
        flex: 1;
        justify-content: center;
    }
    .round-draw-summary {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* ============================================================
   농사온 (NongSaOn) - 농축수산물 유통정보 시스템 모던 스타일
   ============================================================ */

/* 1. Header & Navigation */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.header_inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 22px;
    font-weight: 800;
    color: #166534;
}
.header-logo .logo-icon {
    font-size: 24px;
    color: #22c55e;
}
.header-logo .logo-badge {
    font-size: 11px;
    font-weight: 700;
    background: #dcfce7;
    color: #15803d;
    padding: 2px 8px;
    border-radius: 9999px;
    letter-spacing: 0.5px;
}
.gnb {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.gnb li a.depth1 {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s ease;
}
.gnb li a.depth1:hover {
    color: #166534;
    background-color: #f0fdf4;
}
.gnb li.active a.depth1 {
    color: #15803d;
    background-color: #dcfce7;
    font-weight: 700;
}
.header_right_info {
    display: flex;
    align-items: center;
}
.status-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    padding: 5px 12px;
    border-radius: 9999px;
}
.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.4);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* 2. Container & Layout */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}
main {
    flex: 1;
    background-color: #f8fafc;
}

/* 3. Hero Header */
.dashboard-hero {
    background: linear-gradient(135deg, #14532d 0%, #166534 60%, #15803d 100%);
    border-radius: 16px;
    padding: 36px 32px;
    color: #ffffff;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    box-shadow: 0 10px 25px -5px rgba(22, 101, 52, 0.3);
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    backdrop-filter: blur(4px);
}
.hero-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}
.hero-desc {
    font-size: 15px;
    color: #bbf7d0;
    max-width: 600px;
}
.hero-quick-links {
    display: flex;
    gap: 12px;
}

/* 4. Stat Cards Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px -3px rgba(0, 0, 0, 0.08);
}
.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}
.icon-green  { background: #dcfce7; color: #166534; }
.icon-blue   { background: #dbeafe; color: #1e40af; }
.icon-purple { background: #f3e8ff; color: #6b21a8; }
.icon-orange { background: #ffedd5; color: #c2410c; }
.stat-info {
    display: flex;
    flex-direction: column;
}
.stat-label {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 4px;
}
.stat-value {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}
.stat-value small {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
}
.stat-sub {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
}

/* 5. Major Items Grid */
.dashboard-section {
    margin-bottom: 36px;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 16px;
}
.section-title {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-desc {
    font-size: 14px;
    color: #64748b;
    margin-top: 4px;
}
.section-more {
    font-size: 13px;
    font-weight: 600;
    color: #166534;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}
.section-more:hover {
    text-decoration: underline;
}
.major-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 20px;
}
.major-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cat-pill {
    font-size: 11px;
    font-weight: 700;
    background: #f1f5f9;
    color: #475569;
    padding: 3px 8px;
    border-radius: 6px;
}
.item-name {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    flex: 1;
    margin-left: 10px;
}
.detail-link {
    font-size: 12px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 6px;
    background: #eff6ff;
}
.detail-link:hover {
    background: #dbeafe;
}
.card-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.price-box {
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
}
.wholesale-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.retail-box {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}
.box-badge {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 2px;
}
.retail-box .box-badge {
    color: #047857;
}
.box-unit {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 6px;
}
.retail-box .box-unit {
    color: #059669;
}
.box-main-price {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    margin-bottom: 6px;
}
.box-main-price.text-accent {
    color: #059669;
}
.box-range {
    font-size: 11px;
    color: #64748b;
}

/* 6. Dashboard Row Grid */
.dashboard-row-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
}
.dashboard-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.card-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}
.table-compact {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.table-compact th {
    text-align: left;
    padding: 8px 10px;
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
}
.table-compact td {
    padding: 10px;
    border-bottom: 1px solid #f1f5f9;
}
.rank-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e2e8f0;
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    margin-right: 6px;
}
.rank-top {
    background: #fef08a;
    color: #854d0e;
}
.badge-unit {
    font-size: 11px;
    background: #f1f5f9;
    color: #475569;
    padding: 2px 6px;
    border-radius: 4px;
}
.badge-success {
    font-size: 11px;
    font-weight: 700;
    background: #dcfce7;
    color: #166534;
    padding: 2px 8px;
    border-radius: 9999px;
}
.batch-guide-box {
    margin-top: 16px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 12px;
    color: #64748b;
}

/* 7. Page Header & Filter Form */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}
.page-breadcrumb {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 6px;
}
.page-breadcrumb a {
    color: #64748b;
    text-decoration: none;
}
.page-title {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}
.page-desc {
    font-size: 14px;
    color: #64748b;
    margin-top: 4px;
}
.filter-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.filter-group label {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
}
.filter-grow {
    flex: 1;
    min-width: 260px;
}
.form-control {
    height: 40px;
    padding: 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    color: #0f172a;
    background: #ffffff;
    outline: none;
    transition: border-color 0.2s;
}
.form-control:focus {
    border-color: #166534;
    box-shadow: 0 0 0 2px rgba(22, 101, 52, 0.15);
}
input[type="date"].form-control,
.input-date {
    min-width: 150px;
    font-family: inherit;
    cursor: pointer;
}
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}
.fixed-market-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 14px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    white-space: nowrap;
    user-select: none;
}
.fixed-market-pill small,
.fixed-market-pill .text-muted {
    color: #64748b;
    font-size: 12px;
}
.input-with-button {
    display: flex;
    gap: 8px;
}
.input-with-button .form-control {
    flex: 1;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: all 0.2s;
}
.btn-primary {
    background: #166534;
    color: #ffffff;
}
.btn-primary:hover {
    background: #14532d;
}
.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}
.btn-outline {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
}
.btn-outline:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

/* Category Quick Tabs */
.category-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.tab-item {
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
}
.tab-item:hover {
    border-color: #166534;
    color: #166534;
}
.tab-item.active {
    background: #166534;
    color: #ffffff;
    border-color: #166534;
}

/* 8. Data Tables */
.table-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}
.table-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafafa;
    flex-wrap: wrap;
    gap: 10px;
}
.table-info {
    font-size: 13px;
    color: #475569;
}
.table-legend {
    display: flex;
    gap: 8px;
}
.legend-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
}
.legend-whsl { background: #e0f2fe; color: #0369a1; }
.legend-rtl  { background: #dcfce7; color: #15803d; }

.table-responsive {
    overflow-x: auto;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.data-table th {
    padding: 12px 14px;
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}
.data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
    vertical-align: middle;
}
.data-table tbody tr:hover {
    background-color: #f8fafc;
}
.th-whsl {
    background: #f0f9ff !important;
    color: #0369a1 !important;
}
.th-rtl {
    background: #f0fdf4 !important;
    color: #15803d !important;
}
.text-whsl { color: #0284c7; }
.text-rtl  { color: #16a34a; }
.badge-cat {
    font-size: 11px;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
    padding: 3px 8px;
    border-radius: 4px;
}
.unit-pill {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
}
.unit-whsl {
    background: #f0f9ff;
    border-color: #bae6fd;
    color: #0369a1;
}
.unit-rtl {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #15803d;
}
.item-link {
    color: #0f172a;
    text-decoration: none;
}
.item-link:hover {
    color: #166534;
    text-decoration: underline;
}
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-icon:hover {
    background: #e2e8f0;
    color: #166534;
}
.border-cat-top td {
    border-top: 2px solid #e2e8f0;
}

/* 9. Detail Page Styles */
.title-with-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.badge-code {
    font-size: 13px;
    font-weight: 700;
    background: #f1f5f9;
    color: #475569;
    padding: 4px 10px;
    border-radius: 6px;
}
.badge-date {
    font-size: 13px;
    color: #64748b;
}
.detail-section {
    margin-bottom: 32px;
}
.trend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}
.trend-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.trend-date {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 4px;
}
.trend-price-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 4px;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .dashboard-row-grid {
        grid-template-columns: 1fr;
    }
    .major-items-grid {
        grid-template-columns: 1fr;
    }
    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-group {
        width: 100%;
    }
}

/* ------------------------------------------------------------
   Global Alignment & Utility Classes
   ------------------------------------------------------------ */
.text-left   { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right  { text-align: right !important; }

th.text-left, td.text-left     { text-align: left !important; }
th.text-center, td.text-center { text-align: center !important; }
th.text-right, td.text-right   { text-align: right !important; }

.font-weight-bold, .font-bold  { font-weight: 700 !important; }
.font-normal                   { font-weight: 400 !important; }

.text-muted   { color: #64748b !important; }
.text-primary { color: #166534 !important; }
.text-danger  { color: #dc2626 !important; }
.text-warning { color: #d97706 !important; }
.text-info    { color: #0284c7 !important; }
.text-success { color: #16a34a !important; }

/* Dashboard Price Boxes Number Alignment */
.price-box .box-main-price,
.price-box .box-range {
    text-align: right;
}

/* ------------------------------------------------------------
   Action Button Group & Modal Styles (price.php)
   ------------------------------------------------------------ */
.action-btn-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}
.btn-icon.btn-detail-view:hover {
    background: #e0f2fe;
    color: #0369a1;
}
.btn-icon.btn-chart-view {
    cursor: pointer;
    border: none;
    background: #f1f5f9;
}
.btn-icon.btn-chart-view:hover {
    background: #fef3c7;
    color: #b45309;
}

/* Chart Modal Styles */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-dialog {
    background: #ffffff;
    border-radius: 16px;
    max-width: 780px;
    width: 100%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    animation: modalPop 0.25s ease-out;
}
@keyframes modalPop {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: #f8fafc;
}
.modal-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #0284c7;
    background: #e0f2fe;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 4px;
}
.modal-title {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 4px;
}
.modal-subtitle {
    font-size: 12px;
    color: #64748b;
}
.modal-close-btn {
    font-size: 26px;
    line-height: 1;
    color: #94a3b8;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.15s;
    padding: 0 4px;
}
.modal-close-btn:hover {
    color: #0f172a;
}
.modal-body {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Chart Toolbar */
.chart-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.toolbar-controls-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.filter-btn-group, .period-btn-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.toolbar-label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-right: 2px;
}
.btn-period, .btn-price-type, .btn-market-type {
    height: 32px;
    padding: 0 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-period:hover, .btn-price-type:hover, .btn-market-type:hover {
    background: #e2e8f0;
    color: #0f172a;
}
.btn-period.active, .btn-price-type.active {
    background: #166534;
    color: #ffffff;
    border-color: #166534;
}
.btn-market-type.active {
    background: #0f766e;
    color: #ffffff;
    border-color: #0f766e;
}

/* Chart Canvas Card */
.chart-canvas-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.chart-canvas-wrap {
    position: relative;
    height: 260px;
    width: 100%;
}
.chart-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(2px);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #166534;
    border-radius: 12px;
}

/* Stats Summary Grid in Modal */
.chart-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.chart-stat-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
}
.whsl-stat { border-left: 4px solid #0284c7; }
.rtl-stat  { border-left: 4px solid #16a34a; }
.diff-stat { border-left: 4px solid #166534; }

.stat-name {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 4px;
}
.stat-price {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
}
.stat-unit {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

.modal-footer {
    padding: 14px 24px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.modal-hint {
    font-size: 12px;
    color: #64748b;
}

@media (max-width: 640px) {
    .chart-stats-grid {
        grid-template-columns: 1fr;
    }
}


