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

:root {
    --bg: #f7f8fa;
    --surface: #ffffff;
    --surface-soft: #f8fafc;

    --text: #111827;
    --muted: #64748b;

    --border: #e5e7eb;
    --border-dark: #d1d5db;

    --primary: #facc15;
    --primary-hover: #eab308;

    --accent: #3b82f6;

    --success: #22c55e;
    --danger: #ef4444;

    --dark: #111827;
    --dark-soft: #1f2937;

    --shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 18px 45px rgba(15, 23, 42, 0.10);

    --navbar-height: 76px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Poppins", sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

img {
    max-width: 100%;
}

a {
    color: inherit;
}


/* =========================================================
   SCROLL OFFSET
   Prevent navbar from covering section headings
   ========================================================= */

#overview,
#products,
#collections,
#settings,
#analytics {
    scroll-margin-top: calc(var(--navbar-height) + 28px);
}


/* =========================================================
   HORIZONTAL NAVBAR
   ========================================================= */

.navbar {
    position: sticky;
    top: 0;
    left: 0;

    width: 100%;
    height: var(--navbar-height);

    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border);

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    z-index: 1000;
}

.navbar-inner {
    width: 100%;
    max-width: 1600px;

    height: 100%;

    margin: 0 auto;

    padding: 0 36px;

    display: flex;
    align-items: center;
    gap: 30px;
}


/* =========================================================
   NAVBAR BRAND
   ========================================================= */

.navbar-brand {
    flex-shrink: 0;

    display: flex;
    align-items: center;
    gap: 11px;

    text-decoration: none;
}

.brand-logo-wrap {
    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #ffffff;

    border: 1px solid var(--border);
    border-radius: 12px;

    overflow: hidden;
}

.brand-logo {
    width: 100%;
    height: 100%;

    object-fit: contain;
}

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

.brand-text strong {
    font-size: 18px;
    line-height: 1.1;

    font-weight: 800;

    letter-spacing: -0.03em;
}

.brand-text span {
    margin-top: 3px;

    color: var(--muted);

    font-size: 10px;
    font-weight: 500;
}


/* =========================================================
   NAVIGATION LINKS
   ========================================================= */

.navbar-nav {
    flex: 1;

    display: flex;
    align-items: center;

    gap: 4px;
}

.nav-link {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;

    padding: 0 15px;

    border-radius: 10px;

    color: #64748b;

    text-decoration: none;

    font-size: 13px;
    font-weight: 600;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.nav-link:hover {
    background: #f3f4f6;
    color: var(--text);
}

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

.nav-link.active:hover {
    background: var(--primary-hover);
}


/* =========================================================
   NAVBAR RIGHT
   ========================================================= */

.navbar-right {
    flex-shrink: 0;

    display: flex;
    align-items: center;

    gap: 10px;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 9px 13px;

    background: #ffffff;

    border: 1px solid var(--border);

    border-radius: 999px;

    color: #334155;

    font-size: 11px;
    font-weight: 600;
}

.status-dot {
    width: 7px;
    height: 7px;

    flex: 0 0 7px;

    border-radius: 50%;

    background: var(--success);
}

.logout-button {
    border: 1px solid var(--border);

    background: #ffffff;

    color: var(--text);

    border-radius: 10px;

    padding: 9px 14px;

    font-size: 12px;
    font-weight: 600;

    transition: 0.2s ease;
}

.logout-button:hover {
    background: #f3f4f6;
    border-color: var(--border-dark);
}


/* =========================================================
   MAIN
   ========================================================= */

.app {
    min-height: 100vh;
    background: var(--bg);
}

.main {
    width: 100%;
    max-width: 1600px;

    margin: 0 auto;

    padding: 40px 36px 80px;
}


/* =========================================================
   PAGE HEADER
   ========================================================= */

.page-header {
    margin-bottom: 30px;
}

.eyebrow,
.section-label {
    display: inline-block;

    color: #94a3b8;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 0.12em;

    text-transform: uppercase;
}

.page-header h1 {
    margin-top: 7px;

    font-size: 34px;
    line-height: 1.15;

    font-weight: 800;

    letter-spacing: -0.045em;
}

.page-header p {
    margin-top: 7px;

    color: var(--muted);

    font-size: 13px;
}


/* =========================================================
   DASHBOARD SECTIONS
   ========================================================= */

.dashboard-section {
    margin-top: 46px;
}

.overview-section {
    margin-top: 0;
}


/* =========================================================
   METRICS
   ========================================================= */

.metrics {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 16px;

    margin-bottom: 22px;
}

.metric-card {
    position: relative;

    min-height: 150px;

    padding: 22px;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: 18px;

    box-shadow: var(--shadow);

    overflow: hidden;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);

    box-shadow: var(--shadow-lg);
}

