/* MezuSmart Professional - Modern Design System */

/* ============================================================================
   CSS VARIABLES & DESIGN TOKENS
   ============================================================================ */

:root {
    /* Primary Colors */
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --primary-glow: rgba(59, 130, 246, 0.3);

    /* Accent Colors */
    --gold: #f59e0b;
    --gold-light: #fbbf24;
    --success: #10b981;
    --success-light: #34d399;
    --danger: #ef4444;
    --danger-light: #f87171;
    --purple: #8b5cf6;

    /* Neutral Colors */
    --white: #ffffff;
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.95);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: rgba(0, 0, 0, 0.08);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-gold: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px var(--primary-glow);

    /* Sizing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ============================================================================
   BASE & RESET
   ============================================================================ */

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

html,
body {
    height: 100%;
    font-family: 'Heebo', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    background: var(--gradient-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body {
    min-height: 100dvh;
}

/* ============================================================================
   SCREENS
   ============================================================================ */

.screen {
    display: none;
    min-height: 100dvh;
}

.screen.active {
    display: flex;
}

.center-layout {
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.app-layout {
    flex-direction: column;
    background: var(--bg-primary);
}

/* ============================================================================
   LOADING SCREEN
   ============================================================================ */

#loadingScreen {
    background: var(--gradient-primary);
}

.loader-content {
    text-align: center;
}

.app-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 24px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================================================
   LOGIN SCREEN
   ============================================================================ */

.login-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: var(--shadow-xl);
    animation: fadeUp 0.6s ease;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.login-card .app-logo {
    width: 100px;
    height: 100px;
}

.login-card h1 {
    font-size: 2rem;
    font-weight: 900;
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 32px;
}

.input-group {
    position: relative;
    margin-bottom: 16px;
}

.input-group i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-group input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition-fast);
    background: var(--white);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.input-modern {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    background: var(--white);
    margin-bottom: 12px;
    transition: var(--transition-fast);
}

.input-modern:focus {
    outline: none;
    border-color: var(--primary);
}

.error-msg {
    color: var(--danger);
    font-size: 0.875rem;
    min-height: 20px;
    margin-bottom: 8px;
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-link {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 16px;
    cursor: pointer;
    position: relative;
    z-index: 10;
}

.btn-link strong {
    color: var(--primary);
}

.hidden {
    display: none !important;
}

/* ============================================================================
   TOP BAR
   ============================================================================ */

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    padding-top: calc(16px + env(safe-area-inset-top));
    background: var(--gradient-primary);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.user-info span {
    font-weight: 600;
}

.icon-btn {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--radius-md);
    color: var(--white);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================================================
   SIDE MENU
   ============================================================================ */

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
    z-index: 200;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.side-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background: var(--white);
    box-shadow: var(--shadow-xl);
    transition: var(--transition-normal);
    z-index: 201;
    overflow-y: auto;
}

.side-menu.active {
    right: 0;
}

.menu-header {
    padding: 24px;
    background: var(--gradient-primary);
    color: var(--white);
}

.menu-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.menu-header p {
    font-size: 0.875rem;
    opacity: 0.8;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 16px 24px;
    background: none;
    border: none;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: right;
}

.menu-item:hover,
.menu-item.active {
    background: var(--bg-secondary);
    color: var(--primary);
}

.menu-item i {
    width: 24px;
    color: var(--text-muted);
}

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

.menu-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

/* ============================================================================
   CONTENT AREA
   ============================================================================ */

.content-area {
    flex: 1;
    padding: 20px;
    padding-bottom: 100px;
    overflow-y: auto;
}

.view {
    display: none;
    animation: fadeIn 0.3s ease;
}

.view.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.view-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

/* ============================================================================
   STATS GRID
   ============================================================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

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

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    transition: var(--transition-normal);
}

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

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    opacity: 0.1;
    transform: translate(30%, -30%);
}

.stat-card.blue::before {
    background: var(--primary);
}

.stat-card.gold::before {
    background: var(--gold);
}

.stat-card.green::before {
    background: var(--success);
}

.stat-card.purple::before {
    background: var(--purple);
}

.stat-card.danger::before {
    background: var(--danger);
}

.stat-card .icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.stat-card.blue .icon {
    color: var(--primary);
}

.stat-card.gold .icon {
    color: var(--gold);
}

.stat-card.green .icon {
    color: var(--success);
}

.stat-card.purple .icon {
    color: var(--purple);
}

.stat-card.danger .icon {
    color: var(--danger);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ============================================================================
   CARDS
   ============================================================================ */

.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    margin-bottom: 16px;
}

