/* ==========================================================================
   DESIGN SYSTEM & CSS CUSTOM PROPERTIES (LUXURY ROSE/PINK THEME)
   ========================================================================== */
:root {
    /* Pink Palette Theme Colors */
    --color-pink: #db2777;
    --color-pink-hover: #be185d;
    --color-pink-light: #fbcfe8;
    --color-rose: #f43f5e;
    --color-rose-hover: #e11d48;
    
    --color-teal: #0d9488;
    --color-teal-hover: #0f766e;
    --color-purple: #a855f7;
    --color-emerald: #10b981;
    --color-amber: #f97316;
    --color-danger: #f43f5e;
    
    /* Font Families: Custom elegant Thai fonts */
    --font-thai: 'IBM Plex Sans Thai', 'Prompt', 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Layout Variables */
    --border-radius-sm: 8px;
    --border-radius-md: 14px;
    --border-radius-lg: 24px;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Theme Variables - Default Plum Dark Theme */
    --bg-primary: #120e16;
    --bg-secondary: #1d1724;
    --bg-tertiary: #292033;
    --text-primary: #fff1f2;
    --text-secondary: #f472b6;
    --border-color: #3b2b47;
    --card-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.6), 0 5px 15px rgba(0, 0, 0, 0.4);
    --glass-bg: rgba(29, 23, 36, 0.85);
    --glass-border: rgba(219, 39, 119, 0.15);
    --backdrop-blur: blur(20px);
    --table-row-hover: rgba(219, 39, 119, 0.05);
    --input-bg: #120e16;
    --scrollbar-bg: #1d1724;
    --scrollbar-thumb: #3b2b47;
    --glow-color: rgba(219, 39, 119, 0.45);
}

/* Light Theme Variables - Rose Quartz / Sakura */
body.light-theme {
    --bg-primary: #fff1f2;
    --bg-secondary: #ffffff;
    --bg-tertiary: #ffe4e6;
    --text-primary: #4c0519;
    --text-secondary: #9d174d;
    --border-color: #fbcfe8;
    --card-shadow: 0 15px 30px -10px rgba(157, 23, 77, 0.06), 0 5px 15px rgba(157, 23, 77, 0.03);
    --glass-bg: rgba(255, 255, 255, 0.88);
    --glass-border: rgba(219, 39, 119, 0.12);
    --backdrop-blur: blur(16px);
    --table-row-hover: rgba(219, 39, 119, 0.025);
    --input-bg: #fff1f2;
    --scrollbar-bg: #ffe4e6;
    --scrollbar-thumb: #fbcfe8;
    --glow-color: rgba(219, 39, 119, 0.2);
}

/* ==========================================================================
   GLOBAL RESET & STYLES (ELEGANT TYPOGRAPHY)
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-thai);
    font-size: 15.5px;
    font-weight: 400;
    line-height: 1.65;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--scrollbar-bg);
}
::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-pink);
}

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */
.app-container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    min-height: 100vh;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--backdrop-blur);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}

.app-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-pink), var(--color-rose), var(--color-purple));
}

.header-title-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--color-pink), var(--color-rose));
    color: #fff;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 15px var(--glow-color);
}

.header-text h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
    background: linear-gradient(135deg, #ffffff 30%, var(--color-pink-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
body.light-theme .header-text h1 {
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
    color: var(--text-primary);
}

.header-text p {
    font-size: 13.5px;
    color: var(--text-secondary);
    margin-top: 3px;
    font-weight: 500;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Theme Toggle Button */
.btn-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}
.btn-icon:hover {
    background: var(--bg-tertiary);
    border-color: var(--color-pink);
    transform: scale(1.08) rotate(15deg);
    box-shadow: 0 0 15px var(--glow-color);
}
.btn-icon:active {
    transform: scale(0.92);
}

body.dark-theme .btn-icon .icon-light { display: block; color: #fbbf24; }
body.dark-theme .btn-icon .icon-dark { display: none; }
body.light-theme .btn-icon .icon-light { display: none; }
body.light-theme .btn-icon .icon-dark { display: block; color: var(--color-pink); }

/* ==========================================================================
   KPI CARDS (DYNAMIC BACKDROP EFFECTS)
   ========================================================================== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 20px;
}

.kpi-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--backdrop-blur);
    border-radius: var(--border-radius-lg);
    padding: 26px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--card-shadow);
    transition: transform 0.15s ease-out, box-shadow var(--transition-fast), border-color var(--transition-fast);
    transform-style: preserve-3d;
    perspective: 1000px;
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 100% 0%, rgba(219, 39, 119, 0.05), transparent 60%);
    pointer-events: none;
}

.kpi-card:hover {
    transform: translateY(-5px);
    border-color: rgba(219, 39, 119, 0.4);
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.7), 0 0 15px rgba(219, 39, 119, 0.15);
}

body.light-theme .kpi-card:hover {
    box-shadow: 0 20px 35px -10px rgba(157, 23, 77, 0.1), 0 0 15px rgba(219, 39, 119, 0.1);
}

.kpi-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.1);
}

.icon-pink { background: rgba(219, 39, 119, 0.15); color: #f472b6; border: 1px solid rgba(219, 39, 119, 0.2); }
.icon-rose { background: rgba(244, 63, 94, 0.15); color: #fb7185; border: 1px solid rgba(244, 63, 94, 0.2); }
.icon-emerald { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.2); }
.icon-amber { background: rgba(249, 115, 22, 0.15); color: #ff9d43; border: 1px solid rgba(249, 115, 22, 0.2); }

body.light-theme .icon-pink { background: #fce7f3; color: var(--color-pink); }
body.light-theme .icon-rose { background: #ffe4e6; color: var(--color-rose); }
body.light-theme .icon-emerald { background: #d1fae5; color: #059669; }
body.light-theme .icon-amber { background: #ffedd5; color: #d97706; }

.kpi-info h3 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.kpi-value {
    font-size: 28px;
    font-weight: 800;
    margin: 3px 0;
    letter-spacing: -0.5px;
}

.kpi-desc {
    font-size: 12.5px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==========================================================================
   INTERACTIVE EFFECT ANIMATIONS
   ========================================================================== */

/* Sway (Agricultural Seedling/Wheat) */
.sway i {
    animation: swayAnim 3s ease-in-out infinite;
    transform-origin: bottom center;
}
@keyframes swayAnim {
    0%, 100% { transform: rotate(0deg); }
    33% { transform: rotate(-8deg) scale(1.05); }
    66% { transform: rotate(8deg) scale(0.95); }
}

/* Float (Vault / Revolving Money) */
.float i {
    animation: floatAnim 4s ease-in-out infinite;
}
@keyframes floatAnim {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-6px) scale(1.08); }
}

