/* ==========================================================================
   THE UNIQUE DRYCLEAN & LAUNDRY SERVICE - Comprehensive Stylesheet
   Matching Image 2 (Admin Panel, Customer App, Invoice, Live Tracking)
   and Image 5 (Dryclean & Laundry Rate List)
   ========================================================================== */

:root {
    --primary: #1e40af; /* Deep Royal Navy Blue from Logo */
    --primary-dark: #1e3a8a;
    --primary-light: #eff6ff;
    --secondary: #2563eb;
    --purple: #1e40af;
    --purple-dark: #1e3a8a;
    --purple-light: #eff6ff;
    --accent: #059669; /* Fresh Emerald Green from Logo UniQue icon */
    --success: #059669;
    --success-dark: #047857;
    --success-light: #ecfdf5;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --dark: #0f172a;
    --slate: #334155;
    --muted: #64748b;
    --border: #e2e8f0;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

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

body {
    background-color: var(--bg-main);
    color: var(--slate);
    line-height: 1.5;
    overflow-x: hidden;
}

/* ==================== LOGIN SCREEN ==================== */
.login-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 10% 20%, #4338ca 0%, #1e1b4b 90%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
}

.login-card {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: fadeInScale 0.35s ease-out;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.login-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    padding: 30px 20px;
    text-align: center;
}

.login-logo-box {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    margin-bottom: 12px;
}

.login-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
}

.login-header p {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-top: 4px;
}

.login-body {
    padding: 30px 25px;
}

.login-error-text {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 12px;
    text-align: center;
}

/* ==================== APP LAYOUT ==================== */
.app-layout {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    position: relative;
}

/* Mobile Sidebar Backdrop */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 95;
    transition: opacity 0.25s ease;
}

.sidebar-backdrop.active {
    display: block;
}

/* ==================== SIDEBAR ==================== */
.app-sidebar {
    width: 260px;
    min-width: 260px;
    background: #ffffff;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: all 0.3s ease;
}

.app-sidebar.collapsed {
    margin-left: -260px;
}

.sidebar-brand {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border);
    background: #ffffff;
    min-height: 70px;
}

.sidebar-brand-logo {
    max-height: 48px;
    max-width: 170px;
    object-fit: contain;
}

.brand-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.brand-text h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.brand-text span {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 1px;
}

.sidebar-menu {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-menu::-webkit-scrollbar {
    width: 5px;
}
.sidebar-menu::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 4px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: #64748b;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.menu-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    color: #94a3b8;
    transition: color 0.2s;
}

.menu-item:hover {
    background: #f1f5f9;
    color: var(--dark);
}

.menu-item:hover i {
    color: var(--primary);
}

.menu-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.menu-item.active i {
    color: var(--primary);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.btn-logout {
    background: #fee2e2;
    color: #ef4444;
    border: none;
}
.btn-logout:hover {
    background: #fecaca;
    color: #dc2626;
}

/* ==================== MAIN CONTENT ==================== */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-main);
    min-width: 0;
    width: 100%;
}

/* Top Header */
.app-header {
    height: 70px;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 0 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    z-index: 90;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.current-page-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
}

.view-switcher {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    gap: 2px;
}

.switcher-btn {
    border: none;
    background: transparent;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.switcher-btn.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.date-badge {
    background: #f8fafc;
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--slate);
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 38px;
    height: 38px;
    background: #ecfdf5;
    color: #059669;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    border: 2px solid #a7f3d0;
    box-shadow: 0 2px 5px rgba(5, 150, 105, 0.15);
    cursor: pointer;
    transition: transform 0.2s ease;
}
.avatar:hover {
    transform: scale(1.06);
}

.profile-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
}

.user-role {
    font-size: 0.72rem;
    color: var(--muted);
}

/* App Body Scrollable Area */
.app-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* View Container */
.content-view {
    display: none;
    animation: fadeIn 0.25s ease-in-out;
}

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

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

