/* Custom Premium Styling for Stock Portfolio Dashboard */

/* --- Design Tokens / Variables --- */
:root {
    --bg-app: #070913;
    --bg-sidebar: rgba(10, 14, 32, 0.75);
    --bg-card: rgba(20, 27, 56, 0.45);
    --bg-card-hover: rgba(26, 36, 73, 0.65);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-glow: rgba(59, 130, 246, 0.25);
    
    /* Text Colors */
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dark: #1f2937;
    
    /* Accents */
    --accent-blue: #3b82f6;
    --accent-blue-rgb: 59, 130, 246;
    --accent-teal: #14b8a6;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-yellow: #f59e0b;
    --accent-purple: #8b5cf6;

    /* Gradients */
    --grad-primary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --grad-success: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --grad-danger: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    --grad-warning: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    --grad-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);

    /* Fonts */
    --font-thai: 'Noto Sans Thai', sans-serif;
    --font-eng: 'Outfit', sans-serif;
}

/* --- Reset & Global --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: var(--font-thai);
}

body {
    background-color: var(--bg-app);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
}

/* --- Layout --- */
.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 10;
}

/* --- Sidebar --- */
.sidebar {
    width: 280px;
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    padding: 30px 24px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.logo-icon {
    font-size: 24px;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.logo-text {
    font-family: var(--font-eng);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 1px;
    color: var(--text-main);
}

.logo-text span {
    font-weight: 300;
    color: var(--accent-blue);
    font-size: 13px;
    display: block;
    margin-top: -3px;
    letter-spacing: 3px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 18px;
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
}

.nav-item .icon {
    font-size: 18px;
}

.nav-item:hover, .nav-item.active {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #fff;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.1);
}

.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sync-status {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-green);
    box-shadow: 0 0 10px var(--accent-green);
    animation: pulse 2s infinite;
}

.status-title {
    color: var(--text-main);
    font-weight: 600;
}

.status-time {
    color: var(--text-muted);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-thai);
}

.btn-primary {
    background: var(--grad-primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* --- Main Content --- */
.main-content {
    flex-grow: 1;
    margin-left: 280px;
    padding: 40px;
    max-width: calc(100vw - 280px);
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.header-title h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
    background: linear-gradient(120deg, #fff 40%, #a5b4fc 90%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-muted);
    font-size: 15px;
}

.date-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 10px 18px;
    border-radius: 14px;
    font-family: var(--font-eng);
    font-weight: 500;
    font-size: 14px;
}

/* --- Sections --- */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.5s ease-out;
}

/* --- Metrics Grid --- */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-color-glow);
    background: var(--bg-card-hover);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.15);
}

.metric-card.card-gradient-1::before { background: var(--accent-blue); }
.metric-card.card-gradient-2::before { background: var(--accent-teal); }
.metric-card.card-gradient-3::before { background: var(--accent-purple); }
.metric-card.card-gradient-4::before { background: var(--accent-yellow); }

.metric-card.gain::before { background: var(--accent-green); }
.metric-card.loss::before { background: var(--accent-red); }

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.metric-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

.metric-icon {
    font-size: 20px;
    opacity: 0.8;
}

.metric-value {
    font-family: var(--font-eng);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.metric-detail {
    font-size: 12px;
    color: var(--text-muted);
}

/* --- Charts Grid --- */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 24px;
    margin-bottom: 30px;
}

.charts-grid.secondary-charts {
    grid-template-columns: 1.2fr 1fr;
}

.chart-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.panel-header {
    margin-bottom: 20px;
}

.panel-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
}

.panel-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.panel-body {
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.panel-body > div {
    width: 100%;
}

/* --- Table Panel --- */
.table-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
}

.table-panel.warning-border {
    border-color: rgba(245, 158, 11, 0.2);
}

.flex-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.table-search input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 10px 18px;
    border-radius: 12px;
    color: var(--text-main);
    font-family: var(--font-thai);
    font-size: 14px;
    outline: none;
    width: 250px;
    transition: all 0.3s ease;
}

.table-search input:focus {
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 15px;
}

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

.premium-table th {
    padding: 16px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 13px;
    border-bottom: 1px solid var(--border-color);
    letter-spacing: 0.5px;
}

.premium-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    transition: all 0.2s ease;
    vertical-align: middle;
}

.premium-table tbody tr {
    cursor: pointer;
    transition: all 0.2s ease;
}

.premium-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

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

/* Specific Columns */
.num-col {
    text-align: right;
    font-family: var(--font-eng);
}

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

.font-bold {
    font-weight: 700;
}

/* Loading state */
.loading-cell {
    text-align: center;
    padding: 50px !important;
    color: var(--text-muted);
    font-size: 16px;
}

.spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    border-top-color: var(--accent-blue);
    animation: spin 1s ease-in-out infinite;
    margin-right: 12px;
    vertical-align: middle;
}

/* --- Badges & Icons --- */
.stock-logo-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stock-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-eng);
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    background: var(--grad-primary);
}