.metric-card::after {
    content: "";

    position: absolute;

    right: -35px;
    bottom: -35px;

    width: 100px;
    height: 100px;

    background: rgba(250, 204, 21, 0.12);

    border-radius: 50%;
}

.metric-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.metric-top > span {
    color: var(--muted);

    font-size: 12px;
    font-weight: 600;
}

/*
   No P / C / M placeholder letters.
   This is intentionally empty.
*/

.metric-icon {
    display: none;
}

.metric-card strong {
    display: block;

    margin-top: 15px;

    color: var(--text);

    font-size: 32px;
    line-height: 1;

    font-weight: 800;

    letter-spacing: -0.04em;
}

.metric-card small {
    display: block;

    margin-top: 12px;

    color: #94a3b8;

    font-size: 11px;
}


/* =========================================================
   GENERAL GRID
   ========================================================= */

.dashboard-grid {
    display: grid;

    grid-template-columns: minmax(0, 1fr);

    gap: 18px;
}

.grid-two {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 18px;
}


/* =========================================================
   PANELS
   ========================================================= */

.panel {
    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: 18px;

    box-shadow: var(--shadow);

    padding: 24px;
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    margin-bottom: 20px;
}

.panel-header h2,
.panel-header h3 {
    margin-top: 5px;

    color: var(--text);

    font-weight: 700;

    letter-spacing: -0.025em;
}

.panel-header h2 {
    font-size: 20px;
}

.panel-header h3 {
    font-size: 17px;
}

.panel-header p {
    margin-top: 5px;

    color: var(--muted);

    font-size: 12px;
    line-height: 1.6;
}


/* =========================================================
   QUICK ACTIONS
   ========================================================= */

.quick-actions {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 12px;
}

.quick-actions button {
    min-height: 92px;

    display: flex;
    align-items: center;

    gap: 12px;

    padding: 16px;

    text-align: left;

    background: var(--surface-soft);

    border: 1px solid var(--border);

    border-radius: 14px;

    color: var(--text);

    transition: 0.2s ease;
}

.quick-actions button:hover {
    background: #ffffff;

    border-color: var(--border-dark);

    transform: translateY(-2px);

    box-shadow: var(--shadow);
}

.quick-action-icon {
    width: 36px;
    height: 36px;

    flex: 0 0 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--primary);

    border-radius: 10px;

    font-size: 13px;
    font-weight: 800;
}

.quick-actions button > span:nth-child(2) {
    flex: 1;

    min-width: 0;
}

.quick-actions button strong {
    display: block;

    font-size: 12px;
    font-weight: 700;
}

.quick-actions button small {
    display: block;

    margin-top: 4px;

    color: var(--muted);

    font-size: 10px;

    line-height: 1.4;
}

.quick-arrow {
    color: #94a3b8;

    font-size: 18px;
}


/* =========================================================
   SECTION HEADER
   ========================================================= */

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 20px;
}

.section-header h2 {
    margin-top: 5px;

    font-size: 24px;
    font-weight: 800;

    letter-spacing: -0.035em;
}

.section-header p {
    margin-top: 5px;

    color: var(--muted);

    font-size: 12px;
}

.section-actions {
    display: flex;
    align-items: center;

    gap: 8px;

    flex-shrink: 0;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 40px;

    padding: 0 16px;

    border: 0;

    border-radius: 10px;

    background: var(--primary);

    color: var(--text);

    font-size: 12px;
    font-weight: 700;

    transition: 0.2s ease;
}

.primary-button:hover {
    background: var(--primary-hover);

    transform: translateY(-1px);
}