/* ==================== COMMON FORM & BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    text-decoration: none;
}

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

.btn-purple {
    background: var(--purple);
    color: #ffffff;
}
.btn-purple:hover {
    background: var(--purple-dark);
}

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

.btn-secondary {
    background: #64748b;
    color: #ffffff;
}
.btn-secondary:hover {
    background: #475569;
}

.btn-outline {
    background: #ffffff;
    border-color: var(--border);
    color: var(--slate);
}
.btn-outline:hover {
    background: #f1f5f9;
}

.btn-wa {
    background: #25D366;
    color: #ffffff;
}
.btn-wa:hover {
    background: #20bd5a;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
}

.btn-xs {
    padding: 3px 8px;
    font-size: 0.72rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--slate);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-icon:hover {
    background: #f1f5f9;
    color: var(--primary);
}

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

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--slate);
    margin-bottom: 5px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -6px;
}

.col-12 { width: 100%; padding: 0 6px; }
.col-6 { width: 50%; padding: 0 6px; }
.col-4 { width: 33.333%; padding: 0 6px; }

input[type="text"],
input[type="number"],
input[type="password"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    color: var(--dark);
    background: #ffffff;
    transition: border-color 0.2s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-light { background: #f1f5f9; color: var(--slate); }

/* ==================== VIEW 1: DASHBOARD ==================== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

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

.stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 12px;
}

.stat-blue .stat-icon { background: #eff6ff; color: #2563eb; }
.stat-orange .stat-icon { background: #fff7ed; color: #ea580c; }
.stat-green .stat-icon { background: #f0fdf4; color: #16a34a; }
.stat-purple .stat-icon { background: #faf5ff; color: #9333ea; }
.stat-teal .stat-icon { background: #f0fdfa; color: #0d9488; }
.stat-pink .stat-icon { background: #fff1f2; color: #e11d48; }

.stat-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: capitalize;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark);
    margin: 4px 0 8px 0;
    letter-spacing: -0.5px;
}

.stat-link {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.stat-link:hover { text-decoration: underline; }

.stat-subtext {
    font-size: 0.72rem;
    font-weight: 600;
}
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

/* Dashboard Main Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.dash-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 20px;
}

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

.dash-card-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.data-table th {
    background: #f8fafc;
    color: var(--muted);
    font-weight: 600;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    color: var(--slate);
}

.data-table tr:hover {
    background: #f8fafc;
}

/* Status Badges Matching Image 2 */
.status-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: capitalize;
}

