@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-color: #0b2a4a;
    --primary-light: #163f69;
    --accent-color: #ff9f29;
    --accent-hover: #e08b1b;
    --bg-color: #f4f6fc;
    --card-bg: #ffffff;
    --text-color: #2b3a4a;
    --text-muted: #7d8c9d;
    --border-color: #e5e9f2;
    --success-color: #2ec4b6;
    --danger-color: #e71d36;
    --shadow-sm: 0 2px 8px rgba(11, 42, 74, 0.04);
    --shadow-md: 0 8px 24px rgba(11, 42, 74, 0.08);
    --shadow-lg: 0 16px 36px rgba(11, 42, 74, 0.12);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #e2e8f0;
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Mobile Viewport Wrapper */
.mobile-container {
    width: 100%;
    max-width: 480px;
    height: 100vh;
    max-height: 920px;
    background-color: var(--bg-color);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 0;
}

@media (min-width: 481px) {
    .mobile-container {
        border-radius: 28px;
        height: 85vh;
        max-height: 880px;
        border: 8px solid #1e293b;
    }
}

/* Custom Scrollbar */
.mobile-container::-webkit-scrollbar {
    width: 5px;
}
.mobile-container::-webkit-scrollbar-track {
    background: transparent;
}
.mobile-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* Typography & Layout Utilities */
a {
    color: inherit;
    text-decoration: none;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
}

/* App Header Styling */
.app-header {
    background-color: var(--card-bg);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-logo {
    height: 28px;
}

.header-icon {
    font-size: 22px;
    color: var(--primary-color);
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--bg-color);
}

.header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-color);
}

.badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background-color: var(--danger-color);
    color: white;
    font-size: 9px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* Main Content Area */
.content-body {
    flex: 1;
    padding: 20px;
    padding-bottom: 80px; /* space for float button/footer */
}

/* Onboarding Screen */
.onboarding-screen {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px 24px;
    background-color: var(--card-bg);
}

.onboarding-illustration {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
}

.illustration-img {
    max-width: 80%;
    max-height: 250px;
    object-fit: contain;
    margin-bottom: 30px;
}

.dot-indicators {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--border-color);
}

.dot.active {
    width: 24px;
    border-radius: 4px;
    background-color: var(--accent-color);
}

.onboarding-text {
    text-align: center;
    margin-bottom: 40px;
}

.onboarding-text h1 {
    font-size: 26px;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 12px;
}

.onboarding-text p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.5;
}

.onboarding-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

/* Auth Screens */
.auth-container {
    padding: 30px 24px;
    background-color: var(--card-bg);
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-logo-section {
    text-align: center;
    margin-bottom: 36px;
}

.auth-logo-section img {
    height: 40px;
    margin-bottom: 16px;
}

.auth-logo-section p {
    color: var(--text-muted);
    font-size: 14px;
}

.auth-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.auth-card h2 {
    font-size: 20px;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 18px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 6px;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 16px;
}

.form-input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-color);
    background-color: var(--bg-color);
    outline: none;
    transition: var(--transition);
}

.form-input:focus {
    border-color: var(--accent-color);
    background-color: var(--card-bg);
}

.password-toggle {
    position: absolute;
    right: 14px;
    color: var(--text-muted);
    cursor: pointer;
}

.form-links {
    display: flex;
    justify-content: flex-end;
    margin-top: -10px;
    margin-bottom: 20px;
}

.form-link {
    font-size: 13px;
    color: var(--accent-color);
    font-weight: 500;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--accent-color);
    font-weight: 600;
}

.role-selector {
    display: flex;
    background-color: var(--bg-color);
    padding: 4px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.role-tab {
    flex: 1;
    text-align: center;
    padding: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: 8px;
    transition: var(--transition);
}

.role-tab.active {
    background-color: var(--card-bg);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

/* Buttons */
.btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

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

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

.btn-outline {
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    background-color: var(--card-bg);
}

.btn-outline:hover {
    background-color: var(--bg-color);
}

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

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

.btn-google {
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    color: var(--text-color);
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    margin: 20px 0;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider:not(:empty)::before {
    margin-right: .5em;
}

.divider:not(:empty)::after {
    margin-left: .5em;
}

/* Home / Dashboard View */
.greeting-section {
    margin-bottom: 20px;
}

.greeting-section h2 {
    font-size: 22px;
    color: var(--primary-color);
    font-weight: 700;
}

.greeting-section p {
    font-size: 14px;
    color: var(--text-muted);
}

.search-section {
    margin-bottom: 20px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    outline: none;
    font-size: 14px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-md);
}

.search-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    font-size: 18px;
}

/* Promo Banner */
.promo-card {
    background: linear-gradient(135deg, var(--accent-color) 0%, #ff8c00 100%);
    border-radius: 20px;
    padding: 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.promo-info {
    z-index: 2;
    max-width: 60%;
}

.promo-badge {
    background-color: rgba(255,255,255,0.2);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 8px;
}

.promo-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 6px;
    line-height: 1.2;
}

.promo-desc {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 12px;
}

.promo-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    display: inline-block;
}

.promo-image {
    position: absolute;
    right: 0;
    bottom: -10px;
    height: 120%;
    z-index: 1;
    opacity: 0.85;
}

/* Service Category Grid */
.section-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-title {
    font-size: 16px;
    color: var(--primary-color);
    font-weight: 700;
}

.section-link {
    font-size: 13px;
    color: var(--accent-color);
    font-weight: 600;
}

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

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.category-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background-color: #eaf1f8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: var(--transition);
    color: var(--primary-color);
}

.category-item:hover .category-icon-box {
    transform: translateY(-4px);
    background-color: var(--primary-color);
    color: white;
}