.card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.chart-card {
    height: 300px;
}

.chart-card canvas {
    max-height: 240px;
}

/* ============================================================================
   LISTS
   ============================================================================ */

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    border-right: 4px solid transparent;
}

.list-item:hover {
    transform: translateX(-4px);
    box-shadow: var(--shadow-md);
}

.list-item.small {
    padding: 12px;
}

.list-item.overdue {
    border-right-color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
}

.list-item.upcoming {
    border-right-color: var(--gold);
    background: rgba(245, 158, 11, 0.05);
}

.list-item.low-stock {
    border-right-color: var(--danger);
}

.item-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.item-info p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.item-info .status {
    font-weight: 600;
    margin-top: 4px;
}

.item-info .stock.danger {
    color: var(--danger);
}

.item-info .stock.success {
    color: var(--success);
}

.item-price {
    text-align: left;
}

.item-price .price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
}

.item-price .cost {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.serial {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

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

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    margin-bottom: 8px;
}

.empty-text {
    color: var(--text-muted);
    font-style: italic;
    padding: 16px 0;
}

/* ============================================================================
   SEARCH
   ============================================================================ */

.search-box {
    position: relative;
    margin-bottom: 20px;
}

.search-box i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 14px 14px 14px 48px;
    border: 2px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-family: inherit;
    background: var(--white);
    transition: var(--transition-fast);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
}

/* ============================================================================
   PERIOD SELECTOR
   ============================================================================ */

.period-selector {
    margin-bottom: 20px;
}

.period-selector select {
    width: 100%;
    max-width: 200px;
}

/* ============================================================================
   TABS
   ============================================================================ */

.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.tab-btn {
    padding: 10px 20px;
    background: var(--bg-secondary);
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.tab-btn.active {
    background: var(--primary);
    color: var(--white);
}

/* ============================================================================
   PREMIUM & BADGES
   ============================================================================ */

.badge-plan {
    background: var(--gradient-gold);
    color: var(--white);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.category-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

/* ============================================================================
   SERVICE PROVIDERS - PREMIUM DESIGN
   ============================================================================ */

.providers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.provider-card-premium {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
}

.provider-card-premium:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.provider-header-premium {
    padding: 20px;
    background: linear-gradient(to right, rgba(59, 130, 246, 0.05), transparent);
    border-bottom: 1px solid var(--border);
}

.provider-header-premium h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.provider-body-premium {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.provider-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}

.provider-info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.provider-info-row i {
    color: var(--primary);
    width: 20px;
    text-align: center;
}

.provider-info-row a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.provider-info-row a:hover {
    text-decoration: underline;
}

.approval-notice-box {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 16px;
}

.approval-notice-box i {
    color: var(--gold);
    font-size: 1.2rem;
    margin-top: 2px;
}

.approval-notice-box p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.badge-plan {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid var(--border);
}

.badge-plan.premium {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    border: none;
    box-shadow: 0 2px 4px rgba(255, 165, 0, 0.3);
}

/* Premium Modal */
.modal-sheet.premium {
    border-top: 5px solid var(--gold);
}

.modal-header.center {
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding-bottom: 16px;
}

.premium-icon {
    font-size: 3rem;
    color: var(--gold);
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 6px rgba(245, 158, 11, 0.3));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.highlight-text {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 16px 0;
}

.price-box {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: var(--radius-lg);
    margin: 24px 0;
    border: 2px solid var(--gold);
    background: linear-gradient(to bottom right, #fffbf0, #fff);
}

.price-box .amount {
    display: block;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1;
}

.price-box .label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.btn-bit {
    width: 100%;
    padding: 16px;
    background: #00b9ff;
    /* Bit Blue */
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 185, 255, 0.3);
    transition: transform 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-bit:active {
    transform: scale(0.98);
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 16px 8px;
    /* Reduced padding from 12px 20px 24px */
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom, 8px);
    /* Adjust for iPhone home indicator */
    height: 60px;
    /* Explicit height, slightly smaller */
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.nav-item i {
    font-size: 1.25rem;
}

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

.nav-fab-wrapper {
    position: relative;
    top: -20px;
}

.nav-fab {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-normal);
}

.nav-fab:hover {
    transform: scale(1.1);
}

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

.fab-float {
    position: fixed;
    bottom: 100px;
    left: 24px;
    width: 56px;
    height: 56px;
    background: var(--gradient-success);
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-normal);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab-float:hover {
    transform: scale(1.1);
}

.fab-float.green {
    background: var(--gradient-success);
}

.fab-float.blue {
    background: var(--gradient-primary);
}

.fab {
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.5);
}

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

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
    z-index: 300;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-sheet {
    background: var(--white);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 24px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    overscroll-behavior: contain;
    /* Prevent scrolling parent */
}

.modal-overlay.active .modal-sheet {
    transform: translateY(0);
}

.modal-sheet.large {
    max-height: 95vh;
}

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

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.modal-close {
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border: none;
    border-radius: 50%;
    font-size: 1rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--border);
}

