/* ============================================================
   Supplier Portal — shared mockup stylesheet
   Replicates the DIY v2 design system (main-diy.css tokens)
   ============================================================ */

:root {
    --primary-color: #2a7fba;
    --primary-gradient: linear-gradient(180deg, #3389c5 0%, #2a7fba 100%);
    --primary-hover: #226493;
    --bg-sidebar: #f6f7f9;
    --bg-light: #ffffff;
    --bg-hover: rgba(0, 0, 0, 0.03);
    --bg-subtle: #f8f9fa;
    --bg-lighter: #f9fafb;
    --bg-lightest: #f3f4f6;
    --bg-accent: #e9eff5;
    --text-dark: #333333;
    --text-muted: #666666;
    --text-light: #8392ab;
    --text-lighter: #9ca3af;
    --text-secondary: #4b5563;
    --text-quaternary: #6b7280;
    --border-color: #e5e7eb;
    --border-light: #dfe5ee;
    --success-bg: #ecfdf5;
    --success-color: #059669;
    --success-dot: #10b981;
    --warning-bg: #fff7ed;
    --warning-color: #d97706;
    --warning-dot: #f59e0b;
    --danger-bg: #fef2f2;
    --danger-color: #d9534f;
    --danger-hover: #c9302c;
    --info-bg: #eff6ff;
    --info-color: #2563eb;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --sidebar-width: 260px;
    --border-radius-sm: 6px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    margin: 0;
}

/* --- Layout --- */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 100;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.sidebar-logo {
    padding: 1.5rem 1rem 1rem;
    text-align: center;
}

.logo-text-top {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 400;
    letter-spacing: 0.35rem;
    color: #1a1a1a;
    line-height: 1.1;
}

.logo-text-bottom {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 300;
    letter-spacing: 0.45rem;
    color: #444;
    margin-top: 0.2rem;
}

.sidebar-supplier-badge {
    margin: 0.75rem 1.25rem 0;
    padding: 0.65rem 0.85rem;
    background: var(--bg-accent);
    border-radius: var(--border-radius-md);
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.sidebar-supplier-badge i { color: var(--primary-color); font-size: 1.1rem; }
.sidebar-supplier-badge .name { font-weight: 600; color: var(--text-dark); display: block; line-height: 1.2; }
.sidebar-supplier-badge .cat { font-size: 0.72rem; color: var(--text-quaternary); }

.sidebar-nav {
    flex-grow: 1;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-link-custom {
    display: flex;
    align-items: center;
    padding: 0.85rem 1rem;
    color: #555;
    text-decoration: none;
    font-weight: 400;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    gap: 1rem;
    border-radius: var(--border-radius-md);
    white-space: nowrap;
}

.nav-link-custom i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    color: var(--text-muted);
}

.nav-link-custom:hover {
    background-color: var(--bg-hover);
    color: var(--primary-color);
}

.nav-link-custom.active {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 12px rgba(42, 127, 186, 0.3);
}

.nav-link-custom.active i { color: #fff; }

.sidebar-footer {
    padding: 1rem 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* --- Main content / header --- */
.main-content {
    flex-grow: 1;
    min-width: 0;
    background: var(--bg-light);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-light);
    position: sticky;
    top: 0;
    z-index: 50;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-header h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.15rem; }
.page-header p { color: var(--text-muted); margin: 0; font-size: 0.9rem; }

.header-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.page-body { padding: 2rem; }

/* --- Cards --- */
.dd-card {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--card-shadow);
    padding: 1.5rem;
}

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

/* KPI cards */
.kpi-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.kpi-card:hover { box-shadow: var(--card-shadow-hover); transform: translateY(-2px); }

.kpi-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.kpi-icon.blue   { background: var(--info-bg);    color: var(--primary-color); }
.kpi-icon.green  { background: var(--success-bg); color: var(--success-color); }
.kpi-icon.orange { background: var(--warning-bg); color: var(--warning-color); }
.kpi-icon.red    { background: var(--danger-bg);  color: var(--danger-color); }

.kpi-value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.kpi-label { font-size: 0.82rem; color: var(--text-quaternary); }

/* --- Status chips --- */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.chip::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.chip-success { background: var(--success-bg); color: var(--success-color); }
.chip-warning { background: var(--warning-bg); color: var(--warning-color); }
.chip-danger  { background: var(--danger-bg);  color: var(--danger-color); }
.chip-info    { background: var(--info-bg);    color: var(--info-color); }
.chip-muted   { background: var(--bg-lightest); color: var(--text-quaternary); }

/* --- Tables --- */
.dd-table { width: 100%; border-collapse: collapse; }

.dd-table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-quaternary);
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    background: var(--bg-lighter);
    white-space: nowrap;
}

.dd-table tbody td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--bg-lightest);
    font-size: 0.88rem;
    vertical-align: middle;
}

.dd-table tbody tr:hover { background: var(--bg-lighter); }
.dd-table tbody tr.low-stock { background: var(--warning-bg); }
.dd-table tbody tr.out-stock { background: var(--danger-bg); }

