/* =============================================
   FEDTECK Solutions App - Complete Stylesheet
   On-Demand IT Support Mobile App
   ============================================= */

:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #f97316;
    --accent-dark: #ea580c;
    --accent-light: #fb923c;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s ease;
    
    /* New gradient backgrounds */
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    --bg-gradient-light: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-bg-dark: rgba(30, 41, 59, 0.95);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--gray-800);
    background: var(--bg-gradient);
    min-height: 100vh;
}

#app {
    height: 100%;
    width: 100%;
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    background: var(--bg-gradient-light);
}

/* PWA Standalone Mode - True mobile app experience */
@media all and (display-mode: standalone) {
    html, body {
        height: 100%;
        width: 100%;
        overflow: hidden;
    }
    
    body {
        background: var(--white);
    }
    
    #app {
        height: 100%;
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        margin: 0;
        box-shadow: none;
    }
}

/* iOS Safari Add to Home Screen */
@media all and (display-mode: fullscreen) {
    #app {
        height: 100%;
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        margin: 0;
    }
}

/* =============================================
   SCREEN BASE STYLES
   ============================================= */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
    opacity: 0;
    visibility: hidden;
    transform: translateX(20px);
    transition: var(--transition);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.screen.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Screen Header */
.screen-header {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--white);
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.screen-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.screen-header.emergency-header {
    background: linear-gradient(135deg, var(--danger) 0%, #b91c1c 100%);
}

.back-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border-radius: var(--radius);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
}

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

.header-spacer {
    width: 40px;
}

.header-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border-radius: var(--radius);
    font-size: 16px;
    cursor: pointer;
}

/* Screen Content */
.screen-content {
    padding: 20px;
    padding-bottom: 40px;
}

/* =============================================
   HOME SCREEN
   ============================================= */
#homeScreen {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 40%, #334155 100%);
}

.home-container {
    width: 100%;
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-section {
    margin-bottom: 24px;
}

.app-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.tagline-section {
    text-align: center;
    margin-bottom: 32px;
}

.tagline-section h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
}

.tagline-section p {
    font-size: 14px;
    color: var(--gray-300);
    max-width: 280px;
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    width: 100%;
    max-width: 320px;
    margin-bottom: 32px;
}

.menu-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    color: var(--white);
}

.menu-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(249, 115, 22, 0.3);
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.15);
}

.menu-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(249, 115, 22, 0.2);
    border-radius: var(--radius);
    font-size: 24px;
    color: var(--accent);
    transition: var(--transition);
}

.menu-card:hover .menu-icon {
    background: var(--accent);
    color: var(--white);
    transform: scale(1.1);
}

.menu-icon.emergency {
    background: var(--danger);
    color: var(--white);
    animation: pulse 2s infinite;
}

.menu-icon.emergency-glow {
    background: var(--accent);
    color: var(--white);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.menu-card span {
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Home Footer */
.home-footer {
    text-align: center;
}

.home-footer p {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.quick-call {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.quick-call:hover {
    background: var(--accent);
}

/* =============================================
   SERVICES SCREEN
   ============================================= */
.services-intro {
    padding: 16px;
    background: var(--white);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.services-intro p {
    font-size: 14px;
    color: var(--gray-600);
}

.service-category {
    margin-bottom: 24px;
}

.service-category h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 12px;
    padding-left: 4px;
}

.service-category h3 i {
    color: var(--accent);
}

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

.service-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--white);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

.service-item:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.service-item .service-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: var(--radius);
    font-size: 20px;
    color: var(--accent);
    flex-shrink: 0;
}

.service-item .service-info {
    flex: 1;
}

.service-item h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.service-item p {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.service-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
}

.service-item > i {
    color: var(--gray-400);
}

/* =============================================
   PRICING SCREEN
   ============================================= */
.pricing-intro {
    text-align: center;
    padding: 24px;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
}

.pricing-intro h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.pricing-intro p {
    font-size: 14px;
    opacity: 0.9;
}

.pricing-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 16px;
    border: 2px solid var(--gray-200);
    position: relative;
}

.pricing-card.featured {
    border-color: var(--accent);
}

.pricing-card.emergency-card {
    border-color: var(--danger);
    background: linear-gradient(180deg, #fef2f2 0%, var(--white) 100%);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 24px;
    padding: 4px 12px;
    background: var(--accent);
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
}

.pricing-badge.emergency {
    background: var(--danger);
}

.pricing-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.pricing-rate {
    margin-bottom: 12px;
}

.pricing-rate .price {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
}

.pricing-rate .period {
    font-size: 16px;
    color: var(--gray-500);
}

.pricing-desc {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 16px;
}

.pricing-features {
    list-style: none;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
    color: var(--gray-700);
}

.pricing-features li i {
    color: var(--success);
}

.pricing-notes {
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 20px;
    margin-top: 20px;
}

.pricing-notes h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 12px;
}

.pricing-notes ul {
    list-style: none;
}

.pricing-notes li {
    font-size: 13px;
    color: var(--gray-600);
    padding: 4px 0;
    padding-left: 16px;
    position: relative;
}

.pricing-notes li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* =============================================
   REQUEST SERVICE WIZARD
   ============================================= */
.request-wizard {
    position: relative;
}

.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
}