.primary-button.small {
    min-height: 38px;

    padding: 0 14px;
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 40px;

    padding: 0 15px;

    border: 1px solid var(--border);

    border-radius: 10px;

    background: #ffffff;

    color: var(--text);

    font-size: 12px;
    font-weight: 600;

    transition: 0.2s ease;
}

.secondary-button:hover {
    background: #f8fafc;

    border-color: var(--border-dark);
}


/* =========================================================
   PRODUCTS
   ========================================================= */

.products-grid {
    display: flex;
    flex-direction: column;

    gap: 10px;
}

.product-card {
    width: 100%;
    min-height: 126px;

    display: flex;
    align-items: center;

    gap: 18px;

    padding: 10px 14px 10px 10px;

    background: #ffffff;

    border: 1px solid var(--border);

    border-radius: 16px;

    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.035);

    transition: 0.2s ease;
}

.product-card:hover {
    transform: translateY(-1px);

    border-color: var(--border-dark);

    box-shadow: var(--shadow);
}

.product-image {
    width: 104px !important;
    height: 104px !important;

    flex: 0 0 104px;

    display: grid;
    place-items: center;

    overflow: hidden;

    background: #f1f5f9;

    border-radius: 13px !important;

    color: var(--muted);
}

.product-image img {
    width: 100% !important;
    height: 100% !important;

    object-fit: cover;

    display: block;
}

.product-content {
    flex: 1;

    min-width: 0;

    padding: 2px 4px;
}

.product-content h3 {
    margin: 0 0 5px;

    color: var(--text);

    font-size: 16px;
    font-weight: 700;

    letter-spacing: -0.015em;
}

.product-content p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.product-content > strong {
    display: block;

    margin-top: 8px;

    color: var(--text);

    font-size: 16px;
    font-weight: 800;
}

.product-meta {
    margin-top: 5px;

    color: var(--muted);

    font-size: 11px;
}

.product-actions {
    display: flex;

    align-items: center;

    gap: 7px;

    flex-shrink: 0;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
}

.table-button {
    min-height: 34px;

    padding: 0 11px;

    background: #ffffff;

    border: 1px solid var(--border);

    border-radius: 9px;

    color: var(--text);

    font-size: 11px;
    font-weight: 600;
}

.table-button:hover {
    background: #f8fafc;

    border-color: var(--border-dark);
}


/* =========================================================
   COLLECTIONS
   ========================================================= */

.collection-card {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 19px 20px;

    margin-bottom: 10px;

    background: #ffffff;

    border: 1px solid var(--border);

    border-radius: 15px;

    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.035);

    transition: 0.2s ease;
}

.collection-card:hover {
    transform: translateY(-1px);

    box-shadow: var(--shadow);
}

.collection-card h3 {
    font-size: 15px;
    font-weight: 700;
}

.collection-card p {
    margin-top: 4px;

    color: var(--muted);

    font-size: 11px;
}

.collection-card > div:last-child {
    display: flex;
    flex-direction: column;

    align-items: flex-end;
}

.collection-card > div:last-child strong {
    color: var(--text);

    font-size: 20px;
    font-weight: 800;
}

.collection-card > div:last-child span {
    color: var(--muted);

    font-size: 10px;
}


/* =========================================================
   SETTINGS
   ========================================================= */

.settings-panel {
    padding: 0;

    overflow: hidden;
}

.settings-block {
    padding: 26px;

    border-bottom: 1px solid var(--border);
}

.settings-block:last-of-type {
    border-bottom: 0;
}

.settings-block-header {
    margin-bottom: 22px;
}

.settings-block-header h3 {
    font-size: 17px;

    font-weight: 700;

    letter-spacing: -0.02em;
}

.settings-block-header p {
    margin-top: 5px;

    color: var(--muted);

    font-size: 11px;
}


/* =========================================================
   FORM
   ========================================================= */

.form-row {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 16px;
}

.form-row.three-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-group {
    margin-bottom: 17px;
}

.form-group label,
label {
    display: block;

    margin-bottom: 7px;

    color: var(--text);

    font-size: 11px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;

    padding: 11px 13px;

    background: #ffffff;

    border: 1px solid var(--border);

    border-radius: 10px;

    outline: none;

    color: var(--text);

    font-size: 12px;

    transition: 0.2s ease;
}

