/* ==========================================================================
   Akola Property Template Generator - Modern Application Styles
   ========================================================================== */

:root {
    --bg-app: #0b0f19;
    --bg-surface: #131b2e;
    --bg-surface-elevated: #1a243d;
    --bg-input: #1f2b48;
    --border-color: #2a385c;
    --border-highlight: #3b82f6;
    
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --color-primary: #3b82f6;
    --color-primary-hover: #2563eb;
    --color-success: #10b981;
    --color-success-hover: #059669;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #06b6d4;
    --color-purple: #8b5cf6;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    
    --shadow-soft: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
    --shadow-glow-active: 0 0 0 3px rgba(245, 158, 11, 0.4), 0 0 25px rgba(245, 158, 11, 0.3);
    
    --transition-speed: 0.2s;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-app);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Top Navigation
   ========================================================================== */
.app-navbar {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

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

.brand-icon {
    font-size: 26px;
    background: var(--bg-surface-elevated);
    padding: 6px 10px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.brand-title {
    font-family: 'Outfit', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
}

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

/* Property Switcher */
.nav-property-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-surface-elevated);
    padding: 4px 8px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.nav-btn-icon {
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    font-size: 14px;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-speed);
}

.nav-btn-icon:hover:not(:disabled) {
    background: var(--bg-input);
    color: var(--color-warning);
}

.nav-btn-icon:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.search-box-wrapper {
    position: relative;
    width: 240px;
}

.property-search-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 6px 12px;
    font-size: 13px;
    color: #ffffff;
    font-family: inherit;
    font-weight: 600;
    outline: none;
    transition: var(--transition-speed);
}

.property-search-input:focus {
    border-color: var(--color-warning);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    max-height: 260px;
    overflow-y: auto;
    z-index: 200;
    display: none;
    box-shadow: var(--shadow-soft);
}

.search-dropdown.open {
    display: block;
}

.search-item {
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.search-item:hover {
    background: var(--color-primary);
    color: #fff;
}

.search-item .sr-tag {
    font-size: 11px;
    color: var(--text-dim);
}

.nav-counter {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-warning);
    min-width: 75px;
    text-align: center;
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-group {
    display: flex;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.btn-group .btn {
    border-radius: 0;
    border-right: 1px solid rgba(255,255,255,0.15);
}

.btn-group .btn:last-child {
    border-right: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition-speed);
    white-space: nowrap;
    text-decoration: none;
    font-family: inherit;
}

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

.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-hover); }

.btn-success { background: var(--color-success); color: #fff; }
.btn-success:hover { background: var(--color-success-hover); }

.btn-info { background: var(--color-info); color: #fff; }
.btn-info:hover { filter: brightness(1.1); }

.btn-secondary { background: var(--bg-surface-elevated); color: var(--text-main); border-color: var(--border-color); }
.btn-secondary:hover { background: var(--bg-input); border-color: var(--text-muted); }

.btn-outline { background: transparent; color: var(--text-main); border-color: var(--border-color); }
.btn-outline:hover { background: var(--bg-surface-elevated); border-color: var(--text-muted); }

.btn-outline-light { background: rgba(255,255,255,0.06); color: #fff; border-color: rgba(255,255,255,0.15); }
.btn-outline-light:hover { background: rgba(255,255,255,0.12); }

.btn-xs { padding: 3px 8px; font-size: 11px; border-radius: var(--radius-sm); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-icon { width: 28px; height: 28px; padding: 0; }

/* ==========================================================================
   Application Layout
   ========================================================================== */
.app-layout {
    display: flex;
    flex: 1;
    height: calc(100vh - 65px);
    overflow: hidden;
}

/* Sidebar */
.sidebar-panel {
    width: 380px;
    min-width: 380px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px;
}

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

.card-header h2 {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 12px;
    background: var(--bg-input);
    color: var(--text-muted);
}

.badge-satellite { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.4); }
.badge-ground { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }

.section-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 10px;
    line-height: 1.4;
}

/* Form inputs */
.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.form-group .req {
    color: var(--color-danger);
}

.form-control {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 10px;
    font-size: 13px;
    color: #fff;
    font-family: inherit;
    outline: none;
    transition: var(--transition-speed);
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.highlight-input {
    font-weight: 700;
    font-size: 14px;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.3);
}

.form-row {
    display: flex;
    gap: 8px;
}

.form-row .col {
    flex: 1;
}

.quick-years-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.quick-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-dim);
}

.quick-year-chip {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 2px 7px;
    font-size: 11px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-speed);
}

.quick-year-chip:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

/* Switch */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.switch-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
}

.switch-label input { display: none; }

.switch-slider {
    width: 28px;
    height: 16px;
    background: var(--bg-input);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    position: relative;
    transition: var(--transition-speed);
}