.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.step-indicator .step {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-200);
    color: var(--gray-500);
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
}

.step-indicator .step.active {
    background: var(--accent);
    color: var(--white);
}

.step-indicator .step.completed {
    background: var(--success);
    color: var(--white);
}

.step-indicator .step-line {
    width: 24px;
    height: 3px;
    background: var(--gray-200);
    border-radius: 2px;
}

.step-indicator .step-line.active,
.step-indicator .step-line.completed {
    background: var(--success);
}

.wizard-step h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 8px;
    text-align: center;
}

.step-desc {
    font-size: 14px;
    color: var(--gray-500);
    text-align: center;
    margin-bottom: 24px;
}

/* Issue Options */
.issue-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.issue-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.issue-option:hover,
.issue-option.selected {
    border-color: var(--accent);
    background: #fff5f2;
}

.issue-option i {
    font-size: 28px;
    color: var(--accent);
}

.issue-option span {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    text-align: center;
}

.issue-option small {
    font-size: 12px;
    color: var(--gray-500);
    text-align: center;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    font-family: inherit;
    font-size: 16px;
    color: var(--gray-800);
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    outline: none;
    transition: var(--transition);
    /* Mobile keyboard fixes */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-user-select: text;
    user-select: text;
    touch-action: manipulation;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    -webkit-user-select: text;
    user-select: text;
}

.form-group textarea {
    resize: none;
}

/* Ensure inputs are interactive on mobile */
input, textarea, select {
    -webkit-user-select: text !important;
    user-select: text !important;
    touch-action: manipulation;
    cursor: text;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
textarea {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
}

/* Radio Options */
.radio-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.radio-option:has(input:checked) {
    border-color: var(--accent);
    background: #fff5f2;
}

.radio-option input {
    display: none;
}

.radio-custom {
    width: 22px;
    height: 22px;
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.radio-option input:checked + .radio-custom {
    border-color: var(--accent);
}

.radio-option input:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
}

.radio-content strong {
    display: block;
    font-size: 15px;
    color: var(--gray-800);
}

.radio-content small {
    font-size: 13px;
    color: var(--gray-500);
}

/* Step Buttons */
.step-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.step-buttons button {
    flex: 1;
}

/* Estimate Card */
.estimate-card {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}

.estimate-card h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 16px;
}

.estimate-card h4 i {
    color: var(--accent);
}

.estimate-summary {
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 16px;
    margin-bottom: 16px;
}

.estimate-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.estimate-row span:first-child {
    color: var(--gray-600);
}

.estimate-row span:last-child {
    font-weight: 500;
    color: var(--gray-800);
}

.estimate-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
}

.total-amount {
    font-size: 24px;
    color: var(--accent);
}

.estimate-note {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 12px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.estimate-note i {
    margin-top: 2px;
}

/* Contact Info Section */
.contact-info-section {
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

.contact-info-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 16px;
}

/* Terms Checkbox */
.terms-checkbox {
    margin-bottom: 20px;
}

.terms-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13px;
    color: var(--gray-600);
    cursor: pointer;
}

.terms-checkbox input {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    flex-shrink: 0;
}

.terms-checkbox a {
    color: var(--accent);
}

/* =============================================
   EMERGENCY SERVICE SCREEN
   ============================================= */