/* Bounce Subtle (Hearts / Help Handshake) */
.bounce-subtle i {
    animation: bounceSubtleAnim 3.5s ease-in-out infinite;
}
@keyframes bounceSubtleAnim {
    0%, 100%, 20%, 50%, 80% { transform: translateY(0); }
    40% { transform: translateY(-5px); }
    60% { transform: translateY(-3px); }
}

/* Pulse (Success Seedling growth) */
.pulse i {
    animation: pulseAnim 2.5s ease-in-out infinite;
}
@keyframes pulseAnim {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); box-shadow: 0 0 10px rgba(249, 115, 22, 0.1); }
}

/* Pulse Glow (Header handshake logo) */
.pulse-glow {
    animation: pulseGlowAnim 3s ease-in-out infinite;
}
@keyframes pulseGlowAnim {
    0%, 100% { box-shadow: 0 0 5px rgba(219, 39, 119, 0.3); }
    50% { box-shadow: 0 0 20px rgba(219, 39, 119, 0.8), 0 0 30px rgba(244, 63, 94, 0.3); }
}

/* Filter Icon Pulse */
.filter-pulse {
    animation: filterPulseAnim 6s linear infinite;
}
@keyframes filterPulseAnim {
    0% { transform: rotate(0deg); }
    20%, 100% { transform: rotate(360deg); }
}

/* Text Shiner (A subtle flash sweep over total values) */
.text-shine {
    position: relative;
    overflow: hidden;
}
.kpi-card:hover .text-shine {
    animation: textShineAnim 1s ease-out;
}
@keyframes textShineAnim {
    0% { opacity: 0.8; }
    50% { opacity: 1; text-shadow: 0 0 12px var(--color-pink-light); }
    100% { opacity: 1; }
}

/* ==========================================================================
   FILTERS SECTION
   ========================================================================== */
.filters-section {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--backdrop-blur);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-left: 5px solid var(--color-pink);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.section-header h2 {
    font-size: 16.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.section-header h2 i {
    color: var(--color-pink);
}

.btn-text {
    background: none;
    border: none;
    color: var(--color-pink);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color var(--transition-fast), transform var(--transition-fast);
}
.btn-text:hover {
    color: var(--color-pink-hover);
    transform: translateX(-2px);
}

.filters-grid {
    display: grid;
    grid-template-columns: 2fr repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 1024px) {
    .filters-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .filter-search {
        grid-column: span 2;
    }
}

@media (max-width: 600px) {
    .filters-grid {
        grid-template-columns: 1fr;
    }
    .filter-search {
        grid-column: span 1;
    }
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
}

.filter-group select, 
.filter-group input {
    width: 100%;
    height: 44px;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--border-radius-sm);
    padding: 0 14px;
    font-size: 14.5px;
    outline: none;
    font-family: var(--font-thai);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.filter-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23db2777' stroke-width='3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
    padding-right: 36px;
}

body.light-theme .filter-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239d174d' stroke-width='3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
}

.filter-group select:focus, 
.filter-group input:focus {
    border-color: var(--color-pink);
    box-shadow: 0 0 0 3px rgba(219, 39, 119, 0.2);
}

.search-input-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-pink);
    font-size: 14px;
}

.search-input-wrapper input {
    padding-left: 38px;
}