input::placeholder,
textarea::placeholder {
    color: #94a3b8;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);

    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.10);
}

textarea {
    resize: vertical;

    min-height: 90px;
}

.checkbox-label {
    display: flex;

    align-items: center;

    gap: 8px;

    font-size: 12px;
    font-weight: 600;
}

.checkbox-label input {
    width: auto;

    accent-color: var(--primary);
}

.settings-save {
    display: flex;
    align-items: center;

    gap: 15px;

    padding: 20px 26px;

    background: #fafafa;

    border-top: 1px solid var(--border);
}

.muted {
    color: var(--muted);
}


/* =========================================================
   ANALYTICS
   ========================================================= */

.analytics-grid {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 18px;
}


/* =========================================================
   TABLES
   ========================================================= */

.table-container {
    width: 100%;

    overflow-x: auto;

    background: #ffffff;

    border: 1px solid var(--border);

    border-radius: 15px;

    box-shadow: var(--shadow);
}

table {
    width: 100%;

    border-collapse: collapse;

    white-space: nowrap;
}

th,
td {
    padding: 13px 16px;

    text-align: left;

    border-bottom: 1px solid var(--border);

    font-size: 11px;
}

th {
    background: #f8fafc;

    color: var(--muted);

    font-weight: 700;
}

tr:last-child td {
    border-bottom: 0;
}

.center {
    text-align: center;
}


/* =========================================================
   MODALS
   ========================================================= */

.modal {
    position: fixed;

    inset: 0;

    z-index: 2000;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 20px;
}

.modal.open {
    display: flex;
}

.modal-backdrop {
    position: absolute;

    inset: 0;

    background: rgba(15, 23, 42, 0.55);

    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;

    width: 100%;
    max-width: 560px;

    max-height: 90vh;

    overflow-y: auto;

    background: #ffffff;

    border: 1px solid var(--border);

    border-radius: 20px;

    box-shadow: var(--shadow-lg);

    animation: modalIn 0.2s ease;
}

.product-editor-modal {
    max-width: 980px;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 20px 24px;

    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    margin-top: 5px;

    font-size: 18px;

    font-weight: 700;
}

.modal-close {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;

    background: #f8fafc;

    border-radius: 9px;

    color: var(--muted);

    font-size: 21px;

    line-height: 1;
}

.modal-close:hover {
    background: #f1f5f9;

    color: var(--text);
}

.modal-content form {
    padding: 24px;
}

.modal-actions {
    display: flex;

    align-items: center;
    justify-content: flex-end;

    gap: 9px;

    margin-top: 22px;

    padding-top: 18px;

    border-top: 1px solid var(--border);
}

.modal-cancel {
    min-height: 40px;

    padding: 0 15px;

    border: 1px solid var(--border);

    border-radius: 10px;

    background: #ffffff;

    color: var(--text);

    font-size: 12px;
    font-weight: 600;
}

.modal-cancel:hover {
    background: #f8fafc;
}


/* =========================================================
   PRODUCT EDITOR
   ========================================================= */

.editor-section {
    padding: 18px;

    margin-bottom: 16px;

    background: #ffffff;

    border: 1px solid var(--border);

    border-radius: 14px;
}

.editor-section h4 {
    margin-bottom: 12px;

    font-size: 15px;

    font-weight: 700;

    letter-spacing: -0.015em;
}

.editor-help {
    display: block;

    margin-bottom: 12px;

    color: var(--muted);

    font-size: 10px;

    line-height: 1.6;
}

.option-selector-row {
    display: flex;

    align-items: center;

    gap: 8px;

    margin-bottom: 14px;
}

.option-selector-row select {
    flex: 1;
}

.product-option-block {
    padding: 14px;

    margin-bottom: 10px;

    background: #f8fafc;

    border: 1px solid var(--border);

    border-radius: 12px;
}

.product-option-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    margin-bottom: 9px;
}

.product-option-header strong {
    font-size: 12px;
}

.product-option-values {
    display: flex;

    flex-wrap: wrap;

    gap: 6px;
}