.status-received { background: #dbeafe; color: #1e40af; }
.status-pickup { background: #ffedd5; color: #9a3412; }
.status-washing { background: #ede9fe; color: #5b21b6; }
.status-ironing { background: #cffafe; color: #155e75; }
.status-ready { background: #ccfbf1; color: #115e59; }
.status-delivered { background: #dcfce7; color: #166534; }
.status-pending { background: #fef3c7; color: #92400e; }

/* Charts & Donuts */
.chart-wrapper {
    margin-bottom: 20px;
    background: #ffffff;
    border-radius: var(--radius-sm);
    padding: 10px;
}

.chart-svg {
    width: 100%;
    height: auto;
}

.donuts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.donut-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
}

.donut-card h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
}

.donut-flex {
    display: flex;
    align-items: center;
    gap: 14px;
}

.donut-chart-container {
    width: 75px;
    height: 75px;
    flex-shrink: 0;
}

.donut-center-text {
    font-size: 8px;
    font-weight: 800;
    fill: var(--dark);
}

.donut-legend {
    font-size: 0.72rem;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}

.dot-blue { background: #3b82f6; }
.dot-orange { background: #f59e0b; }
.dot-purple { background: #8b5cf6; }
.dot-teal { background: #14b8a6; }
.dot-green { background: #10b981; }
.dot-emerald { background: #059669; }
.dot-rose { background: #e11d48; }

/* Quick Actions Bar */
.quick-actions-bar {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px 20px;
}

.quick-actions-bar h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 14px;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.quick-btn {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--slate);
    transition: all 0.2s;
}

.quick-btn i {
    font-size: 22px;
}

.quick-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.text-purple { color: #8b5cf6; }
.text-warning { color: #f59e0b; }
.text-info { color: #0284c7; }

/* ==================== VIEW 2: INVOICES (STUDIO & AUTO-GENERATED) ==================== */
.invoice-studio-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.invoice-controls {
    width: 380px;
    min-width: 380px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.invoice-controls::-webkit-scrollbar {
    width: 5px;
}
.invoice-controls::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.controls-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
    margin-bottom: 14px;
}

.controls-card-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
}

.accordion-group {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    overflow: hidden;
}

.accordion-title {
    background: #f8fafc;
    padding: 10px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--slate);
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.accordion-title:hover {
    background: #f1f5f9;
}

.accordion-content {
    padding: 12px;
}

.inline-items-list {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.inline-item-row {
    display: grid;
    grid-template-columns: 1.3fr 1fr 82px 68px 24px;
    gap: 6px;
    align-items: center;
    background: #f8fafc;
    padding: 7px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    transition: all 0.15s ease;
}

.inline-item-row:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.inline-item-row input, .inline-item-row select {
    padding: 5px 6px;
    font-size: 0.8rem;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
}

.qty-stepper-wrap {
    display: flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    background: #ffffff;
    overflow: hidden;
    height: 30px;
}

.btn-qty-step {
    background: #f1f5f9;
    border: none;
    color: #1e293b;
    font-size: 0.95rem;
    font-weight: 700;
    width: 24px;
    height: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    user-select: none;
}

.btn-qty-step:hover {
    background: #e2e8f0;
    color: var(--primary);
}

.qty-stepper-wrap input {
    border: none !important;
    text-align: center;
    font-weight: 700;
    width: 34px !important;
    padding: 2px !important;
    font-size: 0.82rem;
    background: transparent;
}

.rate-input-wrap {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 0 4px;
    height: 30px;
}

.rate-prefix {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 700;
    margin-right: 2px;
}

.rate-input-wrap input {
    border: none !important;
    padding: 2px !important;
    width: 100% !important;
    font-size: 0.82rem;
    font-weight: 700;
    color: #1e3a8a;
}

.btn-remove-item {
    background: transparent;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-weight: bold;
    font-size: 18px;
    line-height: 1;
    transition: transform 0.15s;
}

.btn-remove-item:hover {
    transform: scale(1.2);
}

.invoice-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

/* ==================== THE INVOICE PAPER PREVIEW (IMAGE 2 SECTION 3) ==================== */
.invoice-preview-container {
    flex: 1;
    display: flex;
    justify-content: center;
    padding-bottom: 40px;
}

.invoice-paper {
    width: 210mm;
    max-width: 100%;
    min-height: 260mm;
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
    padding: 10mm 12mm 14mm 12mm;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    box-sizing: border-box;
}

/* Invoice Header */
.inv-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 12px;
    border-bottom: 2px solid #0f172a;
}

.inv-brand-section {
    display: flex;
    align-items: center;
    gap: 14px;
}

.inv-real-logo {
    max-height: 58px;
    max-width: 145px;
    object-fit: contain;
    border-radius: 4px;
}

.sidebar-brand-logo {
    max-height: 38px;
    max-width: 85px;
    object-fit: contain;
}

.inv-logo-box {
    width: 55px;
    height: 55px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.inv-brand-info .inv-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.5px;
    line-height: 1.1;
}

.inv-brand-info .inv-subtitle {
    font-size: 0.85rem;
    font-weight: 700;
    color: #2563eb;
    letter-spacing: 0.8px;
}

.inv-brand-info .inv-tagline {
    font-size: 0.65rem;
    font-weight: 600;
    color: #64748b;
    display: block;
    margin-top: 2px;
}

.inv-title-section {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.inv-doc-heading {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 1px;
}

.inv-qr-container {
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#invoiceQrCode {
    width: 64px;
    height: 64px;
    padding: 2px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
}
#invoiceQrCode img, #invoiceQrCode canvas {
    width: 100% !important;
    height: 100% !important;
}

.qr-label {
    font-size: 0.6rem;
    color: #64748b;
    margin-top: 2px;
}

/* ⚡ 1-Tap Quick Add Clothes Chips */
.quick-chips-box {
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
}

.quick-chips-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #166534;
    margin-bottom: 7px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.quick-chips-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.btn-cloth-chip {
    background: #ffffff;
    border: 1.5px solid #86efac;
    color: #166534;
    border-radius: 20px;
    padding: 5px 11px;
    font-size: 0.77rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.15s ease;
    user-select: none;
}

.btn-cloth-chip b {
    color: #047857;
    font-weight: 800;
    margin-left: 2px;
}

.btn-cloth-chip:hover {
    background: #16a34a;
    border-color: #16a34a;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.25);
}

.btn-cloth-chip:hover b {
    color: #ffffff;
}

.btn-cloth-chip:active {
    transform: scale(0.96);
}

.cloth-search-box input {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.82rem;
    padding: 7px 10px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.cloth-search-box input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* Gender / Category Filter Pills */
.gender-pill-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.gender-btn {
    flex: 1 1 calc(50% - 6px);
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--slate);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.gender-btn:hover {
    background: #f1f5f9;
    border-color: var(--primary);
}

.gender-btn.active {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #ffffff;
    box-shadow: 0 2px 5px rgba(79, 70, 229, 0.25);
}

/* Bill Action Cards (Generate Bill & Complete Order) */
.invoice-bill-action-cards {
    margin: 16px 0;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 14px;
}

.btn-lg {
    padding: 11px 18px;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.btn-new-order-top {
    background: #10b981 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border-radius: var(--radius-full) !important;
    padding: 6px 14px !important;
}
.btn-new-order-top:hover {
    background: #059669 !important;
}

/* Google Review Box Just Above Notes (Requested by User) */
.google-review-box {
    border: 1.5px dashed #f59e0b;
    background: #fffbeb;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.review-box-left {
    flex: 1;
}

.star-rating-row {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 2px;
}

.yellow-star {
    color: #f59e0b;
    font-size: 20px;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(245, 158, 11, 0.3);
}

.star-rating-text {
    font-size: 0.82rem;
    font-weight: 800;
    color: #92400e;
    margin-left: 6px;
}

.review-prompt {
    font-size: 0.72rem;
    color: #78350f;
    margin: 0;
    line-height: 1.25;
}

.review-qr-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

#googleReviewQrCode {
    width: 58px;
    height: 58px;
    padding: 2px;
    background: #ffffff;
    border: 1px solid #f59e0b;
    border-radius: 4px;
}
#googleReviewQrCode img, #googleReviewQrCode canvas {
    width: 100% !important;
    height: 100% !important;
}

.google-qr-tag {
    font-size: 0.58rem;
    font-weight: 700;
    color: #b45309;
    margin-top: 2px;
}

/* Customer & Meta Details */
.inv-details-row {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #cbd5e1;
    font-size: 0.82rem;
}

.inv-customer-col {
    width: 60%;
}

.inv-meta-col {
    width: 40%;
    text-align: right;
}

.meta-item {
    margin-bottom: 4px;
}

.meta-label {
    color: #475569;
    font-weight: 600;
}

.meta-val {
    color: #0f172a;
}

.highlight-val {
    color: #2563eb;
    font-size: 0.9rem;
}

/* Invoice Table */
.inv-table-wrapper {
    margin-top: 14px;
    margin-bottom: 16px;
}

.inv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.inv-table th {
    background: #1e40af;
    color: #ffffff;
    font-weight: 700;
    padding: 8px 10px;
    text-align: left;
    border: 1px solid #1e40af;
}

.inv-table td {
    padding: 7px 10px;
    border: 1px solid #e2e8f0;
    color: #1e293b;
}

.inv-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.text-right {
    text-align: right !important;
}

.font-bold {
    font-weight: 700;
}

.grand-total-row td {
    background: #f1f5f9;
    font-size: 0.95rem;
    color: #0f172a;
}

.grand-total-val {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1e40af;
}

/* Lower Section: Notes on left, Payment Summary Box on right */
.inv-lower-grid {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 10px;
    flex: 1;
}

.inv-notes-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.amount-words-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-bottom: 12px;
}

.terms-notes-box h4 {
    font-size: 0.8rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.terms-notes-box ul {
    list-style: none;
    padding-left: 0;
    font-size: 0.75rem;
    color: #475569;
}

.terms-notes-box li {
    margin-bottom: 2px;
}

.inv-thankyou {
    margin-top: 14px;
}
.inv-thankyou p {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
}
.inv-thankyou span {
    font-size: 0.72rem;
    color: #64748b;
}

/* Payment Summary Box (Matching Image 2 Section 3!) */
.inv-payment-col {
    width: 260px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.payment-summary-card {
    border: 1.5px solid #059669;
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.04);
}

.payment-card-header {
    background: #059669;
    color: #ffffff;
    padding: 6px 12px;
    text-align: center;
}

.payment-card-header h4 {
    font-size: 0.85rem;
    font-weight: 700;
}

.payment-card-body {
    padding: 10px 14px;
    font-size: 0.8rem;
}

.pay-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.pay-row:last-child {
    margin-bottom: 0;
}

.badge-status-paid {
    background: #dcfce7;
    color: #15803d;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 800;
}

.auth-sign-box {
    text-align: right;
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.signature-display-wrap {
    height: 44px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    margin-bottom: 2px;
}

.handwritten-signature {
    max-height: 42px;
    width: 135px;
    display: block;
}

.sign-line {
    width: 140px;
    border-bottom: 1.5px solid #334155;
    margin-bottom: 4px;
}

.sign-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #475569;
    letter-spacing: 0.5px;
}

/* Single line responsive bottom footer (Strictly in ONE line as requested, never cut off!) */
.single-line-bar {
    background: #0f172a;
    color: #ffffff;
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 9px 14px !important;
    font-size: clamp(6.8px, 1.12vw, 9.2px) !important;
    font-weight: 600;
    border-radius: 6px;
    margin-top: 14px;
    margin-bottom: 0;
    text-align: center;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    line-height: 1.4;
}

.footer-segment {
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    flex-shrink: 1;
}

.footer-divider {
    color: #10b981;
    font-weight: bold;
    display: inline !important;
}

/* Reports Security Lock Box (Image 2 Data Protection) */
.reports-lock-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 40px 24px;
    text-align: center;
    max-width: 550px;
    margin: 40px auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}
.lock-shield-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 16px auto;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}
.reports-lock-box h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 8px;
}
.reports-lock-box p {
    font-size: 0.88rem;
    color: #64748b;
    margin-bottom: 20px;
    line-height: 1.5;
}
.reports-password-input-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    max-width: 400px;
    margin: 0 auto;
}
.reports-password-input-row input {
    flex: 1;
}

/* Floating Mobile Preview Button */
.floating-mobile-preview-btn {
    display: none;
    position: fixed;
    bottom: 22px;
    right: 20px;
    z-index: 99;
    background: #4f46e5;
    color: #ffffff;
    border: none;
    border-radius: 30px;
    padding: 12px 18px;
    font-size: 0.88rem;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
    cursor: pointer;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s, background 0.2s;
}
.floating-mobile-preview-btn:hover {
    background: #4338ca;
    transform: translateY(-2px);
}

/* Mobile Preview Quick Navigation Bar */
.mobile-preview-actions-bar {
    display: none;
    gap: 8px;
    margin-bottom: 12px;
    width: 100%;
}

/* Interactive Stepper Points */
.stepper-progress-bar .step-point {
    cursor: pointer;
    transition: transform 0.2s ease;
}
.stepper-progress-bar .step-point:hover {
    transform: scale(1.08);
}

/* Dashboard Action Select Dropdown */
.action-select-box {
    cursor: pointer;
    font-weight: 600;
    color: #1e40af;
    background: #eff6ff;
    border: 1.5px solid #bfdbfe;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.78rem;
    outline: none;
    transition: border-color 0.2s;
}
.action-select-box:focus {
    border-color: #2563eb;
    background: #ffffff;
}

/* Action Dropdown for Bills */
.action-dropdown {
    position: relative;
    display: inline-block;
}

.action-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: #ffffff;
    min-width: 165px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 0;
    z-index: 100;
    text-align: left;
}

.action-dropdown.open .dropdown-menu {
    display: block;
    animation: fadeIn 0.15s ease;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    color: #334155;
    cursor: pointer;
    transition: background 0.15s;
    width: 100%;
    border: none;
    background: none;
    box-sizing: border-box;
}

.dropdown-item:hover {
    background: #f1f5f9;
}

.dropdown-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 4px 0;
}

.stat-grid.five-cards {
    grid-template-columns: repeat(5, 1fr);
}

.mobile-invoice-toggle-bar {
    display: none;
}

/* ==================== VIEW 3: ORDER TRACKING (IMAGE 2 SECTION 4) ==================== */
.tracking-container {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.tracking-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.tracking-info h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.tracking-info p {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 3px;
}

.stepper-visual-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px 30px;
    margin-bottom: 30px;
}

.stepper-progress-bar {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.stepper-progress-bar::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 4px;
    background: #e2e8f0;
    z-index: 1;
}

.progress-line-fill {
    position: absolute;
    top: 20px;
    left: 40px;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #10b981);
    z-index: 2;
    transition: width 0.4s ease;
}

.step-point {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.point-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 16px;
    transition: all 0.3s;
}

.step-point.active .point-circle {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

.step-point.active.current .point-circle {
    background: #f59e0b;
    border-color: #f59e0b;
    box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.2);
    color: #ffffff;
}

.point-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--slate);
}

/* 5 Live Cards Matching Image 2 Section 4 */
.tracking-cards-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.track-step-card {
    background: #ffffff;
    border-radius: 18px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
}

.track-step-card:hover {
    transform: translateY(-4px);
}

.card-screen-header {
    background: #1e40af;
    color: #ffffff;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    font-weight: 600;
}

.card-inner {
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.track-meta {
    margin-bottom: 12px;
}
.ord-tag {
    font-size: 0.68rem;
    color: var(--muted);
}
.track-meta strong {
    font-size: 0.95rem;
    color: var(--dark);
    display: block;
}
.track-meta small {
    font-size: 0.7rem;
    color: var(--muted);
}

.step-icon-circle {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 12px;
}

.blue-circle { background: #eff6ff; color: #2563eb; border: 2px solid #bfdbfe; }
.green-circle { background: #f0fdf4; color: #16a34a; border: 2px solid #bbf7d0; }
.orange-circle { background: #fff7ed; color: #ea580c; border: 2px solid #fed7aa; }
.purple-circle { background: #faf5ff; color: #9333ea; border: 2px solid #e9d5ff; }
.emerald-circle { background: #ecfdf5; color: #059669; border: 2px solid #a7f3d0; }

.step-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 4px;
}

.step-desc {
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 8px;
    line-height: 1.3;
}

.step-time-tag {
    display: inline-block;
    background: #f1f5f9;
    color: var(--slate);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
}

.active-tag {
    background: #ffedd5;
    color: #c2410c;
    font-weight: 700;
}

.track-step-card.step-active {
    border-color: #f59e0b;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.15);
}

.track-step-card.step-done {
    border-color: #10b981;
}

.tracking-action-bar {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 15px;
}

/* ==================== VIEW 4: ANDROID CUSTOMER APP (IMAGE 2 SECTION 2) ==================== */
.mobile-simulator-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    justify-content: center;
    padding: 20px 0;
}

.simulator-instructions {
    max-width: 450px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.simulator-instructions h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.simulator-instructions p {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 16px;
}

.simulator-feature-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feat-item {
    font-size: 0.85rem;
    color: var(--slate);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

/* Phone Device Frame */
.phone-mockup {
    width: 360px;
    height: 720px;
    background: #0f172a;
    border-radius: 40px;
    padding: 12px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.4);
    position: relative;
    border: 4px solid #334155;
}

.phone-speaker {
    width: 60px;
    height: 5px;
    background: #475569;
    border-radius: 10px;
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #f8fafc;
    border-radius: 32px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.mobile-status-bar {
    height: 28px;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: #ffffff;
    background: #6b21a8;
}

.status-icons {
    display: flex;
    gap: 6px;
    font-size: 10px;
}

.mobile-app-header {
    background: #7e22ce;
    color: #ffffff;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-title-box h4 {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    line-height: 1.1;
}
.mobile-title-box small {
    font-size: 0.65rem;
    letter-spacing: 0.8px;
    opacity: 0.9;
}

.mobile-screen-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.mobile-tab-view {
    display: none;
}
.mobile-tab-view.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

/* App Promo Card */
.app-promo-card {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    border-radius: 16px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.app-promo-card h3 {
    font-size: 1.1rem;
    font-weight: 800;
}
.app-promo-card p {
    font-size: 0.75rem;
    opacity: 0.9;
}

.promo-img i {
    font-size: 40px;
    opacity: 0.9;
}

.app-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.app-section-header h4 {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--dark);
}
.mobile-sublink {
    font-size: 0.78rem;
    font-weight: 700;
    color: #7e22ce;
    text-decoration: none;
}

/* App Services Grid */
.app-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

.app-service-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.app-service-item:hover {
    border-color: #7e22ce;
    transform: scale(1.03);
}

.serv-icon {
    width: 38px;
    height: 38px;
    background: #f5f3ff;
    color: #7e22ce;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.app-service-item span {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--slate);
    text-align: center;
}

/* App Offer Card (Image 2 Section 2) */
.app-offer-card {
    background: #ffffff;
    border: 1px dashed #7e22ce;
    border-radius: 16px;
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge-tag {
    background: #ede9fe;
    color: #7e22ce;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
}

.app-offer-card h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #7e22ce;
    margin-top: 2px;
}

.app-offer-card p {
    font-size: 0.72rem;
    color: var(--muted);
}

.coupon-pill {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.68rem;
    margin-top: 4px;
    display: inline-block;
}

.offer-right i {
    color: #7e22ce;
    opacity: 0.8;
}

/* Book Order Form in App */
.screen-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 14px;
}

.app-form-group {
    margin-bottom: 12px;
}
.app-form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--slate);
    margin-bottom: 4px;
}
.app-input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.82rem;
}

.app-items-cart-list {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px;
    max-height: 160px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.app-cart-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 4px;
}

.counter-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-counter {
    width: 20px;
    height: 20px;
    background: #ede9fe;
    color: #7e22ce;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}

.coupon-input-row {
    display: flex;
    gap: 6px;
}

.app-order-summary-box {
    background: #f1f5f9;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-top: 10px;
}

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

/* My Orders Tab */
.app-order-filters {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.filter-chip {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
}
.filter-chip.active {
    background: #7e22ce;
    color: #ffffff;
    border-color: #7e22ce;
}

.app-orders-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.app-order-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.app-ord-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.app-ord-id {
    font-weight: 800;
    font-size: 0.82rem;
    color: #0f172a;
}

.app-ord-date {
    font-size: 0.7rem;
    color: var(--muted);
}

.app-ord-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 0.78rem;
}

/* Mobile Bottom Nav */
.mobile-bottom-nav {
    height: 52px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.nav-item {
    border: none;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
}

.nav-item.active {
    color: #7e22ce;
}

.plus-item .plus-circle {
    width: 32px;
    height: 32px;
    background: #7e22ce;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin-bottom: 2px;
}

/* ==================== VIEW 5: SERVICES & RATE LIST (IMAGE 5) ==================== */
.services-container {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.services-banner-header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: #ffffff;
    padding: 24px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    text-align: center;
}

.brand-badge {
    background: rgba(255, 255, 255, 0.2);
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.services-banner-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
}

.services-banner-header p {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-top: 4px;
}

.services-grid-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 24px;
}

.rate-card-box {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.rate-box-header {
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
}

.dryclean-header { background: #1e40af; }
.laundry-header { background: #0891b2; }
.addons-header { background: #7c3aed; }
.discounts-header { background: #d97706; }

.rate-box-header h3 {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rate-table-wrapper {
    max-height: 520px;
    overflow-y: auto;
}

.rate-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.rate-table th {
    background: #f8fafc;
    color: var(--muted);
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.rate-table td {
    padding: 8px 14px;
    border-bottom: 1px solid var(--border);
}

.rate-num-circle {
    width: 24px;
    height: 24px;
    background: #1e40af;
    color: #ffffff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 6px;
}

.laundry-rates-list, .addons-list, .discount-tiers-list {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.laundry-rate-row, .addon-item-row, .tier-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
}

.l-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.l-info strong {
    font-size: 0.85rem;
    display: block;
}
.l-info small {
    font-size: 0.72rem;
    color: var(--muted);
}
.l-price .price-val {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
}

.tier-badge {
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}
.tier-badge.gold { background: #fef3c7; color: #b45309; }
.tier-badge.silver { background: #f1f5f9; color: #334155; }
.tier-badge.bronze { background: #ffedd5; color: #c2410c; }

/* ==================== VIEW 8: PICKUP / DELIVERY CHALLAN (IMAGE 4) ==================== */
.challan-view-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.challan-actions-top {
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
}

.challan-paper {
    width: 210mm;
    min-height: 297mm;
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    border: 1px solid #cbd5e1;
    padding: 14mm;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    color: #111;
}

.challan-black-header {
    background: #1e293b;
    color: #ffffff;
    text-align: center;
    padding: 8px;
    border-radius: 4px;
}
.challan-black-header h2 {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.challan-subhead {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin: 6px 0 12px 0;
    color: #334155;
}

.challan-logo-center {
    text-align: center;
    margin-bottom: 12px;
}
.neat-brand {
    font-size: 1.8rem;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: 1px;
}
.neat-sub {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #475569;
    display: block;
}
.neat-address {
    font-size: 0.72rem;
    color: #64748b;
}

.challan-cust-lines {
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    padding: 6px 0;
    font-size: 0.78rem;
}
.line-row {
    display: flex;
    gap: 20px;
    margin-bottom: 3px;
}

.challan-channel-row {
    display: flex;
    gap: 30px;
    padding: 6px 0;
    border-bottom: 1px solid #000;
    font-size: 0.78rem;
}

.challan-dates-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
    border-bottom: 1px solid #000;
    padding: 6px 0;
    font-size: 0.75rem;
}

.challan-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
    margin-top: 8px;
    border: 1px solid #000;
}
.challan-table th {
    border: 1px solid #000;
    padding: 6px;
    background: #f8fafc;
}
.challan-table td {
    border: 1px solid #000;
    padding: 6px;
}

.challan-bottom-grid {
    display: flex;
    justify-content: space-between;
    border: 1px solid #000;
    border-top: none;
    padding: 8px;
    font-size: 0.75rem;
}

.challan-totals-box {
    width: 200px;
}
.tot-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
}
.tot-row.grand {
    font-weight: bold;
    border-top: 1px solid #000;
    padding-top: 2px;
}

.challan-certify {
    font-size: 0.65rem;
    margin-top: 8px;
}

.challan-signatures {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 30px;
    font-size: 0.75rem;
}
.sign-space {
    width: 130px;
    border-bottom: 1px solid #000;
    margin-bottom: 4px;
}

/* ==================== VIEW 7: PICKUP & DELIVERY ==================== */
.pickup-delivery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.delivery-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

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

.bg-green-light { background: #f0fdf4; }
.bg-purple-light { background: #faf5ff; }

.delivery-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
}
.delivery-header small {
    color: var(--muted);
    font-size: 0.75rem;
}

.delivery-list {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 500px;
    overflow-y: auto;
}

.del-item {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==================== VIEW 10: REPORTS ==================== */
.reports-summary-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.rep-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
}
.rep-card span {
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 600;
}
.rep-card h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--dark);
    margin: 4px 0;
}

/* ==================== VIEW 11: SETTINGS ==================== */
.settings-form-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -8px;
}

/* ==================== MODALS ==================== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-dialog {
    background: #ffffff;
    width: 100%;
    max-width: 550px;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

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

.modal-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

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

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

/* ==================== RESPONSIVE RULES ==================== */
@media (max-width: 1200px) {
    .stat-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .tracking-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .invoice-studio-layout {
        flex-direction: column;
    }
    .invoice-controls {
        width: 100%;
    }
    .services-grid-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        margin-left: -270px;
        z-index: 100;
        box-shadow: 0 0 25px rgba(0, 0, 0, 0.25);
        transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .app-sidebar.mobile-open {
        margin-left: 0;
    }
    .app-header {
        height: 56px !important;
        padding: 0 10px !important;
        gap: 8px !important;
    }
    .header-left {
        gap: 8px !important;
    }
    .current-page-title {
        font-size: 1rem !important;
    }
    /* Hide top switcher on mobile to eliminate horizontal scrolling & left truncation */
    .header-center {
        display: none !important;
    }
    .header-right {
        gap: 6px !important;
    }
    .header-right .admin-profile .profile-info {
        display: none !important;
    }
    .header-right .date-badge {
        padding: 4px 8px !important;
        font-size: 0.72rem !important;
    }

    /* Layout & Body */
    .app-layout {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .app-main {
        overflow-x: hidden !important;
        width: 100% !important;
        min-width: 0 !important;
    }
    .app-body {
        padding: 12px 10px !important;
        overflow-x: hidden !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Stat Cards 2x2 Grid + 5th full width (Fixes "ctive Orders" clipping!) */
    .stat-grid, .stat-grid.five-cards {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    .stat-grid.five-cards .stat-card:nth-child(5) {
        grid-column: span 2 !important;
    }
    .stat-card {
        padding: 10px 10px !important;
        min-width: 0 !important;
        border-radius: var(--radius-md) !important;
    }
    .stat-card .stat-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 15px !important;
        margin-bottom: 6px !important;
    }
    .stat-card .stat-label {
        font-size: 0.72rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    .stat-card .stat-value {
        font-size: 1.15rem !important;
    }
    .stat-card .stat-subtext, .stat-card .stat-link {
        font-size: 0.68rem !important;
    }

    .quick-actions-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
    }
    .quick-btn {
        padding: 10px 6px !important;
        font-size: 0.72rem !important;
    }
    .quick-btn i {
        font-size: 16px !important;
    }

    .table-responsive {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Tracking on mobile */
    .tracking-top-bar {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    .tracking-selector-group {
        flex-direction: column !important;
        width: 100% !important;
        gap: 8px !important;
    }
    .tracking-selector {
        width: 100% !important;
    }
    .stepper-visual-card {
        overflow-x: auto !important;
        padding: 16px 8px !important;
        -webkit-overflow-scrolling: touch !important;
    }
    .stepper-progress-bar {
        min-width: 440px !important;
    }
    .tracking-cards-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    .reports-summary-cards {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }

    /* Mobile Invoice Toggle Bar (Edit vs Preview) */
    .mobile-invoice-toggle-bar {
        display: flex !important;
        gap: 8px;
        margin-bottom: 12px;
        position: sticky;
        top: 0;
        z-index: 85;
        background: #f8fafc;
        padding: 6px 0;
    }
    .mobile-invoice-toggle-bar .btn {
        flex: 1;
        padding: 9px 10px;
        font-size: 0.8rem;
    }

    /* Invoice paper on mobile devices */
    .invoice-preview-container {
        padding: 0 !important;
        width: 100% !important;
        overflow-x: auto;
        display: block;
    }

    .invoice-paper, .challan-paper {
        width: 100% !important;
        min-height: auto !important;
        padding: 12px 10px !important;
        box-sizing: border-box !important;
        box-shadow: none !important;
        border: 1px solid #cbd5e1;
    }

    .inv-header {
        flex-direction: column;
        gap: 12px;
    }
    .inv-title-section {
        align-items: flex-start;
        text-align: left;
        width: 100%;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
    }

    .inv-details-row {
        flex-direction: column;
        gap: 8px;
    }
    .inv-customer-col, .inv-meta-col {
        width: 100% !important;
        text-align: left !important;
    }

    .inv-lower-grid {
        flex-direction: column;
        gap: 16px;
    }
    .inv-payment-col {
        width: 100% !important;
    }

    .inv-table th, .inv-table td {
        padding: 6px 4px !important;
        font-size: 0.72rem !important;
    }

    /* Mobile: Hide field labels in Invoice Controls so placeholders create compact app look */
    .invoice-controls .form-group > label,
    .invoice-controls .controls-card label:not(.custom-control-label) {
        display: none !important;
    }

    /* Single line footer responsive on mobile without cutting off address */
    .single-line-bar {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 5px 12px !important;
        font-size: 0.72rem !important;
        padding: 8px 10px !important;
        text-align: center !important;
        overflow: visible !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .footer-divider {
        display: inline !important;
        margin: 0 2px !important;
    }
    .footer-segment {
        white-space: normal !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 4px !important;
    }

    /* Challan paper mobile responsive */
    .challan-dates-grid {
        grid-template-columns: 1fr;
        gap: 4px;
        text-align: left;
    }
    .challan-bottom-grid {
        flex-direction: column;
        gap: 10px;
    }
    .challan-totals-box {
        width: 100%;
    }
    .challan-signatures {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
}

/* ==================== PRINT MEDIA STYLES ==================== */
@media print {
    @page {
        size: A4 portrait;
        margin: 6mm 8mm;
    }

    body, html {
        background: #ffffff !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        height: auto !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .no-print,
    .app-sidebar,
    .app-header,
    .invoice-controls,
    .challan-actions-top,
    .quick-actions-bar,
    .mobile-invoice-toggle-bar,
    .mobile-preview-actions-bar,
    .floating-mobile-preview-btn,
    .sidebar-backdrop,
    .modal,
    .login-overlay {
        display: none !important;
    }

    .app-layout, .app-main, .app-body, .invoice-preview-container {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
        height: auto !important;
        overflow: visible !important;
    }

    .content-view {
        display: none !important;
    }

    .content-view.active {
        display: block !important;
    }

    .invoice-paper, .challan-paper {
        box-shadow: none !important;
        border: none !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: auto !important;
        height: auto !important;
        padding: 0 !important;
        margin: 0 !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
}