/* ==========================================================================
   CHARTS SECTION
   ========================================================================== */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.card-full {
    grid-column: span 2;
}

@media (max-width: 900px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
    .card-full {
        grid-column: span 1;
    }
}

.chart-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--backdrop-blur);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 380px;
    transition: transform 0.15s ease-out, box-shadow var(--transition-fast), border-color var(--transition-fast);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.chart-card:hover {
    border-color: rgba(219, 39, 119, 0.25);
}

.chart-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.chart-header h3 {
    font-size: 15.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.text-pink { color: var(--color-pink); }
.text-rose { color: var(--color-rose); }

.chart-body {
    flex: 1;
    position: relative;
    width: 100%;
    height: 100%;
}

.doughnut-container {
    max-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   DATA TABLE SECTION
   ========================================================================== */
.table-section {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--backdrop-blur);
    border-radius: var(--border-radius-lg);
    padding: 28px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 18px;
    border-top: 5px solid var(--color-pink);
}

.table-header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.table-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-title h2 {
    font-size: 17px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge {
    background: var(--bg-tertiary);
    color: var(--color-pink);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
}

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

th {
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 600;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

tbody tr {
    cursor: pointer;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

tbody tr:hover {
    background-color: var(--table-row-hover);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Status Badges (Themed) */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-danger {
    background-color: rgba(244, 63, 94, 0.12);
    color: #fca5a5;
    border: 1px solid rgba(244, 63, 94, 0.2);
}
body.light-theme .status-danger {
    background-color: rgba(244, 63, 94, 0.08);
    color: var(--color-danger);
}

.status-success {
    background-color: rgba(13, 148, 136, 0.12);
    color: #99f6e4;
    border: 1px solid rgba(13, 148, 136, 0.2);
}
body.light-theme .status-success {
    background-color: rgba(13, 148, 136, 0.08);
    color: var(--color-teal);
}

.status-info {
    background-color: rgba(37, 99, 235, 0.15); /* blue-600 */
    color: #93c5fd; /* blue-300 */
    border: 1px solid rgba(37, 99, 235, 0.3);
}
body.light-theme .status-info {
    background-color: rgba(29, 78, 216, 0.08);
    color: #1e3a8a; /* dark blue */
    border: 1px solid rgba(29, 78, 216, 0.18);
}

/* Pagination */
.table-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 8px;
}

.pagination-info {
    font-size: 13.5px;
    color: var(--text-secondary);
    font-weight: 500;
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn {
    height: 40px;
    padding: 0 18px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.btn:hover:not(:disabled) {
    background: var(--bg-tertiary);
    border-color: var(--color-pink);
    color: var(--color-pink);
}

.btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}
.btn-secondary:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.page-numbers-wrapper {
    display: flex;
    gap: 4px;
}

.btn-page {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.btn-page:hover:not(.active) {
    background: var(--bg-tertiary);
    color: var(--color-pink);
    border-color: var(--color-pink);
}

.btn-page.active {
    background: var(--color-pink);
    color: #ffffff;
    border-color: var(--color-pink);
    box-shadow: 0 0 10px rgba(219, 39, 119, 0.4);
}

/* Spinner and Alignments */
.text-center { text-align: center; }
.py-5 { padding-top: 40px; padding-bottom: 40px; }
.spinner {
    font-size: 16px;
    color: var(--color-pink);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500;
}

/* ==========================================================================
   MODAL DIALOG (BLURRED OVERLAY)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(18, 14, 22, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 780px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 30px rgba(219, 39, 119, 0.1);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    transform: scale(0.92);
    transition: transform var(--transition-normal);
    border-top: 6px solid var(--color-pink);
}

body.light-theme .modal-content {
    box-shadow: 0 25px 50px -12px rgba(157, 23, 77, 0.12), 0 0 30px rgba(219, 39, 119, 0.05);
}

.modal-overlay.open .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 28px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close-btn {
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 20px;
    transition: color var(--transition-fast), transform var(--transition-fast);
}
.modal-close-btn:hover {
    color: var(--color-pink);
    transform: scale(1.15) rotate(90deg);
}

.modal-body {
    padding: 28px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 18px 28px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

/* Modal Grid Details */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

@media (max-width: 600px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

.detail-section {
    grid-column: span 2;
    margin-top: 12px;
    padding-top: 18px;
    border-top: 1px dashed var(--border-color);
}

.detail-section h4 {
    font-size: 13.5px;
    color: var(--text-secondary);
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.detail-value.highlight {
    font-size: 19px;
    font-weight: 700;
    color: var(--color-pink);
}

body.light-theme .detail-value.highlight {
    color: var(--text-primary);
}

.remark-box {
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    padding: 14px 18px;
    font-size: 14px;
    border-left: 4px solid var(--color-pink);
    color: var(--text-primary);
    font-weight: 500;
}

/* ==========================================================================
   APP FOOTER
   ========================================================================== */
.app-footer {
    text-align: center;
    padding: 24px 0;
    font-size: 12.5px;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: 16px;
    font-weight: 500;
}
