:root {
    --bg-base: #0B0E14;
    --bg-surface: #141824;
    --bg-surface-elevated: #1B2132;
    --bg-surface-hover: #232B40;
    --border-color: #262E44;
    --border-color-light: #323D5A;

    --text-primary: #F3F5FA;
    --text-secondary: #9BA5BC;
    --text-muted: #64708D;

    --brand-primary: #FF4757;
    --brand-primary-hover: #FF6B81;
    --brand-primary-glow: rgba(255, 71, 87, 0.25);

    --brand-secondary: #FFA502;
    --brand-secondary-glow: rgba(255, 165, 2, 0.25);

    --accent-success: #2ED573;
    --accent-success-glow: rgba(46, 213, 115, 0.2);
    --accent-info: #1E90FF;
    --accent-warning: #FFA502;

    --excel-header-bg: #423812;
    --excel-header-text: #FDE68A;
    --excel-header-border: #85691A;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;

    --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Background gradient glow */
body::before {
    content: '';
    position: fixed;
    top: -200px;
    left: 20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 71, 87, 0.12) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}
body::after {
    content: '';
    position: fixed;
    bottom: -200px;
    right: 15%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 165, 2, 0.08) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

/* App Header */
.app-header {
    background: rgba(20, 24, 36, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 16px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-badge-icon {
    font-size: 28px;
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.2), rgba(255, 165, 2, 0.2));
    border: 1px solid rgba(255, 71, 87, 0.3);
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px var(--brand-primary-glow);
}

.brand-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-gradient {
    background: linear-gradient(90deg, #FF4757, #FFA502);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 400;
}

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

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color-light);
    padding: 6px 14px;
    border-radius: var(--radius-md);
}

.user-avatar {
    font-size: 18px;
    background: rgba(255, 71, 87, 0.15);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-details {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-email {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.user-branch {
    font-size: 11px;
    color: var(--brand-secondary);
}

.btn-logout {
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid rgba(255, 71, 87, 0.3);
    color: #FF6B81;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 6px;
    text-decoration: none;
    transition: var(--transition);
    margin-left: 6px;
}

.btn-logout:hover {
    background: #FF4757;
    color: white;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(46, 213, 115, 0.1);
    border: 1px solid rgba(46, 213, 115, 0.3);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-success);
}

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

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

/* Main Content */
.main-content {
    max-width: 1440px;
    margin: 0 auto;
    padding: 32px 28px;
    flex: 1;
    width: 100%;
}

/* Hero Section */
.hero-section {
    margin-bottom: 28px;
}

.chip {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.chip-primary {
    background: rgba(255, 71, 87, 0.15);
    color: #FF6B81;
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.hero-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.hero-desc {
    color: var(--text-secondary);
    font-size: 15px;
    max-width: 800px;
}

/* Grid Layout */
.app-grid {
    display: grid;
    grid-template-columns: 460px 1fr;
    gap: 28px;
    align-items: start;
}

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

/* Panels */
.panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.panel-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-icon {
    font-size: 20px;
}

.panel-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Badges */
.badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.badge-info {
    background: rgba(30, 144, 255, 0.15);
    color: #70A1FF;
    border: 1px solid rgba(30, 144, 255, 0.3);
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed var(--border-color-light);
    border-radius: var(--radius-lg);
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    background: rgba(27, 33, 50, 0.4);
    transition: var(--transition);
    position: relative;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--brand-primary);
    background: rgba(255, 71, 87, 0.05);
    box-shadow: 0 0 24px var(--brand-primary-glow);
    transform: translateY(-2px);
}

.file-input-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.drop-icon {
    font-size: 44px;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 12px rgba(255, 71, 87, 0.3));
    pointer-events: none;
}

.drop-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px;
    pointer-events: none;
}

.drop-subhint {
    font-size: 13px;
    color: var(--text-muted);
    pointer-events: none;
}

/* Branch & Date Settings Card */
.branch-date-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color-light);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.card-header-sub {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.card-header-sub .sub-icon {
    font-size: 18px;
}

.card-header-sub .sub-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.required-star {
    color: var(--brand-primary);
}

.form-hint {
    font-size: 11px;
    color: var(--text-muted);
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon .input-icon {
    position: absolute;
    left: 12px;
    font-size: 14px;
    pointer-events: none;
    color: var(--text-muted);
}

.input-with-icon .form-input {
    padding-left: 36px;
}

.form-input, .form-select {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-color-light);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: var(--font-main);
    transition: var(--transition);
    outline: none;
}

.form-input:focus, .form-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px var(--brand-primary-glow);
}