.product-option-chip {
    display: inline-flex;

    align-items: center;

    gap: 5px;

    padding: 5px 9px;

    background: #ffffff;

    border: 1px solid var(--border);

    border-radius: 999px;

    font-size: 10px;
}

.product-option-chip button {
    padding: 0;

    border: 0;

    background: transparent;

    color: var(--danger);

    font-size: 12px;
}

.variant-table-wrap {
    margin-top: 12px;
}

.variant-table-wrap input {
    min-width: 80px;

    padding: 8px 9px;

    border-radius: 8px;
}

.product-image-upload-preview {
    display: flex;

    align-items: center;

    gap: 12px;

    padding: 12px;

    margin-top: 10px;

    background: #f8fafc;

    border: 1px solid var(--border);

    border-radius: 13px;
}

.product-image-upload-preview img {
    width: 90px;
    height: 90px;

    object-fit: cover;

    border-radius: 10px;

    border: 1px solid var(--border);
}

.product-image-upload-preview[hidden] {
    display: none;
}


/* =========================================================
   ERROR
   ========================================================= */

.error {
    color: var(--danger);

    font-size: 12px;
    font-weight: 500;
}

.login-error {
    min-height: 20px;

    margin-top: 10px;
}


/* =========================================================
   LOGIN PAGE
   ========================================================= */

.login-page {
    min-height: 100vh;

    display: flex;
    align-items: stretch;

    background: var(--bg);
}

.login-container {
    width: 100%;
    min-height: 100vh;

    display: grid;

    grid-template-columns: 1fr 1fr;
}


/* =========================================================
   LOGIN LEFT PANEL
   ========================================================= */

.login-brand-panel {
    position: relative;

    min-height: 100vh;

    display: flex;
    flex-direction: column;

    padding: 50px;

    background: var(--dark);

    color: #ffffff;

    overflow: hidden;
}

.login-brand-panel::before {
    content: "";

    position: absolute;

    width: 420px;
    height: 420px;

    top: -150px;
    right: -150px;

    background: rgba(250, 204, 21, 0.12);

    border-radius: 50%;
}

.login-brand-panel::after {
    content: "";

    position: absolute;

    width: 300px;
    height: 300px;

    bottom: -150px;
    left: -100px;

    background: rgba(59, 130, 246, 0.08);

    border-radius: 50%;
}

.login-brand {
    position: relative;
    z-index: 1;

    display: flex;

    align-items: center;

    gap: 12px;
}

.login-logo-wrap {
    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #ffffff;

    border-radius: 13px;

    overflow: hidden;
}

.login-logo {
    width: 100%;
    height: 100%;

    object-fit: contain;
}

.login-brand strong {
    display: block;

    font-size: 21px;

    font-weight: 800;

    letter-spacing: -0.03em;
}

.login-brand span {
    display: block;

    margin-top: 2px;

    color: #94a3b8;

    font-size: 10px;

    font-weight: 500;
}

.login-brand-content {
    position: relative;
    z-index: 1;

    max-width: 530px;

    margin: auto 0;
}

.login-brand-content .eyebrow {
    color: #94a3b8;
}

.login-brand-content h1 {
    margin-top: 16px;

    font-size: clamp(38px, 4vw, 58px);

    line-height: 1.08;

    font-weight: 800;

    letter-spacing: -0.05em;
}

.login-brand-content h1 span {
    color: var(--primary);
}

.login-brand-content p {
    max-width: 470px;

    margin-top: 22px;

    color: #94a3b8;

    font-size: 14px;

    line-height: 1.8;
}

.login-brand-footer {
    position: relative;
    z-index: 1;

    display: flex;

    align-items: center;
    justify-content: space-between;

    color: #64748b;

    font-size: 10px;
}


/* =========================================================
   LOGIN RIGHT PANEL
   ========================================================= */

.login-form-panel {
    min-height: 100vh;

    display: flex;
    flex-direction: column;

    justify-content: center;

    padding: 50px;

    background: #ffffff;
}

.login-form-wrapper {
    width: 100%;
    max-width: 430px;

    margin: 0 auto;
}