.modal-content-scroll {
    flex: 1;
    /* Allow taking available space */
    max-height: 70vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Critical for iOS smooth scroll */
    margin-bottom: 16px;
    padding: 2px;
}

.modal-content-scroll iframe {
    width: 100%;
    height: 500px;
    border: none;
    border-radius: var(--radius-md);
}

/* ============================================================================
   PROFILE
   ============================================================================ */

.profile-info {
    margin-bottom: 20px;
}

.profile-info p {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    color: var(--text-secondary);
}

.profile-info i {
    width: 20px;
    color: var(--text-muted);
}

.btn-whatsapp {
    width: 100%;
    padding: 14px;
    background: #25D366;
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.btn-whatsapp:hover {
    background: #128C7E;
}

.btn-whatsapp-small {
    padding: 10px 16px;
    background: #25D366;
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-whatsapp-small:hover {
    background: #128C7E;
}

.btn-icon {
    width: 40px;
    height: 40px;
    background: #25D366;
    border: none;
    border-radius: var(--radius-md);
    color: white;
    cursor: pointer;
}

#customerProfileModal h4 {
    margin: 20px 0 12px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ============================================================================
   SERIAL NUMBER DISPLAY
   ============================================================================ */

.serial-number {
    text-align: center;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.serial-number strong {
    font-family: monospace;
    font-size: 1.25rem;
    color: var(--primary);
}

/* ============================================================================
   TOAST
   ============================================================================ */

.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--text-primary);
    color: var(--white);
    padding: 14px 24px;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: var(--shadow-xl);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: var(--transition-normal);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-success {
    background: var(--success);
}

.toast-error {
    background: var(--danger);
}

.toast-info {
    background: var(--primary);
}

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

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .content-area {
        padding: 32px;
        max-width: 1200px;
        margin: 0 auto;
    }

    .bottom-nav {
        display: none;
    }

    .fab-float {
        bottom: 32px;
    }

    .modal-sheet {
        border-radius: var(--radius-xl);
        margin: auto;
    }

    .list-item:hover {
        transform: translateX(-8px);
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 24px;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .content-area {
        padding: 16px;
    }
}

/* ============================================================================
   SCROLLBAR
   ============================================================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

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

select.input-modern {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 20px;
    padding-left: 40px;
}

textarea.input-modern {
    resize: vertical;
    min-height: 80px;
}

/* ============================================================================
   PRINT
   ============================================================================ */

/* ============================================================================
   FOOTER CREDIT
   ============================================================================ */

.app-footer {
    text-align: center;
    padding: 20px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    opacity: 0.7;
    margin-top: auto;
    letter-spacing: 0.5px;
}

/* ============================================================================
   SERVICE PROVIDERS
   ============================================================================ */

.providers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.provider-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.provider-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.provider-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.provider-header h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
}

.category-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    margin-right: 8px;
}

.provider-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.provider-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
    flex: 1;
}

.provider-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.provider-details p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.provider-details i {
    color: var(--primary);
    width: 16px;
    text-align: center;
}

.provider-details a {
    color: var(--primary);
    text-decoration: none;
}

.provider-details a:hover {
    text-decoration: underline;
}

.provider-pending {
    border-right: 4px solid var(--gold);
    background: linear-gradient(to left, rgba(245, 158, 11, 0.05), transparent);
}

/* iOS Scroll Fix */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

@media print {

    /* ... existing print styles ... */
    .top-bar,
    .bottom-nav,
    .side-menu,
    .fab-float,
    .modal-overlay {
        display: none !important;
    }

    .content-area {
        padding: 0;
    }
}