.emergency-banner {
    text-align: center;
    padding: 32px 20px;
    background: linear-gradient(135deg, var(--danger) 0%, #b91c1c 100%);
    color: var(--white);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}

.emergency-banner i {
    font-size: 48px;
    margin-bottom: 16px;
    animation: pulse 1.5s infinite;
}

.emergency-banner h3 {
    font-size: 22px;
    margin-bottom: 8px;
}

.emergency-banner p {
    font-size: 14px;
    opacity: 0.9;
}

.emergency-pricing {
    margin-bottom: 24px;
}

.emergency-rate {
    text-align: center;
    padding: 20px;
    background: #fef2f2;
    border: 2px solid var(--danger);
    border-radius: var(--radius);
}

.rate-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--danger);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.rate-amount {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--danger);
    margin-bottom: 8px;
}

.rate-note {
    display: block;
    font-size: 12px;
    color: var(--gray-600);
}

.emergency-options h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 16px;
}

.emergency-option {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 16px;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 12px;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.emergency-option:hover {
    border-color: var(--danger);
    background: #fef2f2;
}

.emergency-option .option-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fef2f2;
    border-radius: var(--radius);
    font-size: 22px;
    color: var(--danger);
    flex-shrink: 0;
}

.emergency-option .option-info strong {
    display: block;
    font-size: 15px;
    color: var(--gray-800);
    margin-bottom: 2px;
}

.emergency-option .option-info span {
    font-size: 13px;
    color: var(--gray-500);
}

.emergency-call {
    text-align: center;
    padding: 24px;
    background: var(--gray-100);
    border-radius: var(--radius);
    margin-top: 24px;
}

.emergency-call p {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 12px;
}

.btn-emergency-call {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--danger);
    color: var(--white);
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.btn-emergency-call:hover {
    background: #b91c1c;
}

/* =============================================
   TICKETS SCREEN
   ============================================= */
.tickets-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: var(--gray-200);
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition);
}

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

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

.ticket-card {
    padding: 16px;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    cursor: pointer;
    transition: var(--transition);
}

.ticket-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

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

.ticket-number {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
}

.ticket-status {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
}

.ticket-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.ticket-status.assigned {
    background: #dbeafe;
    color: #1e40af;
}

.ticket-status.in-progress {
    background: #d1fae5;
    color: #065f46;
}

.ticket-status.completed {
    background: var(--gray-200);
    color: var(--gray-600);
}

.ticket-service {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.ticket-date {
    font-size: 13px;
    color: var(--gray-500);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state i {
    font-size: 64px;
    color: var(--gray-300);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 20px;
}

/* =============================================
   TICKET DETAIL / TRACKING
   ============================================= */
.ticket-status-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    background: var(--accent);
    color: var(--white);
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 15px;
    font-weight: 600;
}

.ticket-tracking {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}

.ticket-tracking h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 16px;
}

.tracking-map {
    height: 180px;
    background: var(--gray-100);
    border-radius: var(--radius);
    margin-bottom: 16px;
    overflow: hidden;
}

.map-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
}

.map-placeholder i {
    font-size: 40px;
    margin-bottom: 8px;
}

.map-placeholder p {
    font-size: 13px;
}

.eta-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--gray-100);
    border-radius: var(--radius);
}

.eta-label {
    font-size: 14px;
    color: var(--gray-600);
}

.eta-time {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}

/* Technician Card */
.technician-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}

.technician-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-500);
    margin-bottom: 16px;
}

.tech-info {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.tech-avatar {
    width: 60px;
    height: 60px;
    background: var(--gray-200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--gray-500);
}

.tech-details strong {
    display: block;
    font-size: 16px;
    color: var(--gray-800);
    margin-bottom: 2px;
}

.tech-details span {
    display: block;
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 6px;
}

.tech-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--gray-600);
}

.tech-rating i {
    color: #f59e0b;
}

.tech-actions {
    display: flex;
    gap: 12px;
}

.btn-icon {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--accent);
    color: var(--white);
}

/* Ticket Details */
.ticket-details {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}

.ticket-details h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-500);
    margin-bottom: 16px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .label {
    font-size: 14px;
    color: var(--gray-500);
}

.detail-row .value {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-800);
    text-align: right;
}

/* Timeline */
.ticket-timeline {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}

.ticket-timeline h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-500);
    margin-bottom: 20px;
}