.form-input-center {
    text-align: center;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 15px;
}

.date-inputs-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr 1fr;
    gap: 10px;
}

.date-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.date-field-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.filename-preview-box {
    background: rgba(11, 14, 20, 0.7);
    border: 1px dashed var(--border-color);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filename-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand-secondary);
}

.filename-code {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-success);
    word-break: break-all;
}

/* File Queue */
.file-queue-container {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
}

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

.queue-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
}

.file-queue-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
}

.file-queue-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    gap: 12px;
}

.file-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.file-item-name {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.file-item-size {
    color: var(--text-muted);
    font-size: 11px;
}

.file-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.day-override-select {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color-light);
    color: var(--text-primary);
    font-size: 12px;
    border-radius: 6px;
    padding: 4px 8px;
}

.btn-remove-file {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 2px;
    line-height: 1;
}
.btn-remove-file:hover {
    color: var(--brand-primary);
}

/* Settings Box */
.settings-box {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.settings-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.radio-label:hover {
    background: rgba(255, 255, 255, 0.03);
}

.radio-label input {
    margin-top: 4px;
    accent-color: var(--brand-primary);
}

.radio-text {
    display: flex;
    flex-direction: column;
}

.radio-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.radio-desc {
    font-size: 11px;
    color: var(--text-muted);
}

.custom-template-field {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.custom-template-label {
    font-size: 12px;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 6px;
}

.file-input-simple {
    width: 100%;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    font-size: 14px;
    font-weight: 700;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(1);
}

.btn-primary {
    background: linear-gradient(135deg, #FF4757, #FF6B81);
    color: white;
    box-shadow: 0 4px 18px var(--brand-primary-glow);
}
.btn-primary:not(:disabled):hover {
    background: linear-gradient(135deg, #FF6B81, #FF4757);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255, 71, 87, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #2ED573, #10AC84);
    color: white;
    box-shadow: 0 4px 18px var(--accent-success-glow);
}
.btn-success:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(46, 213, 115, 0.4);
}

.btn-secondary {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color-light);
    color: var(--text-primary);
}
.btn-secondary:hover {
    background: var(--bg-surface-hover);
    border-color: var(--text-secondary);
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
}
.btn-text:hover {
    color: var(--brand-primary);
}

.btn-block {
    width: 100%;
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

@media (max-width: 800px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-card-highlight {
    border-color: rgba(46, 213, 115, 0.3);
    background: rgba(46, 213, 115, 0.05);
}

.stat-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.stat-value {
    font-size: 24px;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.text-accent {
    color: var(--brand-secondary);
}

.text-green {
    color: var(--accent-success);
}

.stat-desc {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Preview Controls & Tabs */
.preview-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.tab-buttons {
    display: flex;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: var(--radius-md);
    gap: 4px;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn.active {
    background: var(--brand-primary);
    color: white;
    box-shadow: 0 2px 10px var(--brand-primary-glow);
}

.tab-counter {
    background: rgba(0, 0, 0, 0.25);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-family: var(--font-mono);
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 6px 14px;
    gap: 8px;
    min-width: 260px;
}

.search-icon {
    font-size: 14px;
    color: var(--text-muted);
}

.search-input {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    width: 100%;
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* Table Viewport */
.table-viewport {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    max-height: 480px;
    overflow-y: auto;
    position: relative;
}

.table-empty-state {
    padding: 60px 24px;
    text-align: center;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.6;
}

.table-empty-state h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.table-empty-state p {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 440px;
    margin: 0 auto;
}

/* Preview Table */
.preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.preview-table thead {
    background: #10141F;
    position: sticky;
    top: 0;
    z-index: 10;
}

.preview-table th {
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.preview-table td {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(38, 46, 68, 0.4);
    color: var(--text-primary);
}

.preview-table tr:hover:not(.row-category) {
    background: rgba(255, 255, 255, 0.03);
}

/* Category Header Row (Excel Yellow Style) */
.row-category {
    background: var(--excel-header-bg) !important;
    border-top: 1px solid var(--excel-header-border);
    border-bottom: 1px solid var(--excel-header-border);
}

.row-category td {
    color: var(--excel-header-text);
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.04em;
    padding: 10px 16px;
}

.qty-val {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 14px;
}

.qty-positive {
    color: #2ED573;
}

.qty-zero {
    color: var(--text-muted);
    opacity: 0.5;
}

.badge-active {
    background: rgba(46, 213, 115, 0.15);
    color: #2ED573;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.badge-inactive {
    background: rgba(100, 112, 141, 0.15);
    color: var(--text-muted);
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
}

/* Footer in Preview */
.preview-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.footer-info {
    font-size: 13px;
    color: var(--text-muted);
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.toast {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color-light);
    color: var(--text-primary);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-success {
    border-color: rgba(46, 213, 115, 0.4);
    background: #0E2419;
}
.toast-error {
    border-color: rgba(255, 71, 87, 0.4);
    background: #2D1115;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Modal Backdrop */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 520px;
    max-width: 90%;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

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

.modal-title {
    font-size: 18px;
    font-weight: 800;
}

.btn-close-modal {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
}

.modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 16px 24px;
    background: var(--bg-surface-elevated);
    border-top: 1px solid var(--border-color);
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 71, 87, 0.2);
    border-top-color: var(--brand-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

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

/* Google Sheets Sync Card */
.google-sheets-card {
    background: var(--bg-surface-elevated);
    border: 1px solid rgba(46, 213, 115, 0.3);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}
.google-sheets-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2ED573, #1E90FF);
}
.btn-script-guide {
    background: rgba(30, 144, 255, 0.15);
    border: 1px solid rgba(30, 144, 255, 0.35);
    color: #1E90FF;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}
.btn-script-guide:hover {
    background: rgba(30, 144, 255, 0.25);
    color: #fff;
}
.btn-sync {
    background: linear-gradient(135deg, #10ac84, #1dd1a1);
    color: #0b0e14;
    font-weight: 700;
    border: none;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(29, 209, 161, 0.25);
}
.btn-sync:hover:not([disabled]) {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(29, 209, 161, 0.4);
    filter: brightness(1.05);
}
.btn-sync[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* =========================================================================
   PANDUAN SCRIPT STEPPER MODAL STYLES (PREMIUM UI)
   ========================================================================= */
.guide-stepper {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 14px;
}

.guide-step-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    transition: var(--transition);
}

.guide-step-card:hover {
    border-color: var(--border-color-light);
    background: var(--bg-surface-hover);
}

.guide-step-num {
    background: linear-gradient(135deg, rgba(46, 213, 115, 0.25), rgba(30, 144, 255, 0.25));
    border: 1px solid rgba(46, 213, 115, 0.4);
    color: var(--accent-success);
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 800;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(46, 213, 115, 0.15);
}

.guide-step-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.guide-step-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.guide-step-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.55;
}

.guide-code-container {
    background: #0B0E14;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-top: 8px;
    width: 100%;
}

.guide-code-header {
    background: #141824;
    border-bottom: 1px solid var(--border-color);
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.guide-code-filename {
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-muted);
}

.guide-code-pre {
    padding: 16px 18px;
    max-height: 380px;
    overflow: auto;
    font-family: var(--font-mono);
    font-size: 12px;
    color: #A4B0BE;
    line-height: 1.6;
    margin: 0;
    white-space: pre;
    -webkit-overflow-scrolling: touch;
}

.kbd-tag {
    background: #1B2132;
    border: 1px solid var(--border-color-light);
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--brand-secondary);
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.guide-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

.guide-tag-blue {
    background: rgba(30, 144, 255, 0.2);
    border: 1px solid rgba(30, 144, 255, 0.4);
    color: #1E90FF;
}

.guide-tag-green {
    background: rgba(46, 213, 115, 0.2);
    border: 1px solid rgba(46, 213, 115, 0.4);
    color: #2ED573;
}

/* =========================================================================
   RESPONSIVE DESIGN SYSTEM (TABLET & MOBILE OPTIMIZATIONS)
   ========================================================================= */

/* Tablet Landscape & Medium Screens (<= 1100px) */
@media (max-width: 1100px) {
    .app-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Tablet Portrait (<= 900px) */
@media (max-width: 900px) {
    .header-container {
        padding: 14px 20px;
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .brand-group {
        justify-content: center;
        text-align: center;
    }

    .header-actions {
        justify-content: center;
        flex-wrap: wrap;
        width: 100%;
        gap: 10px;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile & Small Tablets (<= 768px) */
@media (max-width: 768px) {
    .main-content {
        padding: 16px 14px;
    }

    .hero-title {
        font-size: 22px;
        line-height: 1.3;
    }

    .hero-desc {
        font-size: 13.5px;
    }

    .panel {
        padding: 16px 14px;
        border-radius: var(--radius-lg);
        gap: 16px;
    }

    .panel-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .export-actions {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    .export-actions .btn {
        width: 100%;
    }

    .preview-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .tab-buttons {
        width: 100%;
    }

    .tab-btn {
        flex: 1;
        justify-content: center;
        padding: 8px 10px;
        font-size: 12px;
    }

    .search-box {
        width: 100%;
        max-width: 100%;
    }

    .date-inputs-grid {
        grid-template-columns: 1fr 1.3fr 1fr;
        gap: 6px;
    }

    .form-input-center {
        font-size: 13px;
        padding: 8px 6px;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 10px 12px;
    }

    .stat-value {
        font-size: 18px;
    }

    .stat-label {
        font-size: 10px;
    }

    /* Modal Responsive */
    dialog.modal-dialog {
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        margin: auto;
        border-radius: var(--radius-lg);
    }

    .dialog-header {
        padding: 14px 16px;
    }

    .dialog-title {
        font-size: 15px;
    }

    .dialog-body {
        padding: 14px 16px;
        max-height: 75vh;
    }

    .dialog-footer {
        padding: 12px 16px;
    }

    .guide-step-card {
        padding: 12px 14px;
        gap: 12px;
    }

    .guide-step-num {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }

    .guide-step-title {
        font-size: 13px;
    }

    .guide-step-desc {
        font-size: 12px;
    }

    /* Toast Responsive */
    .toast-container {
        left: 14px;
        right: 14px;
        bottom: 14px;
        width: calc(100% - 28px);
    }

    .toast {
        min-width: 0;
        width: 100%;
        font-size: 13px;
        padding: 12px 16px;
    }
}

/* Small Smartphone Screens (<= 480px) */
@media (max-width: 480px) {
    .header-container {
        padding: 12px 12px;
    }

    .brand-group {
        text-align: left;
        align-items: center;
        gap: 10px;
    }

    .brand-title {
        font-size: 17px;
    }

    .brand-subtitle {
        font-size: 11px;
    }

    .brand-badge-icon {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }

    .header-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .header-actions .btn {
        font-size: 11.5px;
        padding: 8px 10px;
        width: 100%;
    }

    .user-profile-badge {
        grid-column: span 2;
        width: 100%;
        justify-content: space-between;
        padding: 6px 10px;
    }

    .user-email {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 11px;
    }

    .date-inputs-grid {
        grid-template-columns: 1fr 1fr;
    }

    .date-inputs-grid .date-field:nth-child(2) {
        grid-column: span 2;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .guide-step-card {
        flex-direction: column;
    }

    .guide-step-num {
        align-self: flex-start;
    }
}