.switch-slider::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    left: 1px;
    top: 1px;
    background: var(--text-dim);
    border-radius: 50%;
    transition: var(--transition-speed);
}

.switch-label input:checked + .switch-slider {
    background: var(--color-success);
    border-color: var(--color-success);
}

.switch-label input:checked + .switch-slider::after {
    left: 13px;
    background: #fff;
}

/* Sidebar Slot List Controls */
.slot-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-slot-item {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: var(--transition-speed);
}

.sidebar-slot-item.active-slot {
    border-color: var(--color-warning);
    box-shadow: 0 0 0 1px var(--color-warning);
}

.sidebar-slot-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.slot-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-main);
}

.slot-year-input {
    width: 80px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 3px 6px;
    font-size: 12px;
    font-weight: 700;
    color: #fbbf24;
    text-align: center;
}

.slot-thumb {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.slot-actions {
    display: flex;
    gap: 4px;
}

/* Server Status Card */
.server-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.stat-box {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-speed);
}

.stat-box:hover {
    border-color: var(--color-primary);
    transform: translateY(-1px);
}

.stat-count {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: var(--color-success);
}

.stat-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
}

.stat-path {
    display: block;
    font-size: 9px;
    color: var(--text-dim);
    margin-top: 2px;
}

/* ==========================================================================
   Center Canvas Panel
   ========================================================================== */
.canvas-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #1e2029;
    position: relative;
    overflow: hidden;
}