.login-heading {
    margin-bottom: 30px;
}

.login-heading .section-label {
    color: #94a3b8;
}

.login-heading h2 {
    margin-top: 9px;

    font-size: 32px;

    line-height: 1.15;

    font-weight: 800;

    letter-spacing: -0.04em;
}

.login-heading p {
    margin-top: 8px;

    color: var(--muted);

    font-size: 13px;
}

.login-field {
    margin-bottom: 19px;
}

.login-field label {
    margin-bottom: 8px;

    font-size: 12px;
}

.login-field input {
    min-height: 48px;

    padding: 0 14px;

    background: #f8fafc;

    border-radius: 11px;

    font-size: 13px;
}

.login-field input:focus {
    background: #ffffff;
}

.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.login-button {
    width: 100%;

    min-height: 50px;

    display: flex;

    align-items: center;
    justify-content: space-between;

    padding: 0 18px;

    margin-top: 7px;

    border: 0;

    border-radius: 11px;

    background: var(--primary);

    color: var(--text);

    font-size: 13px;
    font-weight: 700;

    transition: 0.2s ease;
}

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

    transform: translateY(-1px);
}

.login-button span:last-child {
    font-size: 19px;
}

.login-security {
    display: flex;

    align-items: center;

    gap: 8px;

    margin-top: 24px;

    padding: 11px 13px;

    background: #f8fafc;

    border: 1px solid var(--border);

    border-radius: 10px;

    color: var(--muted);

    font-size: 10px;
}

.security-icon {
    width: 19px;
    height: 19px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 19px;

    background: #dcfce7;

    color: #15803d;

    border-radius: 50%;

    font-size: 10px;
    font-weight: 800;
}

.mobile-login-brand {
    display: none;
}

.login-footer {
    width: 100%;

    max-width: 430px;

    margin: 30px auto 0;

    display: flex;

    justify-content: space-between;

    color: #94a3b8;

    font-size: 9px;
}


/* =========================================================
   RESPONSIVE NAVBAR
   ========================================================= */