.timeline {
    position: relative;
    padding-left: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gray-200);
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -24px;
    top: 0;
    width: 16px;
    height: 16px;
    background: var(--gray-200);
    border-radius: 50%;
    border: 3px solid var(--white);
}

.timeline-item.completed .timeline-marker {
    background: var(--success);
}

.timeline-item.active .timeline-marker {
    background: var(--accent);
    animation: pulse 1.5s infinite;
}

.timeline-content strong {
    display: block;
    font-size: 14px;
    color: var(--gray-800);
    margin-bottom: 2px;
}

.timeline-content span {
    font-size: 12px;
    color: var(--gray-500);
}

/* =============================================
   CHAT SCREEN
   ============================================= */
.chat-header-info {
    text-align: center;
}

.chat-header-info strong {
    display: block;
    font-size: 16px;
}

.chat-header-info span {
    font-size: 12px;
    opacity: 0.8;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-date {
    text-align: center;
    font-size: 12px;
    color: var(--gray-500);
    margin: 8px 0;
}

.message {
    max-width: 80%;
}

.message.sent {
    align-self: flex-end;
}

.message.received {
    align-self: flex-start;
}

.message-content {
    padding: 12px 16px;
    border-radius: var(--radius);
}

.message.sent .message-content {
    background: var(--accent);
    color: var(--white);
    border-bottom-right-radius: 4px;
}

.message.received .message-content {
    background: var(--gray-200);
    color: var(--gray-800);
    border-bottom-left-radius: 4px;
}

.message-content p {
    font-size: 14px;
    margin-bottom: 4px;
}

.message-time {
    font-size: 11px;
    opacity: 0.7;
}

.chat-input {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
}

.chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 14px;
    outline: none;
}

.chat-input input:focus {
    border-color: var(--accent);
}

.send-btn {
    width: 48px;
    height: 48px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius);
    color: var(--white);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
}

.send-btn:hover {
    background: var(--accent-dark);
}

/* =============================================
   PROFILE SCREEN
   ============================================= */
.profile-header {
    text-align: center;
    padding: 32px 20px;
    background: var(--primary);
    color: var(--white);
    margin: -20px -20px 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 16px;
}

.profile-header h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.profile-header p {
    font-size: 14px;
    opacity: 0.8;
}

.profile-menu {
    margin-bottom: 24px;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 16px;
    background: var(--white);
    border: none;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.profile-menu-item:first-child {
    border-radius: var(--radius) var(--radius) 0 0;
}

.profile-menu-item:last-child {
    border-radius: 0 0 var(--radius) var(--radius);
    border-bottom: none;
}

.profile-menu-item:hover {
    background: var(--gray-50);
}

.profile-menu-item i:first-child {
    width: 20px;
    color: var(--accent);
}

.profile-menu-item span {
    flex: 1;
    font-size: 15px;
    color: var(--gray-800);
}

.profile-menu-item i:last-child {
    color: var(--gray-400);
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    background: var(--white);
    border: 2px solid var(--danger);
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    color: var(--danger);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 24px;
}

.btn-logout:hover {
    background: var(--danger);
    color: var(--white);
}

.app-info {
    text-align: center;
}

.app-info p {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 4px;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--accent-dark);
}

.btn-primary.btn-submit {
    background: var(--success);
}

.btn-primary.btn-submit:hover {
    background: #059669;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    background: var(--gray-200);
    color: var(--gray-700);
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background: var(--white);
    color: var(--danger);
    border: 2px solid var(--danger);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-danger:hover {
    background: var(--danger);
    color: var(--white);
}

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

.modal.active {
    display: flex;
}

.modal-content {
    width: 100%;
    max-width: 360px;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
}

.modal-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    border-radius: 50%;
    font-size: 36px;
}

.modal-icon.success {
    background: #d1fae5;
    color: var(--success);
}

.modal-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 12px;
}

.modal-content > p {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 20px;
}

.modal-ticket-info {
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
}

.modal-ticket-info span {
    display: block;
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.modal-ticket-info strong {
    font-size: 20px;
    color: var(--accent);
}

.modal-note {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 20px;
}

.modal-content button {
    width: 100%;
    margin-bottom: 12px;
}

.modal-content button:last-child {
    margin-bottom: 0;
}

/* =============================================
   LOADING OVERLAY
   ============================================= */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: var(--white);
}

