/* ========== Base / Theme ========== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

:root {
    --bg-main: #f4f5f7;
    --bg-card: #ffffff;
    --text-main: #111827;
    --border-subtle: #e5e7eb;
    --primary: #2563eb;
    --primary-soft: rgba(37, 99, 235, 0.12);
    --sidebar-bg: #111827;
    --sidebar-link: #e5e7eb;
    --sidebar-link-active: #ffffff;
}

html[data-theme='dark'] {
    --bg-main: #020617;
    --bg-card: #020617;
    --text-main: #e5e7eb;
    --border-subtle: #1f2937;
    --primary-soft: rgba(37, 99, 235, 0.25);
    --sidebar-bg: #020617;
    --sidebar-link: #9ca3af;
    --sidebar-link-active: #ffffff;
}

html[data-accent='green'] { --primary: #22c55e; }
html[data-accent='amber'] { --primary: #f59e0b; }

body {
    background: var(--bg-main);
    color: var(--text-main);
}

.d-flex { display: flex; }

/* ========== Layout ========== */

.layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */

.sidebar {
    width: 220px;
    background: var(--sidebar-bg);
    color: #f9fafb;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    position: relative;
    z-index: 100;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0 0.9rem 0;
}

.sidebar-logo {
    max-width: 160px;
    width: 100%;
    height: auto;
    display: block;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.8rem;
    border-radius: 0.45rem;
    color: var(--sidebar-link);
    text-decoration: none;
    font-size: 0.92rem;
}

.sidebar-nav a:hover {
    background: #1f2937;
}

.sidebar-nav a.active {
    background: var(--primary);
    color: var(--sidebar-link-active);
}

.sidebar-nav a i {
    font-size: 1.05rem;
}

/* Content */

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Topbar */

.topbar {
    height: 60px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    width: 100%;
}

.page-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-label {
    font-size: 0.9rem;
    color: #9ca3af;
}

.theme-switcher {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.accent-select {
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    background: transparent;
    color: inherit;
}

/* Main */

.main {
    padding: 1.5rem;
}

/* ========== Cards & Grids ========== */

.card {
    background: var(--bg-card);
    border-radius: 0.9rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.18);
    border: 1px solid var(--border-subtle);
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.columns-2 {
    display: grid;
    grid-template-columns: minmax(0,2fr) minmax(0,3fr);
    gap: 1rem;
}

.columns-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.columns-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

/* Accent cards (summary blocks) */

.card-accent-green {
    border-top: 3px solid #22c55e;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.06), transparent);
}

.card-accent-blue {
    border-top: 3px solid #3b82f6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.06), transparent);
}

.card-accent-purple {
    border-top: 3px solid #8b5cf6;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.06), transparent);
}

.card-accent-amber {
    border-top: 3px solid #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.06), transparent);
}

.columns-4 .card .card-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
}

.columns-4 .card .text-muted {
    font-size: 0.8rem;
}

.columns-4 .card .mt-1 span,
.columns-4 .card .mt-1 strong {
    font-size: 1.1rem;
}

/* Performance metrics */

.performance-grid .metric-box {
    padding: 0.5rem 0.65rem;
    border-radius: 0.7rem;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.015);
    font-size: 0.86rem;
}

.performance-grid .metric-box .text-muted {
    font-size: 0.75rem;
    margin-bottom: 0.15rem;
}

/* ========== Buttons ========== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: none;
    padding: 0.5rem 1.1rem;
    font-size: 0.9rem;
    cursor: pointer;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    transition: transform 0.05s ease, box-shadow 0.05s ease, background 0.1s ease;
    box-shadow: 0 6px 18px var(--primary-soft);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px var(--primary-soft);
}

.btn-small {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

.btn-secondary {
    background: #6b7280;
    box-shadow: 0 4px 10px rgba(107, 114, 128, 0.3);
}

.btn-danger {
    background: #dc2626;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.3);
}

.btn-icon-only {
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
}

/* Live/disabled edit buttons */

.btn-live-timer {
    background: #f97316;
}

.btn-soft-disabled {
    background: #9ca3af !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

/* ========== Forms ========== */

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem 1rem;
}

