/* ========== CSS VARIABLES ========== */
:root {
    /* Colors */
    --primary-color: #0f172a;
    --primary-hover: #1e293b;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;

    /* Backgrounds */
    --background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --surface: rgba(255, 255, 255, 1);
    --surface-dark: rgba(15, 23, 42, 1);
    --glass: rgba(255, 255, 255, 0.1);
    --glass-hover: rgba(255, 255, 255, 0.2);
    --border: rgba(255, 255, 255, 0.2);

    /* Text Colors */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-white: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.6);

    /* Shadows */
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-xl: 0 35px 60px -15px rgba(0, 0, 0, 0.3);

    /* Border Radius */
    --border-radius: 10px;
    --border-radius-lg: 16px;
    --border-radius-xl: 22px;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --transition-slow: all 0.5s ease;
}

/* ========== RESET & BASE STYLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    height: 100vh;
    overflow: hidden;
    background: var(--background);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
}

a {
    text-decoration: none;
}

a span {
    color: #fff;
}

ul li {
	list-style-type: none;
}

.chart-actions {
	text-align: center;
	margin-top: 5px;
}

#map {
    width: 100%;
    height: 100vh;
    position: relative;
    z-index: 1;
}

/* ========== ANIMATIONS ========== */
@keyframes slideDown {
    from { transform: translateY(-100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

@keyframes slideInLeft {
    from { transform: translateX(-100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translateY(0); }
    40%, 43% { transform: translateY(-10px); }
    70% { transform: translateY(-5px); }
    90% { transform: translateY(-2px); }
}

@keyframes slideInDown {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fabScale {
    0% { transform: scale(0) rotate(0deg); opacity: 0; }
    100% { transform: scale(1) rotate(360deg); opacity: 1; }
}

@keyframes fabSlideUp {
    0% { transform: translateY(60px) scale(0.8); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* ========== HEADER ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    backdrop-filter: blur(16px);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
    min-height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-white);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    flex: 1;
}

.logo i {
    font-size: 24px;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
}

.logo-text-short {
    display: none;
}

.mobile-menu-toggle {
    display: none;
}

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

/* ========== BUTTONS ========== */
.btn-icon {
    width: 48px;
    height: 48px;
    border: 1px solid var(--border);
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-white);
    font-size: 18px;
    position: relative;
    overflow: hidden;
}

.btn-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.btn-icon:hover::before {
    width: 100%;
    height: 100%;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.btn-icon.active {
    background: rgba(255, 255, 255, 0.4) !important;
    color: white;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

.btn {
    padding: 14px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #3db478, #25a976);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: var(--accent-color);
    transform: translateY(-1px);
}

.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.btn-group .btn {
    flex: 1;
}

.mb-0 {
    margin-bottom: 0px !important;
}

/* ========== MOBILE FAB MENU ========== */
.mobile-fab-menu {
    position: fixed;
    bottom: 30px;
    right: 20px;
    z-index: 996;
    display: none;
}

.fab-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: -1;
}

.mobile-fab-menu.active .fab-backdrop {
    opacity: 1;
    visibility: visible;
}

.fab-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fab-main {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.fab-main:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.5);
}

.mobile-fab-menu.active .fab-main {
    transform: rotate(45deg);
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.fab-actions {
    position: absolute;
    bottom: 70px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-fab-menu.active .fab-actions {
    opacity: 1;
    visibility: visible;
}

.fab-action {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid rgba(59, 130, 246, 0.2);
    color: var(--accent-color);
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transform: scale(0);
}

.mobile-fab-menu.active .fab-action {
    animation: fabSlideUp 0.3s ease forwards;
}

.mobile-fab-menu.active .fab-action:nth-child(1) { animation-delay: 0.05s; }
.mobile-fab-menu.active .fab-action:nth-child(2) { animation-delay: 0.1s; }
.mobile-fab-menu.active .fab-action:nth-child(3) { animation-delay: 0.15s; }
.mobile-fab-menu.active .fab-action:nth-child(4) { animation-delay: 0.2s; }
.mobile-fab-menu.active .fab-action:nth-child(5) { animation-delay: 0.25s; }
.mobile-fab-menu.active .fab-action:nth-child(6) { animation-delay: 0.3s; }
.mobile-fab-menu.active .fab-action:nth-child(7) { animation-delay: 0.35s; }

.fab-action:hover {
    background: var(--accent-color);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.fab-action::after {
    content: attr(data-label);
    position: absolute;
    right: 60px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    pointer-events: none;
}

.fab-action:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ========== MOBILE TOOLBAR ========== */
.mobile-toolbar {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transform: translateY(-100%);
    transition: var(--transition);
    display: none;
}

.mobile-toolbar.show {
    transform: translateY(0);
}

.mobile-toolbar-content {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    margin-top: 12px;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.mobile-toolbar-content::-webkit-scrollbar {
    display: none;
}

.mobile-toolbar .btn-icon {
    min-width: 44px;
    width: 44px;
    height: 44px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--accent-color);
    font-size: 16px;
}

.mobile-toolbar .btn-icon:hover {
    background: var(--accent-color);
    color: white;
}

.mobile-more-btn {
    position: relative;
}

.mobile-more-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--surface);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1001;
}

.mobile-more-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-more-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.mobile-more-item:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-color);
}

.mobile-more-item i {
    width: 16px;
    text-align: center;
    color: var(--accent-color);
}

/* ========== SIDEBAR - WITH TOGGLE FUNCTIONALITY ========== */
.sidebar {
    position: absolute;
    top: 100px;
    left: 20px;
    width: 330px;
    max-height: 78vh;
    background: var(--surface);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    animation: slideInLeft 0.6s ease-out;
    overflow: hidden;
    transition: var(--transition);
    display: none;
}

.sidebar.show {
    display: block;
}

.sidebar-header {
    padding: 5px 24px;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    height: 50px;
}

.sidebar-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.sidebar-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    flex: 1;
}

.sidebar .close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-white);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.sidebar .close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.sidebar .close-btn i {
    transition: var(--transition);
}

.sidebar-content {
    padding: 15px;
    max-height: calc(78vh - 50px);
    overflow-y: auto;
    transition: var(--transition);
}

.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

/* ========== SECTIONS ========== */
.section {
    margin-bottom: 16px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 16px;
    position: relative;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--accent-color), transparent);
    margin-left: 16px;
}