.loading-spinner i {
    font-size: 40px;
}

.loading-spinner span {
    font-size: 14px;
}

/* =============================================
   AI ASSISTANT STYLES
   ============================================= */

/* AI Assistant Button on Home */
.ai-assistant-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 320px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    border-radius: var(--radius-lg);
    color: var(--white);
    cursor: pointer;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.ai-assistant-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.ai-assistant-btn .ai-pulse {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    animation: aiPulse 2s infinite;
}

@keyframes aiPulse {
    0%, 100% { transform: translateY(-50%) scale(1); opacity: 0.5; }
    50% { transform: translateY(-50%) scale(1.2); opacity: 0.2; }
}

.ai-assistant-btn i {
    font-size: 24px;
    z-index: 1;
}

.ai-assistant-btn span {
    font-size: 16px;
    font-weight: 600;
    z-index: 1;
}

.ai-assistant-btn small {
    font-size: 12px;
    opacity: 0.8;
    margin-left: auto;
    z-index: 1;
}

/* AI Icon in Menu */
.menu-icon.ai-icon {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: var(--white);
}

/* AI Header */
.screen-header.ai-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

/* AI Chat Container */
.ai-chat-container {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--gray-50);
    min-height: calc(100vh - 180px);
}

#aiAssistantScreen {
    display: flex;
    flex-direction: column;
}

#aiAssistantScreen .screen-header {
    flex-shrink: 0;
}

/* AI Messages */
.ai-message {
    display: flex;
    gap: 12px;
    max-width: 90%;
}

.ai-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.ai-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 18px;
    flex-shrink: 0;
}

.ai-message.user .ai-avatar {
    background: var(--accent);
}

.ai-bubble {
    background: var(--white);
    padding: 16px;
    border-radius: var(--radius-lg);
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.ai-message.user .ai-bubble {
    background: var(--accent);
    color: var(--white);
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: 4px;
}

.ai-bubble p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 8px;
}

.ai-bubble p:last-child {
    margin-bottom: 0;
}

.ai-bubble ul {
    list-style: none;
    margin: 12px 0;
}

.ai-bubble ul li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
}

.ai-bubble ul li i {
    color: #8b5cf6;
    width: 20px;
}

/* AI Suggestions */
.ai-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 16px;
}

.ai-suggestion-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--white);
    border: 2px solid #6366f1;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #6366f1;
    cursor: pointer;
    transition: var(--transition);
}

.ai-suggestion-btn:hover {
    background: #6366f1;
    color: var(--white);
}

/* AI Input Container */
.ai-input-container {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
}

.ai-input-container input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 15px;
    outline: none;
    transition: var(--transition);
}

.ai-input-container input:focus {
    border-color: #6366f1;
}

.ai-send-btn,
.ai-voice-btn {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: var(--radius);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
}

.ai-send-btn {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: var(--white);
}

.ai-send-btn:hover {
    transform: scale(1.05);
}

.ai-voice-btn {
    background: var(--gray-100);
    color: var(--gray-600);
}

.ai-voice-btn:hover {
    background: var(--gray-200);
}

.ai-voice-btn.listening {
    background: var(--danger);
    color: var(--white);
    animation: pulse 1s infinite;
}

/* =============================================
   SMART DIAGNOSE STYLES
   ============================================= */
.diagnose-intro {
    text-align: center;
    padding: 24px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: var(--radius-lg);
    color: var(--white);
    margin-bottom: 24px;
}

.diagnose-icon {
    width: 72px;
    height: 72px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 16px;
}

.diagnose-intro h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.diagnose-intro p {
    font-size: 14px;
    opacity: 0.9;
}

.diagnose-form {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.btn-diagnose {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.btn-diagnose:hover {
    opacity: 0.9;
}

/* Diagnosis Results */
.diagnose-results {
    animation: fadeInUp 0.5s ease;
}

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

.results-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    background: var(--success);
    color: var(--white);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.results-header i {
    font-size: 24px;
}

.results-header h3 {
    font-size: 18px;
}

/* Diagnosis Card */
.diagnosis-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    border-left: 4px solid #6366f1;
}

.diagnosis-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.diagnosis-badge.low {
    background: #d1fae5;
    color: #065f46;
}

.diagnosis-badge.medium {
    background: #fef3c7;
    color: #92400e;
}

.diagnosis-badge.high {
    background: #fee2e2;
    color: #991b1b;
}

.diagnosis-badge.critical {
    background: #991b1b;
    color: var(--white);
}

.diagnosis-card h4 {
    font-size: 18px;
    color: var(--gray-800);
    margin-bottom: 16px;
}

/* Confidence Meter */
.confidence-meter {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--gray-600);
}

