/* BusinessBox Premium 3D Light Theme Styling System */

:root {
    --bg-main: #f1f5f9;
    --bg-workspace: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-light: rgba(0, 0, 0, 0.05);
    
    /* 3D Depth Shadows */
    --shadow-3d-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -2px rgba(0, 0, 0, 0.03), inset 0 1px 0 0 rgba(255,255,255,0.7);
    --shadow-3d-md: 0 10px 25px -5px rgba(0,0,0,0.04), 0 8px 10px -6px rgba(0,0,0,0.04), inset 0 1px 0 0 rgba(255,255,255,0.8);
    --shadow-3d-lg: 0 20px 40px -10px rgba(0,0,0,0.06), 0 10px 20px -10px rgba(0,0,0,0.04), inset 0 1px 0 0 rgba(255,255,255,0.9);
    
    /* Dynamic Theme Defaults (Overridden dynamically in script) */
    --theme-color: #6366f1;
    --theme-color-rgb: 99, 102, 241;
    
    /* State Colors */
    --success: #10b981;
    --success-rgb: 16, 185, 129;
    --warning: #f59e0b;
    --warning-rgb: 245, 158, 11;
    --danger: #ef4444;
    --danger-rgb: 239, 68, 68;
    --info: #3b82f6;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.hidden {
    display: none !important;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ==========================================================================
   AUTH SCREEN PANELS
   ========================================================================== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: radial-gradient(circle at top right, rgba(var(--theme-color-rgb), 0.08), transparent 45%),
                radial-gradient(circle at bottom left, rgba(var(--theme-color-rgb), 0.05), transparent 45%);
}

.auth-card-3d {
    background-color: var(--card-bg);
    width: 100%;
    max-width: 440px;
    padding: 2.5rem 2rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-3d-lg);
    position: relative;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo-icon {
    font-size: 3rem;
    color: var(--theme-color);
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 4px 6px rgba(var(--theme-color-rgb), 0.2));
}

.auth-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    letter-spacing: -0.5px;
}

.auth-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-group-3d {
    margin-bottom: 1.25rem;
}

.form-group-3d label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.form-group-3d label i {
    margin-right: 0.25rem;
    color: var(--text-muted);
}

/* Inset 3D Inputs */
.input-3d {
    width: 100%;
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05), 0 1px 0 rgba(255,255,255,0.8);
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
    color: var(--text-main);
}

.input-3d:focus {
    border-color: var(--theme-color);
    background-color: #ffffff;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02), 0 0 0 4px rgba(var(--theme-color-rgb), 0.15);
}

.trial-info-alert {
    background-color: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    color: var(--text-main);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.trial-info-alert i {
    color: var(--theme-color);
    font-size: 1.1rem;
}

/* Tactile 3D Buttons */
.btn-3d {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s, background-color 0.2s;
    outline: none;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--theme-color);
    color: #ffffff;
    box-shadow: 0 4px 6px rgba(var(--theme-color-rgb), 0.2), inset 0 1px 0 rgba(255,255,255,0.4), inset 0 -2px 0 rgba(0,0,0,0.15);
}

.btn-primary:hover {
    box-shadow: 0 6px 12px rgba(var(--theme-color-rgb), 0.3), inset 0 1px 0 rgba(255,255,255,0.4), inset 0 -2px 0 rgba(0,0,0,0.15);
}

.btn-primary:active {
    transform: translateY(2px);
    box-shadow: 0 2px 4px rgba(var(--theme-color-rgb), 0.1), inset 0 1px 2px rgba(0,0,0,0.1);
}

.btn-block {
    width: 100%;
}

.auth-links {
    display: flex;
    justify-content: space-between;
    margin-top: 1.25rem;
    font-size: 0.85rem;
}