.form-group label {
    font-size: 0.8rem;
    color: #9ca3af;
    display: block;
    margin-bottom: 0.25rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    border-radius: 0.5rem;
    border: 1px solid var(--border-subtle);
    padding: 0.45rem 0.6rem;
    font-size: 0.9rem;
    background: transparent;
    color: inherit;
}

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

.form-actions {
    margin-top: 0.75rem;
}

/* Select2 */

.form-group .select2-container {
    width: 100% !important;
}

.select2-container .select2-selection--single {
    min-height: 34px;
    border-radius: 0.5rem !important;
    border: 1px solid var(--border-subtle) !important;
    background: transparent !important;
    display: flex !important;
    align-items: center;
    padding: 0 2rem 0 0.6rem;
    box-shadow: none !important;
}

.select2-container .select2-selection--single .select2-selection__rendered {
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
    color: inherit;
    line-height: 1.3;
}

.select2-container .select2-selection__arrow {
    height: 100% !important;
    top: 50% !important;
    right: 0.6rem !important;
    transform: translateY(-50%);
}

.select2-container--default .select2-selection--single:focus,
.select2-container--default .select2-selection--single:hover,
.select2-container--default .select2-selection--single:active {
    outline: none !important;
    border-color: var(--primary) !important;
}

.select2-container .select2-dropdown {
    border-radius: 0.5rem !important;
    border: 1px solid var(--border-subtle) !important;
    overflow: hidden;
}

.select2-results__option {
    padding: 0.45rem 0.6rem !important;
    font-size: 0.9rem;
}
.select2-results__option--highlighted {
    background: var(--primary-soft) !important;
    color: inherit !important;
}

/* Tagify */

.form-group .tagify {
    width: 100%;
}

.tagify {
    border-radius: 0.5rem;
    border: 1px solid var(--border-subtle);
    background: transparent;
    min-height: 34px;
    padding: 0.15rem 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: text;
}

.tagify__tag {
    border-radius: 999px;
    padding: 0 0.45rem;
    font-size: 0.8rem;
    background: var(--primary-soft);
    color: var(--text-main);
}

.tagify__input {
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}

/* ========== Tables ========== */

.table-wrapper {
    overflow-x: auto;
}

table.dataTable {
    width: 100% !important;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.75rem;
    font-size: 0.85rem;
}

th, td {
    border: 1px solid var(--border-subtle);
    padding: 0.4rem 0.5rem;
    text-align: left;
}

th {
    background: #0f172a0a;
    font-weight: 600;
    white-space: nowrap;
}

/* Compact tables */

.table-compact {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.table-compact th,
.table-compact td {
    padding: 0.25rem 0.4rem;
}

.table-compact thead th {
    font-weight: 600;
    background: rgba(15, 23, 42, 0.03);
}

/* ========== Login ========== */

/* =========================
   Login Page Layout & Styles
   ========================= */

:root {
    --login-primary: #ff8a4a;
    --login-primary-hover: #ff7a30;
    --login-bg-soft: #f7fafc;
    --login-text-main: #1f2933;
    --login-text-muted: #9aa5b1;
    --login-danger-bg: #fef2f2;
    --login-danger-border: #fecaca;
    --login-danger-text: #b91c1c;
}

/* Wrapper */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #ffe6d5, #fdfdfd);
}

/* Card container */
.login-container {
    max-width: 980px;
    width: 100%;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
    display: flex;
    overflow: hidden;
}