.confidence-bar {
    flex: 1;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 4px;
    transition: width 1s ease;
}

/* DIY Section */
.diy-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
}

.diy-section h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: var(--gray-800);
    margin-bottom: 12px;
}

.diy-section h4 i {
    color: #f59e0b;
}

.diy-intro {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 16px;
}

.diy-steps {
    list-style: none;
    counter-reset: diy-counter;
    margin-bottom: 20px;
}

.diy-steps li {
    counter-increment: diy-counter;
    display: flex;
    gap: 12px;
    padding: 12px 0;
    font-size: 14px;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
}

.diy-steps li:last-child {
    border-bottom: none;
}

.diy-steps li::before {
    content: counter(diy-counter);
    width: 24px;
    height: 24px;
    background: #6366f1;
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.diy-result {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.diy-result p {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 12px;
}

.diy-buttons {
    display: flex;
    gap: 12px;
}

.diy-buttons button {
    flex: 1;
}

.btn-success {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--success);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-success:hover {
    background: #059669;
}

/* Estimate Section */
.estimate-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
}

.estimate-section h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: var(--gray-800);
    margin-bottom: 16px;
}

.estimate-section h4 i {
    color: #6366f1;
}

.estimate-details {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 16px;
}

.estimate-section .estimate-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--gray-200);
}

.estimate-section .estimate-row:last-child {
    border-bottom: none;
}

.estimate-section .estimate-row.total {
    font-weight: 600;
    font-size: 16px;
    color: var(--gray-800);
    padding-top: 12px;
    margin-top: 4px;
    border-top: 2px solid var(--gray-300);
}

.estimate-section .estimate-row.total span:last-child {
    color: #6366f1;
}

.estimate-note {
    font-size: 13px;
    color: var(--success);
    margin-top: 12px;
    text-align: center;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-buttons .btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

/* =============================================
   AI ANALYSIS MODAL
   ============================================= */
.ai-modal {
    max-width: 320px;
}

.ai-analyzing {
    text-align: center;
    padding: 20px 0;
}

.ai-brain-animation {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
}

.ai-brain-animation i {
    font-size: 40px;
    color: #6366f1;
    position: relative;
    z-index: 1;
    line-height: 80px;
}

.pulse-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 3px solid #6366f1;
    border-radius: 50%;
    animation: pulseRing 1.5s ease-out infinite;
}

.pulse-ring.delay {
    animation-delay: 0.5s;
}

@keyframes pulseRing {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.ai-analyzing h3 {
    font-size: 18px;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.ai-analyzing > p {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 24px;
}

.analysis-steps {
    text-align: left;
}

.analysis-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 14px;
    color: var(--gray-500);
}

.analysis-step.active {
    color: #6366f1;
}

.analysis-step.complete {
    color: var(--success);
}

.analysis-step i {
    width: 20px;
    text-align: center;
}

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

/* Desktop/Tablet browser view - centered card look */
@media (min-width: 481px) {
    body:not(.pwa-standalone) {
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
        padding: 20px;
    }
    
    body:not(.pwa-standalone) #app {
        max-width: 390px;
        height: 844px;
        max-height: calc(100vh - 40px);
        border-radius: 40px;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
        overflow: hidden;
        border: 8px solid #2d2d2d;
    }
}

/* Small phones */
@media (max-width: 360px) {
    .ai-assistant-btn {
        padding: 14px 16px;
    }
    
    .ai-assistant-btn small {
        display: none;
    }
    
    .ai-suggestion-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .screen-header {
        padding: 14px 16px;
    }
    
    .screen-header h1 {
        font-size: 18px;
    }
}

/* iPhone X and newer (notch support) */
@supports (padding: max(0px)) {
    .screen-header {
        padding-top: max(16px, env(safe-area-inset-top));
    }
    
    .bottom-nav {
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }
    
    .ai-input-container {
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }
}