.auth-links a {
    color: var(--theme-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   APP SHELL LAYOUT
   ========================================================================== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* 3D Sidebar Panel */
.sidebar-3d {
    width: 260px;
    background-color: var(--card-bg);
    border-right: 1px solid var(--border-light);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

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

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 1.75rem;
    color: var(--theme-color);
    filter: drop-shadow(0 3px 5px rgba(var(--theme-color-rgb), 0.2));
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.sidebar-toggle-btn {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-main);
    display: none;
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 1rem;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
}

.nav-item-wrap {
    margin-bottom: 0.4rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

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

.nav-link.active {
    color: var(--theme-color);
    background-color: rgba(var(--theme-color-rgb), 0.05);
    border: 1px solid rgba(var(--theme-color-rgb), 0.08);
    box-shadow: inset 0 1px 2px rgba(var(--theme-color-rgb), 0.02);
}

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

.user-pill-3d {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: var(--card-bg);
    padding: 0.75rem;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.8);
    box-shadow: var(--shadow-3d-sm);
    margin-bottom: 1rem;
}

.user-avatar {
    font-size: 1.8rem;
    color: var(--text-muted);
}

.user-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

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

.btn-logout {
    width: 100%;
    padding: 0.6rem;
    font-size: 0.85rem;
    background-color: #ffffff;
    color: #ef4444;
    border: 1px solid rgba(239,68,68,0.15);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.btn-logout:hover {
    background-color: rgba(239, 68, 68, 0.05);
}

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

/* Main Layout Space */
.main-layout {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* 3D Glass Header */
.header-3d {
    height: 70px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    flex-shrink: 0;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.01);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.business-branding-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-business-logo {
    max-height: 38px;
    max-width: 100px;
    object-fit: contain;
    border-radius: 6px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.03);
}

.header-business-title {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Trial countdown tag widget */
.trial-countdown-badge {
    background-color: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: var(--warning);
    border-radius: 9999px;
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: inset 0 1px 2px rgba(245,158,11,0.02);
    animation: pulse-warning 2.5s infinite;
}

@keyframes pulse-warning {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.2), inset 0 1px 2px rgba(245,158,11,0.02); }
    70% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0), inset 0 1px 2px rgba(245,158,11,0.02); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0), inset 0 1px 2px rgba(245,158,11,0.02); }
}