@media screen and (max-width: 1100px) {

    .navbar-inner {
        padding: 0 24px;

        gap: 16px;
    }

    .navbar-nav {
        gap: 1px;
    }

    .nav-link {
        padding: 0 10px;

        font-size: 12px;
    }

    .status {
        display: none;
    }

    .main {
        padding-left: 24px;
        padding-right: 24px;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   TABLET
   ========================================================= */

@media screen and (max-width: 850px) {

    :root {
        --navbar-height: 70px;
    }

    .navbar-inner {
        padding: 0 16px;
    }

    .brand-text span {
        display: none;
    }

    .navbar-nav {
        overflow-x: auto;

        scrollbar-width: none;
    }

    .navbar-nav::-webkit-scrollbar {
        display: none;
    }

    .nav-link {
        flex-shrink: 0;

        padding: 0 11px;

        font-size: 11px;
    }

    .logout-button {
        padding: 8px 10px;

        font-size: 10px;
    }

    .main {
        padding: 30px 20px 60px;
    }

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

    .grid-two,
    .analytics-grid {
        grid-template-columns: 1fr;
    }

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

    .login-container {
        grid-template-columns: 1fr;
    }

    .login-brand-panel {
        display: none;
    }

    .login-form-panel {
        padding: 30px;
    }

    .mobile-login-brand {
        display: flex;

        align-items: center;

        gap: 11px;

        margin-bottom: 55px;
    }

    .mobile-login-brand strong {
        display: block;

        font-size: 20px;

        font-weight: 800;
    }

    .mobile-login-brand span {
        display: block;

        margin-top: 2px;

        color: var(--muted);

        font-size: 10px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media screen and (max-width: 600px) {

    :root {
        --navbar-height: auto;
    }

    .navbar {
        position: sticky;
    }

    .navbar-inner {
        min-height: 68px;

        padding: 10px 12px;

        flex-wrap: wrap;

        gap: 8px;
    }

    .navbar-brand {
        margin-right: auto;
    }

    .navbar-nav {
        order: 3;

        width: 100%;

        padding-bottom: 2px;
    }

    .navbar-right {
        gap: 5px;
    }

    .logout-button {
        min-height: 34px;
    }

    .main {
        padding: 25px 13px 50px;
    }

    .page-header {
        margin-bottom: 23px;
    }

    .page-header h1 {
        font-size: 28px;
    }

    .metrics {
        grid-template-columns: 1fr;

        gap: 10px;
    }

    .metric-card {
        min-height: 125px;

        padding: 18px;
    }

    .metric-card strong {
        font-size: 28px;
    }

    .section-header {
        align-items: flex-start;

        flex-direction: column;

        gap: 14px;
    }

    .section-actions {
        width: 100%;
    }

    .section-actions button {
        flex: 1;
    }

    .collection-card {
        align-items: flex-start;
    }

    .product-card {
        align-items: flex-start;

        gap: 12px;
    }

    .product-image {
        width: 82px !important;
        height: 82px !important;

        flex-basis: 82px;
    }

    .product-content h3 {
        font-size: 14px;
    }

    .product-content p {
        font-size: 10px;
    }

    .product-actions {
        flex-wrap: wrap;
    }

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

    .settings-block {
        padding: 18px;
    }

    .settings-save {
        align-items: flex-start;

        flex-direction: column;

        padding: 18px;
    }

    .settings-save .primary-button {
        width: 100%;
    }

    .modal {
        padding: 10px;
    }

    .modal-content {
        max-height: 94vh;

        border-radius: 17px;
    }

    .modal-content form {
        padding: 17px;
    }

    .editor-section {
        padding: 14px;
    }

    .modal-actions {
        flex-direction: column-reverse;

        align-items: stretch;
    }

    .modal-actions button {
        width: 100%;
    }

    .login-form-panel {
        padding: 24px 18px;
    }

    .mobile-login-brand {
        margin-bottom: 45px;
    }

    .login-heading h2 {
        font-size: 28px;
    }

    .login-footer {
        flex-direction: column;

        gap: 5px;
    }

}


/* =========================================================
   VERY SMALL DEVICES
   ========================================================= */

@media screen and (max-width: 400px) {

    .brand-logo-wrap {
        width: 38px;
        height: 38px;

        flex-basis: 38px;
    }

    .brand-text strong {
        font-size: 16px;
    }

    .navbar-right .logout-button {
        font-size: 9px;

        padding: 7px 8px;
    }

    .nav-link {
        padding: 0 9px;

        font-size: 10px;
    }

    .main {
        padding-left: 10px;
        padding-right: 10px;
    }

}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(59, 130, 246, 0.25);

    outline-offset: 2px;
}

/* =========================================================
   MULTI-PAGE DASHBOARD EXTENSIONS
   Existing Meridin visual system is intentionally preserved.
   ========================================================= */

body {
    overflow-x: hidden;
}

.page-main {
    min-height: calc(100vh - var(--navbar-height));
}

.page-header-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.page-header-row .page-header {
    margin-bottom: 0;
}

.overview-extra-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
    gap: 18px;
    margin-top: 18px;
}

.activity-list {
    display: flex;
    flex-direction: column;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    border-bottom: 0;
}

.activity-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    margin-top: 5px;
    border-radius: 50%;
    background: var(--primary);
}

.activity-item strong {
    display: block;
    font-size: 12px;
    font-weight: 700;
}

.activity-item span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.status-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.status-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}

.status-item:last-child {
    border-bottom: 0;
}

.status-item > div {
    display: flex;
    align-items: center;
    gap: 9px;
}

.status-check {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #dcfce7;
    color: #15803d;
    font-size: 10px;
    font-weight: 800;
}

.status-item small {
    color: var(--muted);
    font-size: 10px;
}

.page-tabs {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px;
    margin-bottom: 22px;
    width: fit-content;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.page-tabs a {
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
}

.page-tabs a.active,
.page-tabs a:hover {
    background: var(--primary);
    color: var(--text);
}

.analytics-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.analytics-summary-card {
    padding: 19px 21px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.analytics-summary-card span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.analytics-summary-card strong {
    display: block;
    margin-top: 8px;
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -.04em;
}

.analytics-summary-card small {
    display: block;
    margin-top: 5px;
    color: #94a3b8;
    font-size: 10px;
}

.chart-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr);
    gap: 18px;
}