/* --- Buttons --- */
.btn-diy {
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: var(--border-radius-md);
    padding: 0.55rem 1.2rem;
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.btn-diy:hover { background: var(--primary-hover); color: #fff; box-shadow: 0 4px 12px rgba(42, 127, 186, 0.3); }

.btn-diy-outline {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius-md);
    padding: 0.5rem 1.1rem;
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

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

.btn-stock-in {
    background: var(--success-color);
    color: #fff;
    border: none;
    border-radius: var(--border-radius-md);
    padding: 0.55rem 1.2rem;
    font-weight: 600;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.btn-stock-in:hover { background: #047857; color: #fff; }

.btn-stock-out {
    background: var(--danger-color);
    color: #fff;
    border: none;
    border-radius: var(--border-radius-md);
    padding: 0.55rem 1.2rem;
    font-weight: 600;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.btn-stock-out:hover { background: var(--danger-hover); color: #fff; }

/* --- Filter chips row --- */
.filter-chips { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.filter-chip {
    padding: 0.4rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-light);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip:hover { border-color: var(--primary-color); color: var(--primary-color); }

.filter-chip.active {
    background: var(--primary-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(42, 127, 186, 0.3);
}

/* --- Forms --- */
.form-label { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); }

.form-control, .form-select {
    border-radius: var(--border-radius-md);
    border-color: var(--border-light);
    font-size: 0.9rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(42, 127, 186, 0.15);
}

/* --- Search box --- */
.search-box { position: relative; min-width: 240px; }
.search-box i { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); color: var(--text-lighter); }
.search-box input { padding-left: 2.4rem; }

/* --- Modal tweaks --- */
.modal-content { border-radius: var(--border-radius-lg); border: none; }
.modal-header { border-bottom: 1px solid var(--border-color); }
.modal-title { font-weight: 700; font-size: 1.1rem; }

/* --- Login page --- */
.login-wrapper {
    min-height: 100vh;
    display: flex;
}

.login-brand {
    flex: 1;
    background: var(--primary-gradient);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
    position: relative;
    overflow: hidden;
}

.login-brand::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?auto=format&fit=crop&w=900&q=80');
    background-size: cover;
    background-position: center;
    opacity: 0.18;
    mix-blend-mode: luminosity;
    pointer-events: none;
}

.login-brand h2 { font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 2.2rem; position: relative; }
.login-brand p { opacity: 0.9; max-width: 420px; position: relative; }

.login-brand .feature-list { position: relative; margin-top: 2rem; display: flex; flex-direction: column; gap: 0.9rem; }
.login-brand .feature-list div { display: flex; align-items: center; gap: 0.7rem; font-size: 0.95rem; }
.login-brand .feature-list i { font-size: 1.2rem; }

.login-panel {
    width: 480px;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    background: var(--bg-light);
}

.login-card { width: 100%; max-width: 360px; }

@media (max-width: 900px) {
    .login-brand { display: none; }
    .login-panel { width: 100%; }
}

/* --- Misc --- */
.text-quaternary { color: var(--text-quaternary); }
.fw-600 { font-weight: 600; }
.mono { font-variant-numeric: tabular-nums; }

.empty-note {
    text-align: center;
    color: var(--text-lighter);
    padding: 2.5rem 1rem;
    font-size: 0.9rem;
}

.qty-in  { color: var(--success-color); font-weight: 700; }
.qty-out { color: var(--danger-color);  font-weight: 700; }

.progress-thin { height: 6px; border-radius: 999px; background: var(--bg-lightest); }
.progress-thin .progress-bar { border-radius: 999px; }

/* --- Studio F Enhancements --- */
.studio-f-badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: linear-gradient(135deg, #2a7fba 0%, #1a5a8a 100%);
    color: white;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(42, 127, 186, 0.3);
}

.inventory-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.75rem;
    background: linear-gradient(135deg, #0f766e 0%, #0d5a52 100%);
    color: white;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.booking-status-good {
    background: var(--success-bg);
    color: var(--success-color);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.booking-status-warning {
    background: var(--warning-bg);
    color: var(--warning-color);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.booking-status-critical {
    background: var(--danger-bg);
    color: var(--danger-color);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.location-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: var(--bg-lightest);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.location-tag i {
    font-size: 1rem;
}

/* Warehouse locations with icons */
.warehouse-location-cold { border-left: 4px solid #3498db; }
.warehouse-location-shelf { border-left: 4px solid #16a34a; }
.warehouse-location-equipment { border-left: 4px solid #f59e0b; }
.warehouse-location-textile { border-left: 4px solid #a855f7; }
.warehouse-location-furniture { border-left: 4px solid #ec4899; }

/* Studio F Header Enhancement */
.studio-f-header {
    background: linear-gradient(135deg, #2a7fba 0%, #1a5a8a 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(42, 127, 186, 0.2);
}

.studio-f-header h5 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
}

.studio-f-header p {
    margin: 0.5rem 0 0 0;
    opacity: 0.95;
    font-size: 0.9rem;
}

/* Inventory number styling */
.inv-number {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 0.85rem;
}

/* Booking calendar enhancement */
.booking-date-header {
    font-weight: 600;
    padding: 0.5rem 0;
    border-bottom: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.booking-available {
    background: var(--success-bg);
    color: var(--success-color);
}

.booking-limited {
    background: var(--warning-bg);
    color: var(--warning-color);
}

.booking-critical {
    background: var(--danger-bg);
    color: var(--danger-color);
}

@media (max-width: 992px) {
    .sidebar { display: none; }
    .page-body { padding: 1.25rem; }
    .page-header { padding: 1rem 1.25rem; }
    .studio-f-header { padding: 1rem 1.25rem; margin-bottom: 1rem; }
}