.profile-info-pill {
    background-color: #f1f5f9;
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Workspace Frame */
.content-workspace {
    flex: 1;
    background-color: var(--bg-workspace);
    overflow-y: auto;
    padding: 2rem;
}

/* ==========================================================================
   CARDS & CONTAINERS
   ========================================================================== */
.card-3d {
    background-color: var(--card-bg);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-3d-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-3d:hover {
    box-shadow: var(--shadow-3d-lg);
}

.card-header-3d {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
}

.card-title-3d {
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ==========================================================================
   METRICS DASHBOARD WIDGETS
   ========================================================================== */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.metric-card-3d {
    background-color: var(--card-bg);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-3d-sm);
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
}

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

.metric-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    color: var(--text-muted);
}

.metric-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.bg-metric-blue { background-color: rgba(59, 130, 246, 0.08); color: #3b82f6; }
.bg-metric-amber { background-color: rgba(245, 158, 11, 0.08); color: #f59e0b; }
.bg-metric-indigo { background-color: rgba(99, 102, 241, 0.08); color: #6366f1; }
.bg-metric-green { background-color: rgba(16, 185, 129, 0.08); color: #10b981; }
.bg-metric-rose { background-color: rgba(244, 63, 94, 0.08); color: #f43f5e; }

.metric-value {
    font-size: 1.6rem;
    font-weight: 800;
}

/* ==========================================================================
   2-COLUMN WORKSPACE GRIDS
   ========================================================================== */
.two-col-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .two-col-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   TABLES & LISTS
   ========================================================================== */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.table-3d {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table-3d th {
    background-color: #f8fafc;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-light);
}

.table-3d td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
}

.table-3d tr:last-child td {
    border-bottom: none;
}

.table-3d tbody tr {
    transition: background-color 0.2s;
}

.table-3d tbody tr:hover {
    background-color: #f8fafc;
}

/* Dynamic status tags inside tables */
.status-pill {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

/* ==========================================================================
   TODAY TASKS / DYNAMIC TIMELINE WIDGETS
   ========================================================================== */
.task-list-wrap {
    list-style: none;
}

.task-item-3d {
    background-color: #f8fafc;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(0,0,0,0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-3d-sm);
    transition: transform 0.2s;
}

.task-item-3d:hover {
    transform: translateX(4px);
}

.task-details {
    display: flex;
    flex-direction: column;
}

.task-title {
    font-weight: 600;
    font-size: 0.88rem;
}

.task-due {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.task-action-btn {
    background: transparent;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    color: var(--theme-color);
}

/* Activity logs */
.activity-list {
    list-style: none;
    padding-left: 0.5rem;
}

.activity-item {
    border-left: 2px solid #e2e8f0;
    padding-left: 1rem;
    padding-bottom: 1.25rem;
    position: relative;
}

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

.activity-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--theme-color);
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 2px var(--theme-color);
}

.activity-title {
    font-weight: 600;
    font-size: 0.85rem;
}

.activity-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.activity-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ==========================================================================
   MODAL WINDOWS & TACTILE FORM LAYOUTS
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1.5rem;
}

.modal-content-3d {
    background-color: var(--card-bg);
    border-radius: 20px;
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    border: 1px solid rgba(255,255,255,0.8);
    box-shadow: var(--shadow-3d-lg);
    display: flex;
    flex-direction: column;
}

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

.modal-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background-color: #f8fafc;
}

.btn-secondary {
    background-color: #ffffff;
    color: var(--text-main);
    border: 1px solid #cbd5e1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02), inset 0 1px 0 rgba(255,255,255,0.8);
}

.btn-secondary:hover {
    background-color: #f8fafc;
}

.btn-secondary:active {
    transform: translateY(2px);
}

/* Grid splits inside forms */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
}

.badge-counter {
    background-color: var(--theme-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    margin-left: 0.5rem;
}

/* ==========================================================================
   UTILITY & SEARCH ACTIONS
   ========================================================================== */
.action-bar-3d {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-wrap {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    max-width: 400px;
}

/* ==========================================================================
   SHIMMER LOADERS
   ========================================================================== */
.loading-shimmer-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.shimmer-card {
    height: 180px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 16px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==========================================================================
   ORDER PROCESS FLOW ELEMENTS & TEMPLATES
   ========================================================================== */
.order-item-row {
    display: grid;
    grid-template-columns: 3fr 1.5fr 1fr 1.5fr auto;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.75rem;
    background: #f8fafc;
    padding: 0.5rem;
    border-radius: 10px;
}

.order-item-row span {
    font-size: 0.85rem;
    font-weight: 600;
}

.remove-item-btn {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1.1rem;
}

/* Attachment cards */
.attachments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.attachment-preview-card {
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    overflow: hidden;
    height: 120px;
    position: relative;
    background-color: #f8fafc;
}

.attachment-preview-card img, .attachment-preview-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.attachment-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.attachment-fallback i {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.attachment-download-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.attachment-preview-card:hover .attachment-download-overlay {
    opacity: 1;
}

.attachment-download-overlay a {
    color: white;
    font-size: 1.25rem;
}

/* PREVIEW THEME COLOR BUTTONS */
.color-picker-circles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.color-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 2px #cbd5e1;
    transition: transform 0.2s, box-shadow 0.2s;
}

.color-circle:hover {
    transform: scale(1.1);
}

.color-circle.active {
    box-shadow: 0 0 0 2px var(--theme-color);
}

/* ==========================================================================
   PRINT LAYOUT invoice STYLESHEET
   ========================================================================== */
@media print {
    body {
        background-color: #ffffff !important;
        color: #000000 !important;
        font-family: 'Outfit', sans-serif !important;
    }
    
    #app-container, .app-layout, .sidebar-3d, .header-3d, .action-bar-3d, .modal-footer, .modal-header button, .btn-logout {
        display: none !important;
    }

    .modal-overlay {
        position: static !important;
        background-color: transparent !important;
        backdrop-filter: none !important;
        display: block !important;
        padding: 0 !important;
    }

    .modal-content-3d {
        box-shadow: none !important;
        border: none !important;
        max-height: 100% !important;
        width: 100% !important;
    }

    .print-invoice-sheet {
        display: block !important;
        padding: 1.5in !important;
        width: 100%;
        box-sizing: border-box;
    }
}

/* Screen layout invoice display */
.invoice-print-container {
    background-color: #ffffff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.02);
}

.invoice-header-grid {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 1.5rem;
}

.invoice-bill-to {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.invoice-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.invoice-items-table th {
    background-color: #f8fafc;
    padding: 0.5rem 1rem;
    border-bottom: 2px solid #e2e8f0;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 700;
}

.invoice-items-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}

.invoice-totals {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.invoice-total-row {
    display: flex;
    width: 250px;
    justify-content: space-between;
    font-size: 0.9rem;
}

.invoice-total-row.grand {
    font-size: 1.1rem;
    font-weight: 800;
    border-top: 2px solid #e2e8f0;
    padding-top: 0.5rem;
}

/* ==========================================================================
   RESPONSIVENESS ADJUSTMENTS
   ========================================================================== */
@media (max-width: 768px) {
    .sidebar-3d {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
    }

    .sidebar-3d.open {
        transform: translateX(0);
    }

    .sidebar-toggle-btn {
        display: block;
    }

    .header-3d {
        padding: 0 1rem;
    }

    .content-workspace {
        padding: 1.25rem;
    }
}

/* Call & Social Action Icons */
.social-actions-wrap {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
}

.btn-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    color: white;
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: none;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, filter 0.2s;
}

.btn-social-icon:hover {
    transform: translateY(-2px);
    filter: brightness(0.95);
}

.btn-social-icon.phone { background-color: #3b82f6; }
.btn-social-icon.whatsapp { background-color: #25d366; }
.btn-social-icon.instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }

/* 3D Star ratings in review list */
.review-rating-stars {
    display: inline-flex;
    gap: 0.15rem;
    color: #f59e0b;
}

.review-feed-card {
    background-color: #f8fafc;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(0,0,0,0.02);
    box-shadow: var(--shadow-3d-sm);
}

.review-feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.review-feed-customer {
    font-weight: 700;
    font-size: 0.85rem;
}

.review-feed-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.review-feed-comment {
    font-size: 0.82rem;
    font-style: italic;
    color: var(--text-main);
    margin-top: 0.25rem;
    line-height: 1.3;
}

/* Mobile responsive scaling overrides */
@media (max-width: 600px) {
    /* Make tables stack as vertical grid cards on mobile if preferred, or wrap cleanly */
    .table-3d thead {
        display: none; /* Hide headers on very small screen */
    }
    
    .table-3d tr {
        display: block;
        margin-bottom: 1rem;
        background: #f8fafc;
        border-radius: 12px;
        padding: 0.75rem;
        border: 1px solid rgba(0, 0, 0, 0.04);
        box-shadow: var(--shadow-3d-sm);
    }
    
    .table-3d td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0.25rem;
        border-bottom: 1px dashed rgba(0, 0, 0, 0.05);
        font-size: 0.8rem;
        text-align: right;
    }
    
    .table-3d td:last-child {
        border-bottom: none;
    }
    
    .table-3d td::before {
        content: attr(data-label);
        font-weight: 700;
        text-transform: uppercase;
        font-size: 0.7rem;
        color: var(--text-muted);
        text-align: left;
        margin-right: 1rem;
    }
    
    /* Order edit item grid spacing */
    .order-item-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .action-bar-3d {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-wrap {
        max-width: 100%;
    }
    
    .btn-3d {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        width: 100%;
        text-align: center;
        display: block;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    
    .metric-value {
        font-size: 1.3rem;
    }

    /* Header responsive mobile rules */
    .header-3d {
        height: auto !important;
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 0.75rem 1rem !important;
        gap: 0.5rem !important;
    }
    .header-left {
        width: 100% !important;
        justify-content: flex-start !important;
    }
    .header-right {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 0.5rem !important;
        border-top: 1px dashed rgba(0,0,0,0.05) !important;
        padding-top: 0.5rem !important;
        margin-top: 0.25rem !important;
    }
    .trial-countdown-badge {
        padding: 0.3rem 0.65rem !important;
        font-size: 0.7rem !important;
    }
    .profile-info-pill {
        padding: 0.3rem 0.65rem !important;
        font-size: 0.7rem !important;
    }
}