.section-title i {
    color: var(--accent-color);
    width: 20px;
    text-align: center;
}

/* ========== FORM ELEMENTS ========== */
.form-group {
    margin-bottom: 16px;
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0 !important;
    border-radius: var(--border-radius) !important;
    background: white;
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
    cursor: pointer;
}

.choices__inner {
    width: 100%;
    border: 2px solid #e2e8f0 !important;
    border-radius: var(--border-radius) !important;
    background: white;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.form-select:disabled {
    background: #f8fafc;
    color: var(--text-secondary);
    cursor: not-allowed;
}

/* ========== STATIC PANEL ========== */
.static-panel {
    position: absolute;
    top: 100px;
    right: 20px;
    width: 280px;
    background: var(--surface);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    animation: slideInRight 0.6s ease-out;
    overflow: hidden;
    display: none;
}

.static-panel.show {
    display: block;
}

.static-header {
    padding: 5px 24px;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    min-height: 50px;
}

.static-content {
    padding: 15px;
}

.static-city {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    text-align: center;
}

.static-temp {
    color: var(--accent-color);
    font-size: 14px;
}

.static-desc {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 14px;
}

.static-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.static-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 14px;
}

.static-item i {
    color: var(--accent-color);
    width: 16px;
    text-align: center;
}

/* ========== LOADING STATE ========== */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 4444;
    color: var(--text-white);
    font-size: 18px;
    font-weight: 500;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 24px;
}

/* ========== MODALS ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 4444;
    animation: fadeIn 0.3s ease-out;
}

.modal .checkbox-item:hover label {
    color: #fff;
}

.modal .checkbox-item label {
    font-weight: 400;
}

.modal .option-list li {
    padding: 8px 10px;
}

.modal .checkbox-item input[type="checkbox"] {
    width: 14px;
    height: 14px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--surface);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 480px;
    width: 100%;
    max-height: 78vh;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

.modal-header {
    padding: 10px 24px;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-white);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ========== HELP SECTIONS ========== */

.help-section h4 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-size: 16px;
}

.help-section h4 i {
    color: var(--accent-color);
    width: 20px;
    text-align: center;
}


.help-section h5 {
    margin-bottom: 6px;
    color: var(--text-primary);
    font-size: 14px;
}

.help-section h5 span {
    margin-bottom: 12px;
    color: var(--danger-color);
    font-size: 14px;
}

.help-section h5 i {
    color: var(--accent-color);
    width: 20px;
    text-align: center;
}