/* LEFT COLUMN: illustration */
.login-illustration-col {
    flex: 1;
    background: linear-gradient(135deg, #fef6f0, #f5fbff);
    padding: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-illustration-wrapper {
    max-width: 420px;
    width: 100%;
    text-align: left;
}

.login-illustration-title {
    font-size: 1.25rem;
    margin: 0 0 0.5rem;
    color: var(--login-text-main);
}

.login-illustration-text {
    font-size: 0.9rem;
    color: var(--login-text-muted);
    margin: 0 0 1.5rem;
}

.login-illustration-img {
    width: 100%;
    max-width: 420px;
    border-radius: 16px;
    display: block;
}

/* RIGHT COLUMN: form (center aligned) */
.login-form-col {
    flex: 0 0 380px;
    padding: 2.5rem 2.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center; /* vertical center */
}

/* Logo */
.login-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
}

.login-logo-img {
    max-width: 300px;
    height: auto;
    display: block;
}

.login-logo i {
    font-size: 1.25rem;
}

/* Titles */
.login-title {
    font-size: 1.6rem;
    margin: 0 0 0.25rem;
    color: var(--login-text-main);
}

.login-subtitle {
    margin: 0 0 1.75rem;
    font-size: 0.9rem;
    color: var(--login-text-muted);
}

.login-subtitle a {
    color: var(--login-primary);
    font-weight: 600;
    text-decoration: none;
}

.login-subtitle a:hover {
    text-decoration: underline;
}

/* Form */
.login-form-col .form-group {
    margin-bottom: 1rem;
}

.login-form-col label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
    color: #4b5563;
}

.login-form-col input[type="text"],
.login-form-col input[type="password"],
.login-form-col input[type="email"] {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #d2d6dc;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-form-col input:focus {
    border-color: var(--login-primary);
    box-shadow: 0 0 0 1px rgba(255,138,74,0.25);
}

/* Remember + Forgot row */
.login-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    margin-bottom: 1.1rem;
}

.remember-me {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    color: #4b5563;
}

.remember-me input {
    margin: 0;
}

.forgot-link {
    color: var(--login-primary);
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Primary login button
   (keeps your global .btn styles, just tweaks for login) */
.btn-login-primary {
    width: 100%;
    border-radius: 999px;
    background: var(--login-primary);
    border: none;
    padding: 0.7rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: #ffffff;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s ease, transform 0.05s ease;
}

.btn-login-primary:hover {
    background: var(--login-primary-hover);
}

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

/* Alerts (in case you don't already have) */
.alert {
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.alert-danger {
    background: var(--login-danger-bg);
    border: 1px solid var(--login-danger-border);
    color: var(--login-danger-text);
}

/* Responsive */
@media (max-width: 860px) {
    .login-container {
        flex-direction: column;
        max-width: 520px;
    }

    .login-illustration-col {
        order: 1;
        padding: 1.8rem;
    }

    .login-form-col {
        order: 2;
        flex: none;
        padding: 2rem;
    }
}

/* ========== Alerts / Toasts ========== */

.alert {
    padding: 0.6rem 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    color: var(--text-main);
    padding: 0.7rem 1rem;
    border-radius: 999px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.45);
    border: 1px solid var(--border-subtle);
    font-size: 0.85rem;
    display: none;
    z-index: 9999;
    white-space: nowrap;
}

.toast.show {
    display: block;
    animation: toast-in 0.3s ease forwards;
}

.toast.hide {
    animation: toast-out 0.3s ease forwards;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes toast-out {
    from { opacity: 1; transform: translateX(-50%) translateY(0); }
    to   { opacity: 0; transform: translateX(-50%) translateY(10px); }
}

/* ========== Badges & Text Utilities ========== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    font-size: 0.7rem;
    border: 1px solid var(--border-subtle);
    margin-right: 0.15rem;
}

.badge-open {
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    border: 1px solid rgba(22, 163, 74, 0.3);
    background: rgba(22, 163, 74, 0.08);
    color: #16a34a;
}

.badge-closed {
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: rgba(15, 23, 42, 0.03);
    color: #6b7280;
}

.text-muted {
    color: #9ca3af;
    font-size: 0.85rem;
}

.text-profit { color: #16a34a; }
.text-loss   { color: #dc2626; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }

/* Best days badges */

.ss-best-days {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.2rem;
}

.ss-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(148, 163, 184, 0.08);
    white-space: nowrap;
}

/* Capital note pill */

.capital-note {
    font-size: 0.8rem;
    border-radius: 999px;
    padding: 0.3rem 0.75rem;
    display: inline-block;
    margin-top: 0.35rem;
    background: rgba(148, 163, 184, 0.12);
}

/* ========== Modals ========== */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}

.modal-backdrop.open {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border-radius: 0.9rem;
    padding: 1.25rem 1.5rem;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-subtle);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.modal-body {
    margin-top: 0.25rem;
}

.read-value {
    font-size: 0.9rem;
    margin-top: 0.1rem;
}