/* Custom Gradients for Stock Avatars */
.avatar-scc { background: linear-gradient(135deg, #e11d48, #991b1b); }
.avatar-bcp { background: linear-gradient(135deg, #059669, #065f46); }
.avatar-cv { background: linear-gradient(135deg, #0284c7, #075985); }
.avatar-pttgc { background: linear-gradient(135deg, #d97706, #9a3412); }
.avatar-ptt { background: linear-gradient(135deg, #2563eb, #1e3a8a); }
.avatar-irpc { background: linear-gradient(135deg, #7c3aed, #5b21b6); }

.badge {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-eng);
}

.badge-cheap {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-expensive {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-neutral {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.badge-rsi-buy {
    background: rgba(20, 184, 166, 0.15);
    color: var(--accent-teal);
    border: 1px solid rgba(20, 184, 166, 0.25);
    font-family: var(--font-thai);
}

.badge-rsi-sell {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.25);
    font-family: var(--font-thai);
}

.badge-rsi-neutral {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
    border: 1px solid rgba(59, 130, 246, 0.2);
    font-family: var(--font-thai);
}

/* --- Guidelines & Principles --- */
.guidelines-container {
    max-width: 1100px;
    margin: 0 auto;
}

.guidelines-header {
    margin-bottom: 35px;
    text-align: center;
}

.guidelines-header h2 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
}

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

.guideline-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.guideline-card:hover {
    transform: translateY(-3px);
    border-color: rgba(59, 130, 246, 0.2);
    background: var(--bg-card-hover);
}

.guideline-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.guideline-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--grad-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-eng);
    font-weight: 700;
    font-size: 14px;
}

.guideline-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
}

.guideline-text {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* --- Raw/Other Table Styles --- */
.raw-table th {
    background: rgba(0, 0, 0, 0.15);
}

.compact-table th, .compact-table td {
    padding: 10px 12px;
    font-size: 13px;
}

.compact-table tbody tr {
    cursor: default;
}

.compact-table tbody tr:hover {
    background: transparent;
}

.margin-top-lg {
    margin-top: 40px;
}

/* --- Modal Slide-Over / Overlay --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(7, 9, 19, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.modal-card {
    width: 90%;
    max-width: 780px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 35px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 25px;
    right: 25px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--text-main);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--accent-red);
}

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

.modal-title-area {
    display: flex;
    align-items: center;
    gap: 18px;
}

.modal-avatar {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-eng);
    font-weight: 700;
    font-size: 20px;
    color: #fff;
}

.modal-title-area h2 {
    font-family: var(--font-eng);
    font-size: 24px;
    font-weight: 700;
}

.modal-title-area p {
    font-size: 13px;
    color: var(--text-muted);
}

.modal-status-badge {
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 600;
}

.modal-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.modal-stat-box {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.stat-value {
    font-family: var(--font-eng);
    font-size: 18px;
    font-weight: 700;
}

/* Value comparison bar inside modal */
.value-comparison-box {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 25px;
}

.comparison-labels {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 10px;
    color: var(--text-muted);
}

.comparison-labels strong {
    font-family: var(--font-eng);
    color: var(--text-main);
}

.comparison-bar-bg {
    height: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.comparison-bar-fill {
    height: 100%;
    background: var(--grad-primary);
    width: 0%;
    transition: width 0.5s ease-out;
}

.comparison-result {
    font-size: 13px;
    text-align: center;
    font-weight: 500;
}

.modal-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

.modal-section h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 15px;
    border-left: 3px solid var(--accent-blue);
    padding-left: 10px;
}

.indicators-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.indicators-list li {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 8px;
}

.indicators-list li:last-child {
    border-bottom: none;
}

.indicators-list .label {
    color: var(--text-muted);
}

.indicators-list .value {
    font-weight: 600;
    font-family: var(--font-eng);
}

/* Gauge styling */
.gauge-container {
    margin-bottom: 20px;
}

.gauge-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 8px;
}

.gauge-header strong {
    font-family: var(--font-eng);
}

.rsi-scale-bar {
    height: 12px;
    border-radius: 6px;
    display: flex;
    overflow: hidden;
    position: relative;
    margin-bottom: 8px;
}

.zone-oversold { flex: 3; background: var(--accent-teal); opacity: 0.6; }
.zone-neutral { flex: 4; background: var(--accent-blue); opacity: 0.4; }
.zone-overbought { flex: 3; background: var(--accent-red); opacity: 0.6; }

.rsi-needle {
    position: absolute;
    top: -3px;
    width: 6px;
    height: 18px;
    background: #fff;
    border: 1.5px solid var(--bg-app);
    border-radius: 3px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 8px rgba(255,255,255,0.8);
    transition: left 0.5s ease-out;
}

.rsi-scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-muted);
    font-family: var(--font-eng);
}

.analysis-box {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
    font-size: 12.5px;
    line-height: 1.5;
}

.analysis-box strong {
    display: block;
    margin-bottom: 4px;
    color: var(--accent-blue);
}

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

/* --- Decorative Blur Shapes --- */
.bg-blur {
    position: fixed;
    border-radius: 50%;
    filter: blur(150px);
    z-index: 1;
    opacity: 0.2;
    pointer-events: none;
}

.blur-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-blue);
    top: -200px;
    right: -200px;
}

.blur-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-purple);
    bottom: -150px;
    left: 10%;
}

.blur-3 {
    width: 300px;
    height: 300px;
    background: var(--accent-teal);
    top: 30%;
    right: 25%;
}

/* --- Keyframe Animations --- */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Responsive Layout Rules --- */
@media (max-width: 1200px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
    .charts-grid.secondary-charts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .sidebar {
        width: 80px;
        padding: 30px 10px;
        align-items: center;
    }
    .logo-text, .sync-status, .sidebar-footer button span:last-child {
        display: none;
    }
    .nav-item {
        padding: 12px;
        justify-content: center;
    }
    .nav-item span:last-child {
        display: none;
    }
    .main-content {
        margin-left: 80px;
        max-width: calc(100vw - 80px);
        padding: 20px;
    }
    .modal-details-grid {
        grid-template-columns: 1fr;
    }
    .modal-stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .main-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* --- Upload Area --- */
.upload-area {
    width: 100%;
}

.upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 15px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px dashed rgba(59, 130, 246, 0.25);
    border-radius: 12px;
    color: var(--accent-blue);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    width: 100%;
}

.upload-label:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.1);
}

#docx-upload {
    display: none;
}