.help-section ul {
    list-style: none;
    padding-left: 32px;
}

.help-section li {
    padding: 2px 0;
    color: var(--text-secondary);
    position: relative;
}

.help-section li::before {
    content: '•';
    color: var(--accent-color);
    position: absolute;
    left: -16px;
    font-weight: bold;
}

/* ========== TOAST NOTIFICATIONS ========== */
.toast-container {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    background: var(--surface);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: slideInDown 0.3s ease-out;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
}

.toast.success::before {
    background: var(--success-color);
}

.toast.warning::before {
    background: var(--warning-color);
}

.toast.error::before {
    background: var(--danger-color);
}

.toast-icon {
    color: var(--accent-color);
    font-size: 18px;
}

.toast.success .toast-icon {
    color: var(--success-color);
}

.toast.warning .toast-icon {
    color: var(--warning-color);
}

.toast.error .toast-icon {
    color: var(--danger-color);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.toast-message {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Accessibility - Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .spinner {
        animation: none;
        border: 4px solid var(--accent-color);
        border-top-color: transparent;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --surface: rgba(15, 23, 42, 0.95);
        --text-primary: #e2e8f0;
        --text-secondary: #94a3b8;
        --border: rgba(255, 255, 255, 0.1);
    }

    .form-select {
        background: #1e293b;
        color: var(--text-primary);
        border-color: var(--border);
    }

    .btn-secondary {
        background: #1e293b;
        color: var(--text-primary);
        border-color: var(--border);
    }

    .btn-secondary:hover {
        background: #334155;
    }
}

.choices__input {
    font-size: 16px !important;
    -webkit-user-select: auto;
    -webkit-touch-callout: default;
}

button, a, [role="button"] {
    touch-action: manipulation;
}

/* ========== LEGEND ========== */
.legend {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--surface);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 10px;
    z-index: 996;
    animation: slideUp 0.6s ease-out;
    width: 150px;
}

.legend-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    font-size: 14px;
}

.legend-title i {
    color: var(--accent-color);
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-primary);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.checkbox-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    position: relative;
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 12px;
    accent-color: var(--accent-color);
    cursor: pointer;
}