/* ========== Strategy List / Accordion ========== */

.strategy-list {
    list-style: none;
    margin: 0.5rem 0 0 0;
    padding: 0;
}

.strategy-item {
    border: 1px solid var(--border-subtle);
    border-radius: 0.75rem;
    margin-bottom: 0.5rem;
    overflow: hidden;
    background: var(--bg-card);
}

.strategy-toggle {
    width: 100%;
    border: none;
    background: transparent;
    padding: 0.6rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    cursor: pointer;
}

.strategy-toggle-main {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.strategy-toggle-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: auto;
}

.strategy-toggle-stats {
    font-size: 0.8rem;
    color: #9ca3af;
    white-space: nowrap;
}

.strategy-toggle-arrow {
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.strategy-toggle.open .strategy-toggle-arrow {
    transform: rotate(180deg);
}

.strategy-body {
    display: none;
    padding: 0.6rem 1.75rem 0.8rem;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.85rem;
}

.strategy-body.open {
    display: block;
}

.badge-enabled {
    background: rgba(34,197,94,0.12);
    color: #16a34a;
}

.badge-disabled {
    background: rgba(148,163,184,0.18);
    color: #64748b;
}

/* Rich text editor */

.editor-toolbar {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}

.editor-btn {
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    padding: 0.15rem 0.6rem;
    font-size: 0.8rem;
    cursor: pointer;
}

.editor-btn:hover {
    background: #0f172a0a;
}

.editor-area {
    border-radius: 0.5rem;
    border: 1px solid var(--border-subtle);
    padding: 0.45rem 1.6rem;
    font-size: 0.9rem;
    min-height: 80px;
    background: transparent;
    color: inherit;
    line-height: 1.4;
    white-space: pre-wrap;
}

/* ========== Dashboard Hero + Market Snapshot ========== */

/* Greeting + NSE snapshot stacked */

.dashboard-hero {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: 1.2rem;
    background: linear-gradient(
        135deg,
        rgba(59, 130, 246, 0.06),
        rgba(16, 185, 129, 0.03)
    );
    border: 1px solid rgba(148,163,184,0.25);
}

.dashboard-greeting h2 {
    font-size: 1.35rem;
    font-weight: 600;
}

.dashboard-greeting p {
    font-size: 0.9rem;
}

/* NSE snapshot block below greeting */

.market-summary {
    flex: 0 0 auto;
}

.market-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
}

/* 3x2 grid of small market cards */

.market-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.6rem;
}

.market-card {
    padding: 0.75rem;
    border-radius: 0.75rem;
    background: rgba(15, 23, 42, 0.01);
    border: 1px solid rgba(148,163,184,0.25);
    box-shadow: 0 2px 4px rgba(15,23,42,0.08);
    transition: all 0.2s ease;
}

.market-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(15,23,42,0.12);
}

.market-card-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.market-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.market-last {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.market-change {
    font-size: 0.8rem;
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.market-change-pct {
    opacity: 0.7;
}

/* Up / down / flat backgrounds */

.market-card-up {
    background: linear-gradient(135deg, rgba(34,197,94,0.08), white);
    border-color: rgba(34,197,94,0.25);
}

.market-card-down {
    background: linear-gradient(135deg, rgba(239,68,68,0.08), white);
    border-color: rgba(239,68,68,0.25);
}

.market-card-flat {
    background: linear-gradient(135deg, rgba(148,163,184,0.08), white);
    border-color: rgba(148,163,184,0.3);
}

/* ========== Strategy Filter Header ========== */

.strategy-filter-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.strategy-filter-wrap .select2-container {
    min-width: 220px;
}

/* ========== Charts ========== */

#equityChart,
#weekdayChart {
    padding-top: 0.25rem;
}

.card canvas {
    background: radial-gradient(circle at top, rgba(148, 163, 184, 0.08), transparent 55%);
    border-radius: 0.75rem;
}

/* ========== Responsive ========== */

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

@media (max-width: 900px) {
    .dashboard-hero {
        padding: 1rem;
    }

    .market-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 768px) {
    .dashboard-hero {
        padding: 1rem;
    }
}

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

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

    .market-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}