/* iPad / Tablet */
@media (min-width: 768px) and (max-width: 1024px) {
    body:not(.pwa-standalone) #app {
        max-width: 428px;
        height: 926px;
    }
}

/* =============================================
   TECHNICIAN MODE STYLES
   ============================================= */
.tech-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.tech-logo {
    width: 48px;
    height: 48px;
}

.tech-header-info h1 {
    font-size: 20px;
    color: var(--white);
    margin-bottom: 2px;
}

.tech-header-info .tech-name {
    font-size: 14px;
    color: var(--accent);
}

.tech-header-right {
    display: flex;
    gap: 12px;
}

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

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

.tech-stats-bar {
    display: flex;
    justify-content: space-around;
    background: var(--white);
    padding: 16px;
    box-shadow: var(--shadow);
}

.tech-stat-item {
    text-align: center;
}

.tech-stat-number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.tech-stat-label {
    font-size: 12px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tech-filter-tabs {
    display: flex;
    background: var(--white);
    padding: 12px;
    gap: 8px;
    border-bottom: 1px solid var(--gray-200);
    overflow-x: auto;
}

.tech-filter-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--gray-100);
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.tech-filter-tab:hover {
    background: var(--gray-200);
}

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

.tech-jobs-container {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

.tech-jobs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tech-job-card {
    background: var(--white);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
    border-left: 4px solid var(--accent);
}

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

.tech-job-card.emergency {
    border-left-color: var(--danger);
    background: linear-gradient(135deg, var(--white) 0%, #fef2f2 100%);
}

.tech-job-card.in_progress {
    border-left-color: #3b82f6;
}

.tech-job-card.completed {
    border-left-color: var(--success);
    opacity: 0.8;
}

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

.tech-job-ticket {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.tech-job-priority {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.tech-job-priority.emergency {
    background: #fee2e2;
    color: var(--danger);
}

.tech-job-priority.high {
    background: #fef3c7;
    color: #d97706;
}

.tech-job-priority.medium {
    background: #e0f2fe;
    color: #3b82f6;
}

.tech-job-issue {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.tech-job-description {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tech-job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--gray-500);
}

.tech-job-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tech-job-meta-item i {
    color: var(--accent);
}

.tech-loading,
.tech-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
}

.tech-loading i,
.tech-empty-state i {
    font-size: 48px;
    color: var(--gray-300);
    margin-bottom: 16px;
}

.tech-empty-state h3 {
    font-size: 18px;
    color: var(--gray-700);
    margin-bottom: 8px;
}

/* Tech Job Detail */
.tech-detail-section {
    margin-bottom: 24px;
}

.tech-detail-section h3 {
    font-size: 14px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tech-detail-section h3 i {
    color: var(--accent);
}

.tech-detail-card {
    background: var(--gray-50);
    padding: 16px;
    border-radius: 12px;
}

.tech-contact-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: 12px;
}

.tech-contact-avatar {
    width: 50px;
    height: 50px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 20px;
    flex-shrink: 0;
}

.tech-contact-info {
    flex: 1;
}

.tech-contact-name {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.tech-contact-detail {
    font-size: 14px;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.tech-contact-actions {
    display: flex;
    gap: 8px;
}

.tech-contact-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition);
}

.tech-contact-btn.call {
    background: var(--success);
    color: var(--white);
}

.tech-contact-btn.email {
    background: #3b82f6;
    color: var(--white);
}

.tech-contact-btn.map {
    background: #f59e0b;
    color: var(--white);
}

.tech-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-200);
}

.tech-detail-row:last-child {
    border-bottom: none;
}

.tech-detail-label {
    color: var(--gray-500);
    font-size: 14px;
}

.tech-detail-value {
    font-weight: 500;
    color: var(--gray-800);
    text-align: right;
}

.tech-action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding: 16px;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    position: sticky;
    bottom: 0;
}

.tech-action-buttons .btn-primary,
.tech-action-buttons .btn-secondary {
    flex: 1;
    padding: 14px;
    font-size: 15px;
}

/* Status Options */
.status-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.status-option-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.status-option-btn:hover {
    border-color: var(--accent);
    background: var(--white);
}

.status-option-btn i {
    font-size: 24px;
    color: var(--accent);
}