.checkbox-item label {
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.checkbox-item:hover label {
    color: var(--accent-color);
}

.layer-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.layer-item {
    position: relative;
}

.layer-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.layer-item label {
    display: block;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.layer-item label::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s;
}

.layer-item input[type="radio"]:checked + label {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.layer-item label:hover::before {
    left: 100%;
}

.layer-item label:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
}


/* ========== RESPONSIVE DESIGN ========== */

/* Desktop styles */
.desktop-only {
    display: flex;
}

/* Tablet styles */
@media (max-width: 1024px) {
    .static-panel {
        width: 260px;
    }
}

.mobile-menu-toggle {
    display: none;
}

/* Mobile landscape */
@media (max-width: 768px) {
    .legend {
        left: 20px !important;
        right: unset !important;
    }

    .header {
        padding: 12px 16px;
        min-height: 56px;
    }

    .logo {
        font-size: 18px;
    }

    .logo i {
        font-size: 20px;
    }

    .logo-text {
        display: none;
    }

    .logo-text-short {
        display: inline;
    }

    .desktop-only {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        width: 44px;
        height: 44px;
        font-size: 16px;
    }

    .mobile-fab-menu {
        display: block;
    }

    .mobile-toolbar {
        display: block;
        top: 56px;
    }

    .sidebar {
        width: calc(100vw - 40px);
        left: 20px;
        right: 20px;
        top: 76px;
        max-height: 76vh;
    }

    .static-panel {
        width: calc(100vw - 40px);
        left: 20px;
        right: 20px;
        top: 76px;
        max-height: calc(100vh - 160px);
    }

    .sidebar-content,
    .static-content {
        padding: 16px;
    }

    .btn-icon {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }

    .btn {
        padding: 12px 16px;
        font-size: 13px;
    }

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

    .modal-content {
        width: 95%;
        margin: 20px;
    }

    .modal-header,
    .modal-body {
        padding: 20px;
    }

    .toast {
        min-width: 280px;
        margin: 0 20px;
    }

    .toast-container {
        left: 50%;
        transform: translateX(-50%);
        top: 80px;
    }
}

/* Mobile portrait */
@media (max-width: 480px) {
    .settings-sidebar {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -46%);
        width: calc(100vw - 20px);
        max-height: 76vh;
        z-index: 999;
        animation: unset !important;
    }

    .settings-sidebar.show {
        display: block !important;
        animation: unset;
    }

    .header {
        padding: 10px 12px;
        min-height: 52px;
    }

    .logo {
        font-size: 16px;
    }

    .logo i {
        font-size: 18px;
    }

    .mobile-toolbar {
        top: 52px;
    }

    .sidebar, .static-panel {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -46%);
        width: calc(100vw - 20px);
        max-height: 76vh;
        overflow: auto;
        z-index: 999;
        animation: unset;
    }

    .sidebar-content,
    .static-content {
        padding: 12px;
    }

    .sidebar-header,
    .static-header {
        padding: 16px;
        min-height: 60px;
    }

    .legend {
        width: 140px !important;
        padding: 10px !important;
    }

    .legend-title {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .legend-items {
        gap: 5px;
    }

    .legend-item {
        font-size: 11px;
    }

    .layer-item label {
        padding: 10px;
    }

    .btn-icon {
        width: 40px;
        height: 40px;
        font-size: 15px;
    }

    .mobile-toolbar .btn-icon {
        width: 40px;
        height: 40px;
    }

    .fab-main {
        width: 56px;
        height: 56px;
        font-size: 18px;
    }

    .fab-action {
        width: 46px;
        height: 46px;
        font-size: 15px;
    }

    .mobile-fab-menu {
        bottom: 20px;
        right: 16px;
    }

    .btn {
        padding: 10px 14px;
        font-size: 12px;
    }

    .form-select {
        padding: 10px 14px;
        font-size: 13px;
    }

    .section {
        margin-bottom: 24px;
    }

    .section-title {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .static-city {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .static-temp {
        font-size: 13px;
    }

    .static-desc {
        font-size: 13px;
        margin-bottom: 16px;
    }

    .static-item {
        font-size: 13px;
        gap: 10px;
    }

    .help-section h4 {
        font-size: 15px;
    }

    .help-section li {
        font-size: 13px;
    }

    .modal-content {
        width: calc(100vw - 20px);
        margin: 10px;
        max-height: calc(100vh - 40px);
    }

    .modal-header,
    .modal-body {
        padding: 16px;
    }

    .modal-header h3 {
        font-size: 16px;
    }

    .toast {
        min-width: 260px;
        margin: 0 10px;
        padding: 12px 16px;
    }

    .toast-container {
        top: 70px;
    }

    .toast-title {
        font-size: 14px;
    }

    .toast-message {
        font-size: 12px;
    }

    .loading {
        font-size: 16px;
    }

    .spinner {
        width: 50px;
        height: 50px;
        margin-bottom: 20px;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .header {
        padding: 8px 10px;
        min-height: 48px;
    }

    .logo {
        font-size: 15px;
    }

    .logo i {
        font-size: 16px;
    }

    .mobile-toolbar {
        top: 48px;
    }

    .sidebar,
    .static-panel {
        top: 68px;
        left: 8px;
        right: 8px;
        width: calc(100vw - 16px);
        max-height: 70vh;
    }

    .sidebar-content,
    .static-content {
        padding: 10px;
    }

    .btn-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .mobile-toolbar .btn-icon {
        width: 36px;
        height: 36px;
    }

    .fab-main {
        width: 52px;
        height: 52px;
        font-size: 16px;
    }

    .fab-action {
        width: 42px;
        height: 42px;
        font-size: 14px;
    }

    .mobile-fab-menu {
        bottom: 16px;
        right: 12px;
    }

    .btn {
        padding: 8px 12px;
        font-size: 11px;
    }

    .section-title {
        font-size: 13px;
    }

    .form-select {
        padding: 8px 12px;
        font-size: 12px;
    }

    .toast {
        min-width: 240px;
        margin: 0 8px;
        padding: 10px 14px;
    }
}

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .sidebar,
    .static-panel {
        max-height: 70vh;
    }

    .mobile-fab-menu {
        bottom: 16px;
    }

    .toast-container {
        top: 60px;
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .btn-icon,
    .fab-main,
    .fab-action {
        border-width: 0.5px;
    }

    .sidebar,
    .static-panel,
    .modal-content {
        border: 0.5px solid var(--border);
    }
}

/* Print styles */
@media print {
    .header,
    .sidebar,
    .static-panel,
    .mobile-fab-menu,
    .mobile-toolbar,
    .toast-container,
    .modal {
        display: none !important;
    }

    #map {
        width: 100% !important;
        height: 100vh !important;
        position: static !important;
    }

    body {
        background: white !important;
    }
}

.leaflet-control-layers {
    display: none !important;
}

.leaflet-popup-content {
    width: 100%;
}

.feature-info-popup .leaflet-popup-content-wrapper {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border: 1px solid #e0e0e0;
}

.feature-info-popup .leaflet-popup-content {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.feature-info {
    min-width: 300px;
}

.feature-info-header {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    padding: 12px 16px;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feature-info-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.feature-info-content {
    padding: 16px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.info-value {
    color: #333;
    font-size: 14px;
    text-align: right;
    max-width: 180px;
    word-wrap: break-word;
}

.forest-type-1 {
    color: #07b833;
    font-weight: 600;
}

.forest-type-2 {
    color: #01D0FF;
    font-weight: 600;
}

.forest-type-3 {
    color: #ffec1d;
    font-weight: 600;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.3);
}

.feature-info-popup .leaflet-popup-close-button {
    color: white;
    font-size: 18px;
    line-height: 1;
    padding: 8px;
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
    transition: background 0.2s;
}

.feature-info-popup .leaflet-popup-close-button:hover {
    background: rgba(0,0,0,0.2);
}

.feature-info-popup .leaflet-popup-tip {
    background: white;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .feature-info {
        min-width: 280px;
    }

    .info-value {
        max-width: 150px;
    }
}

.leaflet-container a.leaflet-popup-close-button {
    position: absolute;
    top: 0;
    right: 0;
    border: none;
    text-align: center;
    width: 40px;
    height: 40px;
    font: 20px / 24px Tahoma, Verdana, sans-serif;
    color: #fff;
    text-decoration: none;
    background: transparent;
}

.leaflet-container a.leaflet-popup-close-button:hover, .leaflet-container a.leaflet-popup-close-button:focus {
    color: #fff;
}

.feature-info-popup .leaflet-popup-close-button:hover {
    background: none;
}

.custom-marker {
    background: white;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: transform 0.2s;
}

.custom-marker:hover {
    transform: scale(1.1);
}

.custom-marker.tourism { border-color: #e74c3c; color: #e74c3c; }
.custom-marker.education { border-color: #3498db; color: #3498db; }
.custom-marker.healthcare { border-color: #2ecc71; color: #2ecc71; }
.custom-marker.transport { border-color: #f39c12; color: #f39c12; }
.custom-marker.business { border-color: #9b59b6; color: #9b59b6; }

.current-location-marker {
    background: rgba(0, 123, 255, 0.2);
    border: 2px solid #007bff;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.note-marker {
    background: transparent;
    border: none;
    animation: bounce 1s ease-in-out;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.context-menu-item:hover {
    background-color: #f8f9fa !important;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 16px;
    margin-bottom: 8px;
    min-width: 300px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast-success { border-left: 4px solid #28a745; }
.toast-error { border-left: 4px solid #dc3545; }
.toast-warning { border-left: 4px solid #ffc107; }
.toast-info { border-left: 4px solid #17a2b8; }

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-success .toast-icon { color: #28a745; }
.toast-error .toast-icon { color: #dc3545; }
.toast-warning .toast-icon { color: #ffc107; }
.toast-info .toast-icon { color: #17a2b8; }

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.toast-message {
    font-size: 14px;
    color: #666;
}

.toast-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.toast-close:hover {
    background: #f8f9fa;
}

.hidden {
    display: none;
}

select {
    color: #000;
}

option {
    color: #000;
}

.option-list li {
    padding: 10px 16px;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    transition: background 0.2s ease;
}
.option-list li:hover {
    background: var(--accent-color);
    color: white;
    font-weight: 500;
    transform: scale(1.01);
}

#selectModal {
    background: rgba(0, 0, 0, 0.6);
}

/* Settings Sidebar Styles */
.settings-sidebar {
    position: absolute;
    top: 100px;
    right: 20px;
    width: 320px;
    max-height: 78vh;
    background: var(--surface);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    animation: slideInRight 0.6s ease-out;
    overflow: hidden;
    transition: var(--transition);
    display: none;
}

.settings-sidebar.show {
    display: block;
}

/* Control Groups */
.control-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.control-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.control-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s;
}

.control-btn:hover::before {
    left: 100%;
}

.control-btn:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.control-btn:active {
    transform: translateY(0);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.control-btn:disabled:hover {
    background: white;
    color: var(--text-primary);
    border-color: #e2e8f0;
    box-shadow: none;
}

.control-btn i {
    font-size: 16px;
}

.opacity-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    font-size: 14px;
}

.opacity-btn span {
    display: none;
}

/* Toggle Switch */
.toggle-switch-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}

.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ccc;
    border-radius: 30px;
    transition: var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(30px);
}

.toggle-label {
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
}

/* Opacity Control */
.opacity-control {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
}

.opacity-slider {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.opacity-bar {
    height: 100%;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    border-radius: 4px;
    width: 100%;
    transition: width 0.3s ease;
    position: relative;
}

.opacity-handle {
    position: absolute;
    top: 50%;
    right: -6px;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: white;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    cursor: grab;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.opacity-handle:hover {
    transform: translateY(-50%) scale(1.2);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.opacity-handle:active {
    cursor: grabbing;
}

.opacity-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Control Labels */
.control-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.control-label i {
    color: var(--accent-color);
    margin-right: 8px;
}

.opacity-value {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 14px;
}

/* Preset Buttons */
.preset-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 8px;
}

.preset-btn {
    padding: 8px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.preset-btn:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    transform: scale(1.05);
}

.preset-btn.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Animations */
@keyframes settingsSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.settings-sidebar.show {
    animation: settingsSlideIn 0.4s ease-out;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .settings-sidebar {
        width: calc(100vw - 40px);
        left: 20px;
        right: 20px;
        top: 76px;
        max-height: 76vh;
    }

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

    .opacity-control {
        gap: 8px;
    }

    .opacity-btn {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }

    .control-btn {
        padding: 10px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .settings-sidebar {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -46%);
        width: calc(100vw - 20px);
        height: 72vh;
        z-index: 999;
    }

    .toggle-switch {
        width: 50px;
        height: 26px;
    }

    .toggle-slider::before {
        height: 18px;
        width: 18px;
        left: 4px;
        bottom: 4px;
    }

    .toggle-switch input:checked + .toggle-slider::before {
        transform: translateX(24px);
    }

    .btn-reset {
        margin-bottom: 60px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .control-btn {
        background: #1e293b;
        border-color: rgba(255, 255, 255, 0.1);
        color: var(--text-primary);
    }

    .preset-btn {
        background: #1e293b;
        border-color: rgba(255, 255, 255, 0.1);
        color: var(--text-primary);
    }

    .opacity-slider {
        background: rgba(255, 255, 255, 0.1);
    }
}

/* ========== ORDER FORM STYLES ========== */
/* Order Form Layout */
.order-form {
    display: grid;
}

.form-section {
    background: #f8fafc;
    border-radius: var(--border-radius);
    padding: 10px 20px;
    border: 1px solid #e2e8f0;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group:last-child {
    margin-bottom: 0;
}

/* Form Elements */
.form-label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-size: 14px;
}

.form-label.required::after {
    content: '*';
    color: var(--danger-color);
    margin-left: 4px;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius);
    background: white;
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
    font-family: inherit;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

/* Responsive cho Order Form */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .radio-group {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 480px) {
    .form-section {
        padding: 16px;
    }

    .order-summary {
        padding: 12px;
    }
}


::-webkit-scrollbar {
    width: 4px;
    height: 10px;
    background-color: rgba(0, 0, 0, 0);
    -webkit-border-radius: 80px;
}

::-webkit-scrollbar:hover {
    background-color: rgba(59, 130, 246, 0.4);
}

::-webkit-scrollbar-thumb:vertical {
    background: rgba(59, 130, 246, 0.9);
    -webkit-border-radius: 80px;
}

::-webkit-scrollbar-thumb:vertical:active {
    background: rgba(59, 130, 246, 1);
    -webkit-border-radius: 80px;
}

.bieu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 15px;
}

/* Bieu card design */
.bieu-card {
    position: relative;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border-radius: 16px;
    padding: 15px 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    transition: var(--transition);
    cursor: pointer;
    overflow: hidden;
    align-content: center;
}

.bieu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
    border-radius: 16px 16px 0 0;
}

.bieu-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.15);
    border-color: var(--accent-color);
}

/* Card content */
.bieu-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bieu-number {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--accent-color), #2563eb);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    flex-shrink: 0;
}

.bieu-info {
    flex: 1;
}

.bieu-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    margin: 0;
}

/* Action buttons - ẩn mặc định, thiết kế tròn */
.bieu-actions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 16px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 10;
}

.bieu-card:hover .bieu-actions {
    opacity: 1;
    visibility: visible;
}

/* Overlay khi hover */
.bieu-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.bieu-card:hover::after {
    opacity: 1;
    visibility: visible;
}

.action-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 11;
}

.action-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.btn-view {
    background: linear-gradient(135deg, var(--accent-color), #2563eb);
    color: white;
}

.btn-view:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
}

.btn-download {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
}

.btn-download:hover {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
}

/* Màu sắc khác nhau cho từng biểu */
.bieu-card.success .bieu-number {
    background: linear-gradient(135deg, var(--success-color), #059669);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.bieu-card.success::before {
    background: linear-gradient(90deg, var(--success-color), #059669);
}

.bieu-card.warning .bieu-number {
    background: linear-gradient(135deg, var(--warning-color), #d97706);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.bieu-card.warning::before {
    background: linear-gradient(90deg, var(--warning-color), #d97706);
}

.bieu-card.danger .bieu-number {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.bieu-card.danger::before {
    background: linear-gradient(90deg, var(--danger-color), #dc2626);
}

.bieu-card.info .bieu-number {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.bieu-card.info::before {
    background: linear-gradient(90deg, #06b6d4, #0891b2);
}

.bieu-card.purple .bieu-number {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.bieu-card.purple::before {
    background: linear-gradient(90deg, #8b5cf6, #7c3aed);
}

.bieu-card.pink .bieu-number {
    background: linear-gradient(135deg, #ec4899, #db2777);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

.bieu-card.pink::before {
    background: linear-gradient(90deg, #ec4899, #db2777);
}

.bieu-card.indigo .bieu-number {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.bieu-card.indigo::before {
    background: linear-gradient(90deg, #6366f1, #4f46e5);
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        margin: 20px;
        width: calc(100% - 40px);
        max-height: 90vh;
    }

    .bieu-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .bieu-card {
        padding: 20px;
    }

    .bieu-header {
        gap: 12px;
    }

    .bieu-number {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }

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

    .action-btn {
        padding: 8px 10px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .modal-body {
        padding: 16px;
    }

    .bieu-actions {
        gap: 12px;
    }

    .action-btn {
        width: 50px;
        height: 50px;
        font-size: 16px;
    }
}

/* ========== TAB NAVIGATION - IMPROVED ========== */
.tab-navigation {
    display: flex;
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tab-button {
    flex: 1;
    padding: 14px 20px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    border-right: 1px solid rgba(59, 130, 246, 0.15);
}

.tab-button:last-child {
    border-right: none;
}

.tab-button:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-color);
}

.tab-button.active {
    background: linear-gradient(135deg, var(--accent-color), #2563eb);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.tab-content {
    display: none;
    animation: fadeInTab 0.4s ease-out;
}

.tab-content.active {
    display: block;
}

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

/* Action Toast Styles */
.action-toast {
    min-width: 350px;
    max-width: 450px;
    padding: 20px;
}

.action-toast .toast-content {
    flex: 1;
}

.action-toast .toast-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.action-toast .toast-message {
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.5;
}

/* Toast Actions Container */
.toast-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    justify-content: flex-end;
}

/* Toast Action Buttons */
.toast-action-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 70px;
    position: relative;
    overflow: hidden;
}

.toast-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.toast-action-btn:hover::before {
    left: 100%;
}

/* Primary Action Button */
.toast-action-btn.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.toast-action-btn.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Secondary Action Button */
.toast-action-btn.btn-secondary {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.toast-action-btn.btn-secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

/* Success Action Button */
.toast-action-btn.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.toast-action-btn.btn-success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Danger Action Button */
.toast-action-btn.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.toast-action-btn.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Toast Close Button cho Action Toast */
.action-toast .toast-close {
    align-self: flex-start;
    margin-top: 4px;
}

/* Mobile Responsive cho Action Toast */
@media (max-width: 768px) {
    .action-toast {
        min-width: 300px;
        max-width: calc(100vw - 40px);
        padding: 16px;
    }

    .toast-actions {
        flex-direction: column;
        gap: 8px;
        margin-top: 12px;
    }

    .toast-action-btn {
        width: 100%;
        padding: 10px 16px;
        font-size: 14px;
    }

    .action-toast .toast-title {
        font-size: 15px;
    }

    .action-toast .toast-message {
        font-size: 13px;
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {
    .action-toast {
        min-width: 280px;
        padding: 14px;
    }

    .toast-container {
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 20px);
    }
}

/* Animation cho Action Toast */
.action-toast {
    animation: actionToastSlideIn 0.4s ease-out;
}

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

/* Hover effect cho toàn bộ action toast */
.action-toast:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Focus states cho accessibility */
.toast-action-btn:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Loading state cho action buttons (optional) */
.toast-action-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.toast-action-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

/* ========== ORDER MODAL STEP NAVIGATION ========== */
.order-step-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.order-step-nav::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e2e8f0;
    z-index: 1;
}

.order-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    z-index: 2;
}

.order-step-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e2e8f0;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    color: #64748b;
    transition: var(--transition);
    margin-bottom: 8px;
}

.order-step-item.active .order-step-circle {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.order-step-item.completed .order-step-circle {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.order-step-label {
    font-size: 12px;
    color: #64748b;
    text-align: center;
    font-weight: 500;
    transition: var(--transition);
}

.order-step-item.active .order-step-label {
    color: var(--accent-color);
    font-weight: 600;
}

.order-step-item.completed .order-step-label {
    color: var(--success-color);
    font-weight: 600;
}

/* Progress line */
.order-step-progress {
    position: absolute;
    top: 15px;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), var(--success-color));
    transition: width 0.5s ease;
    z-index: 1;
}

/* ========== ORDER STEP CONTENT ========== */
.order-step-content {
    display: none;
    animation: fadeInStep 0.4s ease-out;
}

.order-step-content.active {
    display: block;
}

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

.order-step-intro {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: var(--border-radius-lg);
    margin-bottom: 20px;
}

.order-step-intro h3 {
    color: var(--accent-color);
    margin-bottom: 16px;
    font-size: 20px;
}

.order-step-intro p {
    color: #1e293b;
    font-size: 16px;
    text-align: justify;
    line-height: 1.6;
    margin-bottom: 0;
}

.order-step-intro i {
    font-size: 48px;
    color: var(--accent-color);
    margin-bottom: 20px;
    opacity: 0.8;
}

/* ========== STEP 3 FORM ELEMENTS ========== */
.step3-form-grid {
    display: grid;
    grid-template-columns: 1fr;
}

.step3-form-group {
    margin-bottom: 10px;
}

.step3-form-group.full-width {
    grid-column: 1 / -1;
}

/* ========== STEP 4 SUMMARY ========== */
.order-summary {
    background: #f8fafc;
    border-radius: var(--border-radius);
    padding: 20px;
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.order-summary-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    font-size: 16px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
}

.order-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.order-summary-item:last-child {
    border-bottom: none;
}

.order-summary-label {
    font-weight: 500;
    color: #64748b;
    min-width: 120px;
}

.order-summary-value {
    color: var(--text-primary);
    text-align: right;
    flex: 1;
    margin-left: 16px;
}

.order-summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.order-summary-list li {
    padding: 4px 0;
    color: var(--text-primary);
    position: relative;
    padding-left: 16px;
}

/* ========== STEP NAVIGATION BUTTONS ========== */
.order-step-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.order-step-actions .btn-group {
    margin: 0;
    gap: 12px;
}

.step-back-btn {
    visibility: hidden;
}

.step-back-btn.visible {
    visibility: visible;
}

/* ========== RESPONSIVE FOR STEPS ========== */
@media (max-width: 768px) {
    .order-step-nav {
        margin-bottom: 20px;
    }

    .order-step-circle {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }

    .order-step-label {
        font-size: 10px;
    }

    .order-step-intro {
        padding: 30px 16px;
    }

    .order-step-intro h3 {
        font-size: 18px;
    }

    .order-step-intro i {
        font-size: 36px;
    }

    .step3-form-grid {
        grid-template-columns: 1fr;
    }

    .order-summary {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .order-step-nav {
        flex-wrap: wrap;
        gap: 10px;
    }

    .order-step-item {
        flex: none;
        width: calc(50% - 5px);
        margin-bottom: 10px;
    }

    .order-step-nav::before {
        display: none;
    }

    .order-step-progress {
        display: none;
    }

    .order-step-intro {
        padding: 20px 12px;
    }

    .order-summary-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .order-summary-label {
        margin-bottom: 4px;
        min-width: auto;
    }

    .order-summary-value {
        margin-left: 0;
        text-align: left;
    }
}

.order-step-actions .btn{
    min-width: 110px;
}