.canvas-toolbar {
    background: rgba(19, 27, 46, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    padding: 8px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

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

.paste-hint b {
    color: var(--color-warning);
}

kbd {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 10px;
    font-family: inherit;
    color: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.zoom-level {
    font-size: 12px;
    font-weight: 600;
    min-width: 45px;
    text-align: center;
    color: var(--text-muted);
}

/* Viewport for centering & panning template */
.canvas-viewport {
    flex: 1;
    overflow: auto;
    padding: 40px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background: #181920;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* ==========================================================================
   THE TEMPLATE DOCUMENT (Exact QGIS replica with double frame & fixed slots)
   ========================================================================== */
.template-document {
    width: 940px;
    background: #ffffff;
    color: #000000;
    font-family: 'Times New Roman', Times, serif;
    /* Formal double border: outer line + gap + inner line */
    border: 1px solid #000000;
    outline: 1px solid #000000;
    outline-offset: -4px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    position: relative;
    transform-origin: top center;
    transition: transform 0.15s ease-out;
    padding: 12px 14px 14px 14px;
    box-sizing: border-box;
}

/* Header Block */
.template-header-block {
    text-align: center;
    padding: 4px 0 10px 0;
    user-select: none;
}

.template-property-no {
    font-size: 24px;
    font-weight: bold;
    color: #000000;
    line-height: 1.2;
    margin-bottom: 2px;
    cursor: pointer;
}

.template-property-no:hover {
    outline: 1px dashed #3b82f6;
}

.template-survey-row,
.template-report-row {
    font-size: 20px;
    font-weight: normal;
    color: #000000;
    line-height: 1.25;
}

.constant-label {
    display: inline;
}

.dynamic-year {
    font-weight: normal;
    display: inline;
    margin-left: 4px;
    cursor: pointer;
}

.dynamic-year:hover {
    outline: 1px dashed #3b82f6;
}

/* Template Image Rows: fixed grid with gap */
.template-row {
    display: flex;
    width: 100%;
    gap: 10px;
    margin-bottom: 10px;
    background: transparent;
    border: none;
    box-sizing: border-box;
}

.row-satellite {
    margin-bottom: 10px;
}

.row-ground {
    margin-top: 0;
    margin-bottom: 2px;
}

/* Row hidden when no ground images */
.template-row.row-hidden {
    display: none !important;
}

/* Individual Image Cell: FIXED SIZE SECTION WITH CRISP BLACK BORDER */
.template-slot-cell {
    flex: 1;
    width: 450px;
    height: 290px;
    max-height: 290px;
    min-height: 290px;
    box-sizing: border-box;
    position: relative;
    border: 1.5px solid #000000; /* Crisp black border around each image section */
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    transition: outline 0.15s ease, box-shadow 0.15s ease;
}

/* Image inside slot: FIXED FIT */
.template-slot-cell img.slot-image {
    width: 100%;
    height: 100%;
    object-fit: fill; /* Fits the fixed section completely */
    display: block;
    margin: 0;
    padding: 0;
    border: none;
}

.template-slot-cell.fit-cover img.slot-image {
    object-fit: cover;
}

/* Year Badge on Image: Exact Times New Roman corner label */
.slot-corner-year {
    position: absolute;
    font-family: 'Times New Roman', Times, serif;
    font-size: 22px;
    font-weight: bold;
    color: #000000;
    background: rgba(255, 255, 255, 0.45);
    padding: 0 4px;
    line-height: 1.1;
    z-index: 5;
    cursor: pointer;
    user-select: none;
}

.slot-corner-year.corner-left {
    top: 6px;
    left: 8px;
}

.slot-corner-year.corner-right {
    top: 6px;
    right: 8px;
}

.slot-corner-year:hover {
    background: rgba(255, 255, 0, 0.7);
}

/* Empty Placeholder Slot: strictly respects the 290px fixed height */
.slot-empty-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px;
    text-align: center;
    color: #94a3b8;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    background: #f8fafc;
    transition: var(--transition-speed);
}

.placeholder-icon {
    font-size: 32px;
    opacity: 0.7;
}

.placeholder-main {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.placeholder-sub {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: #94a3b8;
}

.placeholder-year-badge {
    font-family: 'Times New Roman', Times, serif;
    font-size: 18px;
    font-weight: bold;
    color: #ef4444;
    background: #fee2e2;
    padding: 2px 8px;
    border-radius: 4px;
}

/* ACTIVE SLOT HIGHLIGHT (When ready to paste Ctrl+V) */
.template-slot-cell.active-paste-slot {
    outline: 3px solid #f59e0b !important;
    outline-offset: -3px;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.5) !important;
    z-index: 10;
}

.template-slot-cell.active-paste-slot .slot-empty-placeholder {
    border-color: #f59e0b;
    background: #fffbeb;
}

.template-slot-cell.active-paste-slot .placeholder-main {
    color: #b45309;
}

/* Slot Hover Overlay Actions */
.slot-hover-controls {
    position: absolute;
    bottom: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 6;
}

.template-slot-cell:hover .slot-hover-controls {
    opacity: 1;
}

.slot-ctrl-btn {
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: var(--transition-speed);
}

.slot-ctrl-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
}

/* ==========================================================================
   Bottom Floating Action Bar
   ========================================================================== */
.floating-action-bar {
    background: rgba(19, 27, 46, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-color);
    padding: 10px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    bottom: 0;
    z-index: 30;
}

.active-slot-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #fbbf24;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 8px #f59e0b;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

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

/* ==========================================================================
   Modal Dialogs
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

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

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

.modal-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

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

.modal-close-btn:hover {
    color: #fff;
}

.modal-body {
    padding: 24px;
}

.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 36px 20px;
    text-align: center;
    background: var(--bg-surface-elevated);
    cursor: pointer;
    transition: var(--transition-speed);
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--color-warning);
    background: rgba(245, 158, 11, 0.05);
}

.drop-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.drop-zone h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.drop-zone p {
    font-size: 12px;
    color: var(--text-muted);
}

.drop-hint {
    font-size: 11px !important;
    color: var(--text-dim) !important;
    margin-top: 4px;
}

.drop-zone .btn {
    margin-top: 14px;
}

.modal-excel-meta {
    margin-top: 14px;
    padding: 12px;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.file-badge {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
}

.file-count {
    color: var(--color-success);
}

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

/* ==========================================================================
   Loading & Toast
   ========================================================================== */
.loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(11, 15, 25, 0.88);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.spinner-container {
    text-align: center;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--color-warning);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto 16px auto;
}

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

.loading-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

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

/* Toasts */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 18px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease-out, fadeOut 0.4s ease 3.5s forwards;
    max-width: 450px;
}

.toast.success { background: linear-gradient(135deg, #059669, #10b981); }
.toast.error { background: linear-gradient(135deg, #b91c1c, #ef4444); }
.toast.info { background: linear-gradient(135deg, #1d4ed8, #3b82f6); }
.toast.warning { background: linear-gradient(135deg, #b45309, #f59e0b); }

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

@keyframes fadeOut {
    to { transform: translateY(-10px); opacity: 0; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Done Button Styling */
.btn-done {
    background: linear-gradient(135deg, #059669, #10b981) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.btn-done:hover {
    background: linear-gradient(135deg, #047857, #059669) !important;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.6) !important;
    transform: translateY(-1px);
}

/* Abstract Summary Modal Styling */
.abstract-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.abstract-stat-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    text-align: center;
}

.abstract-stat-card.stat-card-wide {
    grid-column: span 2;
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.3);
}

.abstract-stat-num {
    display: block;
    font-size: 26px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
    margin-bottom: 4px;
}

.text-success { color: #10b981 !important; }
.text-warning { color: #f59e0b !important; }
.text-satellite { color: #60a5fa !important; }
.text-ground { color: #34d399 !important; }

.abstract-stat-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.excel-preview-info {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
}

.columns-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.columns-pill-list code {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: #60a5fa;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-family: inherit;
    font-weight: 500;
}