.category-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-color);
}

/* Recommended Technician Card */
.technician-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    gap: 14px;
    margin-bottom: 14px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.tech-photo {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
}

.tech-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tech-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.tech-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-color);
}

.tech-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    background-color: #fff9e6;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #e08b1b;
}

.tech-rating-icon {
    font-size: 11px;
}

.tech-specialty {
    font-size: 12px;
    color: var(--text-muted);
    margin: 2px 0 6px 0;
}

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

.tech-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
}

.tech-price span {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}

.btn-book-sm {
    background-color: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
}

/* Floating Elements */
.float-wa-btn {
    position: absolute;
    right: 20px;
    bottom: 20px;
    width: 50px;
    height: 50px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    z-index: 99;
    cursor: pointer;
    transition: var(--transition);
}

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

/* Bottom Navigation Bar */
.bottom-nav {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    height: 64px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: sticky;
    bottom: 0;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
}

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

.nav-item-icon {
    font-size: 20px;
}

/* Profile Screen Styling */
.profile-header-card {
    background-color: var(--primary-color);
    color: white;
    padding: 30px 20px;
    text-align: center;
    border-radius: 0 0 24px 24px;
    margin-bottom: 24px;
    position: relative;
}

.profile-avatar-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 12px auto;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent-color);
}

.profile-name {
    font-size: 18px;
    font-weight: 700;
}

.profile-email {
    font-size: 13px;
    opacity: 0.8;
    margin-top: 2px;
}

.profile-badge {
    background-color: var(--accent-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
    margin-top: 6px;
}

.profile-section-list {
    background-color: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.profile-section-item {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    font-weight: 500;
}

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

.profile-section-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-section-icon {
    font-size: 18px;
    color: var(--primary-color);
}

.profile-section-arrow {
    color: var(--text-muted);
}

/* Technician Detail Profile */
.tech-detail-card {
    background-color: var(--card-bg);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.tech-detail-header {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

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

.tech-detail-info h2 {
    font-size: 18px;
    color: var(--primary-color);
    font-weight: 700;
}

.tech-stats {
    display: flex;
    gap: 16px;
    margin: 16px 0;
}

.tech-stat-box {
    flex: 1;
    background-color: var(--bg-color);
    padding: 10px;
    border-radius: 10px;
    text-align: center;
}

.tech-stat-val {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
}

.tech-stat-lbl {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Booking calendar */
.calendar-container {
    margin: 20px 0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.calendar-header-day {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    cursor: pointer;
    position: relative;
}

.calendar-day.disabled {
    background-color: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
    text-decoration: line-through;
}

.calendar-day.selected {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.calendar-day.busy {
    border: 1.5px solid var(--danger-color);
    background-color: #fee2e2;
    color: var(--danger-color);
    cursor: not-allowed;
}

.calendar-day.busy::after {
    content: 'Full';
    font-size: 8px;
    position: absolute;
    bottom: 2px;
    font-weight: 700;
}

/* Timeline status tracker */
.tracking-container {
    background-color: var(--card-bg);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.tracking-status-header {
    text-align: center;
    margin-bottom: 24px;
}

.tracking-status-header h2 {
    font-size: 18px;
    color: var(--primary-color);
}

.tracking-status-header p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
}

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

.timeline-badge {
    position: absolute;
    left: -32px;
    top: 2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: var(--border-color);
    border: 4px solid var(--card-bg);
    z-index: 2;
}

.timeline-item.active .timeline-badge {
    background-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(255, 159, 41, 0.2);
}

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

.timeline-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
}

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

.timeline-item.completed .timeline-title {
    color: var(--text-color);
}

.timeline-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Chat Screen */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 65px); /* viewport minus header */
}

@media (min-width: 481px) {
    .chat-container {
        height: calc(85vh - 75px);
    }
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: var(--bg-color);
}

.message-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 13.5px;
    line-height: 1.4;
    word-break: break-word;
}

.message-bubble.incoming {
    align-self: flex-start;
    background-color: var(--card-bg);
    color: var(--text-color);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border-color);
}

.message-bubble.outgoing {
    align-self: flex-end;
    background-color: var(--primary-color);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-time {
    font-size: 9px;
    opacity: 0.7;
    margin-top: 4px;
    text-align: right;
}

.chat-input-bar {
    background-color: var(--card-bg);
    padding: 12px 16px;
    display: flex;
    gap: 10px;
    align-items: center;
    border-top: 1px solid var(--border-color);
}

.chat-input {
    flex: 1;
    padding: 10px 16px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    outline: none;
    font-size: 13.5px;
}

.chat-send-btn {
    width: 36px;
    height: 36px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* Order Cards for lists */
.order-list-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.order-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.order-id {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
}

.order-badge-status {
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
}

.order-badge-status.pending { background-color: #fff3cd; color: #856404; }
.order-badge-status.accepted { background-color: #cce5ff; color: #004085; }
.order-badge-status.ongoing { background-color: #d1ecf1; color: #0c5460; }
.order-badge-status.completed { background-color: #d4edda; color: #155724; }
.order-badge-status.cancelled { background-color: #f8d7da; color: #721c24; }

.order-list-body {
    display: flex;
    gap: 12px;
}

.order-list-body img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
}

.order-list-details {
    flex: 1;
}

.order-list-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
}

.order-list-date {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.order-list-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-color);
    margin-top: 4px;
}

/* Alert Notification Banner */
.alert-banner {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-banner.danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Admin Styles */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.admin-stat-card {
    background-color: var(--card-bg);
    border-radius: 14px;
    padding: 16px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.admin-stat-number {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary-color);
}

.admin-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}