.status-option-btn strong {
    display: block;
    color: var(--gray-800);
}

.status-option-btn small {
    display: block;
    font-size: 13px;
    color: var(--gray-500);
    font-weight: normal;
}

.status-option-btn.complete i {
    color: var(--success);
}

.status-option-btn.complete:hover {
    border-color: var(--success);
}

/* =============================================
   PHASE 2: JOB DOCUMENTATION
   ============================================= */

.modal-large {
    width: 95%;
    max-width: 600px;
    max-height: 90vh;
}

.doc-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.doc-section:last-child {
    border-bottom: none;
}

.doc-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.doc-section h4 i {
    color: var(--accent);
}

.time-inputs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: var(--white);
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255,255,255,0.15);
}

.form-control::placeholder {
    color: rgba(255,255,255,0.5);
}

/* Parts Row */
.part-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    align-items: center;
}

.part-row .part-name {
    flex: 2;
}

.part-row .part-qty {
    flex: 0.5;
    text-align: center;
}

.part-row .part-cost {
    flex: 1;
}

.btn-icon-small {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
}

.btn-icon-small:hover {
    background: rgba(239, 68, 68, 0.3);
}

/* Photo Upload */
.photo-upload-area {
    display: flex;
    gap: 12px;
}

.photo-upload-box {
    flex: 1;
    padding: 24px;
    border: 2px dashed rgba(255,255,255,0.3);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.photo-upload-box:hover {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.1);
}

.photo-upload-box i {
    font-size: 32px;
    color: var(--accent);
    margin-bottom: 8px;
}

.photo-upload-box span {
    display: block;
    font-size: 14px;
    color: rgba(255,255,255,0.7);
}

.uploaded-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.uploaded-photo {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.uploaded-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.uploaded-photo .photo-type {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    font-size: 10px;
    padding: 2px;
    text-align: center;
}

.uploaded-photo .remove-photo {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(239, 68, 68, 0.9);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 10px;
    cursor: pointer;
}

/* Signature Area */
.signature-area {
    text-align: center;
}

#signatureCanvas {
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    touch-action: none;
    display: block;
    margin: 0 auto 12px;
    width: 100%;
    max-width: 300px;
}

/* Toggle Switch */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    width: 48px;
    height: 26px;
    background: rgba(255,255,255,0.2);
    border-radius: 13px;
    position: relative;
    transition: all 0.3s;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: all 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--accent);
}

.toggle-switch input:checked + .toggle-slider::after {
    left: 25px;
}

.toggle-label {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
}

/* Modal Footer */
.modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    justify-content: flex-end;
}

/* =============================================
   TECHNICIAN EARNINGS SCREEN
   ============================================= */

.earnings-summary {
    margin-bottom: 24px;
}

.earnings-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(79, 70, 229, 0.2));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.earnings-card.total {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    margin-bottom: 12px;
}

.earnings-card.total .earnings-icon {
    background: rgba(255,255,255,0.2);
}

.earnings-card.total .earnings-label,
.earnings-card.total .earnings-amount {
    color: white;
}

.earnings-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.earnings-icon {
    width: 50px;
    height: 50px;
    background: rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--accent);
}

.earnings-info {
    flex: 1;
}

.earnings-label {
    display: block;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 4px;
}

.earnings-amount {
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
}

.earnings-amount.small {
    font-size: 22px;
}

.earnings-history h3 {
    font-size: 16px;
    color: var(--white);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.earnings-history h3 i {
    color: var(--accent);
}

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

.earnings-item {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.earnings-item-info {
    flex: 1;
}

.earnings-item-ticket {
    font-weight: 600;
    color: var(--white);
    margin-bottom: 4px;
}

.earnings-item-date {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

.earnings-item-amount {
    font-size: 18px;
    font-weight: 700;
    color: #10b981;
}

.earnings-item-amount.pending {
    color: var(--warning);
}

.earnings-item-amount.paid {
    color: var(--success);
}

.earnings-empty {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255,255,255,0.5);
}

.earnings-empty i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Technician Nav Button for Earnings */
.tech-header-actions {
    display: flex;
    gap: 8px;
}

.btn-icon-earnings {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.2);
    border: none;
    color: #10b981;
    font-size: 18px;
    cursor: pointer;
}