.chart-panel {
    min-height: 340px;
}

.chart-wrap {
    position: relative;
    width: 100%;
    height: 265px;
}

.chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

.chart-panel-wide {
    grid-column: 1 / -1;
}

.analytics-table {
    margin-top: 18px;
}

.analytics-list {
    display: flex;
    flex-direction: column;
}

.analytics-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.analytics-list > div:last-child {
    border-bottom: 0;
}

.analytics-list span {
    color: var(--text);
    font-size: 11px;
    font-weight: 600;
}

.analytics-list strong {
    color: var(--text);
    font-size: 12px;
}

.empty-state {
    padding: 45px 20px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
}

.mobile-menu-button {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
}

.mobile-menu {
    display: none;
}

@media (max-width: 1100px) {
    .navbar-inner {
        padding: 0 24px;
        gap: 18px;
    }

    .navbar-nav {
        gap: 0;
    }

    .nav-link {
        padding: 0 10px;
    }

    .overview-extra-grid,
    .chart-grid {
        grid-template-columns: 1fr;
    }

    .chart-panel-wide {
        grid-column: auto;
    }
}

@media (max-width: 900px) {
    :root {
        --navbar-height: 68px;
    }

    .navbar-inner {
        padding: 0 18px;
    }

    .navbar-nav {
        display: none;
    }

    .navbar-right .status {
        display: none;
    }

    .mobile-menu-button {
        display: inline-flex;
    }

    .mobile-menu {
        position: fixed;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        z-index: 999;
        padding: 10px 16px 16px;
        background: #fff;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
    }

    .mobile-menu.open {
        display: flex;
        flex-direction: column;
    }

    .mobile-menu a {
        padding: 12px;
        border-radius: 10px;
        color: var(--muted);
        text-decoration: none;
        font-size: 12px;
        font-weight: 600;
    }

    .mobile-menu a.active,
    .mobile-menu a:hover {
        background: var(--primary);
        color: var(--text);
    }

    .main {
        padding: 28px 24px 60px;
    }
}

@media (max-width: 650px) {
    .main {
        padding: 22px 14px 45px;
    }

    .page-header-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .analytics-summary {
        grid-template-columns: 1fr;
    }

    .page-tabs {
        width: 100%;
        overflow-x: auto;
    }

    .page-tabs a {
        white-space: nowrap;
    }

    .chart-panel {
        min-height: 300px;
    }

    .chart-wrap {
        height: 225px;
    }

    .navbar-brand .brand-text span {
        display: none;
    }

    .navbar-right .logout-button {
        padding: 8px 10px;
        font-size: 11px;
    }
}

.quick-actions .quick-action-link {
    min-height: 92px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    text-align: left;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    text-decoration: none;
    transition: .2s ease;
}
.quick-actions .quick-action-link:hover {
    background: #fff;
    border-color: var(--border-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.quick-actions .quick-action-link > span:nth-child(2) {
    flex: 1;
    min-width: 0;
}

/* =========================================================
   FINAL SPACING & QUICK-ACTION POLISH
   Keep the existing Meridin design unchanged.
   ========================================================= */

/* Bring page titles closer to the horizontal navbar. */
.main {
    padding-top: 18px;
}

/* Keep page headers visually close to the navbar without crowding. */
.page-header {
    margin-bottom: 26px;
}

/* Give the three Overview workflow cards a clean internal structure. */
.quick-actions .quick-action-link {
    min-height: 104px;
    padding: 16px 17px;
    gap: 14px;
}

.quick-actions .quick-action-link > span:nth-child(2) {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    min-width: 0;
}

.quick-actions .quick-action-link strong {
    display: block;
    margin: 0;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 700;
}

.quick-actions .quick-action-link small {
    display: block;
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.quick-actions .quick-action-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 11px;
}

.quick-actions .quick-arrow {
    flex: 0 0 auto;
    margin-left: auto;
}

@media screen and (max-width: 768px) {
    .main {
        padding-top: 16px;
    }

    .page-header {
        margin-bottom: 22px;
    }

    .quick-actions .quick-action-link {
        min-height: 92px;
    }
}
