/* VehiLink User App Stylesheet (Mobile Mockup Layout & Light Theme Premium Dashboard) */

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: fixed;
    width: 100%;
}

body.app-body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: linear-gradient(135deg, #fdf2f8 0%, #f5e1fd 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* High Fidelity Phone Shell Container */
.phone-container {
    width: 375px;
    height: 812px;
    background: #ffffff;
    border-radius: 40px;
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.25), 0 0 0 12px #0f172a;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

/* Realistic Phone Mockup Shell Elements (Desktop Only) */
.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 24px;
    background: #0f172a;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    z-index: 20;
}

.phone-status-bar {
    height: 40px;
    padding: 12px 24px 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    background: transparent;
    z-index: 15;
    position: relative;
    user-select: none;
}

.phone-status-bar .status-icons {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* Phone Content Area (Scrollable internally) */
.phone-content {
    flex: 1;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

.phone-content::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

/* Bottom Swiper Home Indicator */
.phone-home-indicator {
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    z-index: 5;
    position: relative;
    padding-bottom: 8px;
    user-select: none;
}

.phone-home-indicator::after {
    content: '';
    width: 110px;
    height: 5px;
    background-color: #0f172a;
    border-radius: 10px;
}

/* Compact App Header */
.app-header-compact {
    height: 60px;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    background-color: #ffffff;
    z-index: 10;
    position: relative;
}

.app-header-compact .header-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 4px;
}

.app-header-compact .header-logo span {
    color: #ff0055;
}

.app-header-compact .header-page-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
    flex-grow: 1;
    margin: 0 10px;
}

.app-header-compact .header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-header-compact .notification-trigger {
    color: #64748b;
    font-size: 18px;
    position: relative;
    text-decoration: none;
}

.app-header-compact .notification-trigger .badge-dot {
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    background-color: #ff0055;
    border-radius: 50%;
    border: 1.5px solid #ffffff;
}

.app-header-compact .avatar-trigger {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 1.5px solid #ff0055;
    display: block;
}

/* Layout overrides */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    height: 100%;
}

.app-content {
    flex: 1;
    margin-left: 0 !important;
    padding: 16px 20px !important;
}

.app-sidebar, .app-topbar {
    display: none !important;
}

/* Navigation Overrides */
.app-bottom-nav {
    display: flex !important;
    position: relative;
    bottom: auto;
    left: auto;
    width: 100%;
    background-color: #ffffff;
    border-top: 1px solid #e2e8f0;
    z-index: 10;
    justify-content: space-around;
    padding: 10px 0 12px 0;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.02);
}

.app-bottom-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
}

.app-bottom-link.active {
    color: #ff0055;
}

.app-bottom-link i {
    font-size: 18px;
}

/* Dashboard Metric Stats Grid */
.app-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    margin-bottom: 24px !important;
}

.app-stat-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px !important;
    padding: 16px !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.015);
    transition: all 0.25s ease;
}

.app-stat-card:hover {
    transform: translateY(-2px) !important;
    border-color: rgba(255, 0, 85, 0.15) !important;
}

.app-stat-details h4 {
    font-size: 11px !important;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.app-stat-details .value {
    font-size: 20px !important;
    font-weight: 800;
    color: #0f172a;
}

.app-stat-icon {
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
    background-color: rgba(255, 0, 85, 0.06) !important;
    color: #ff0055 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px !important;
    border: 1px solid rgba(255, 0, 85, 0.1) !important;
}

/* Vehicles List Cards */
.vehicle-grid {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 20px !important;
}

.vehicle-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.015);
    transition: all 0.25s ease;
}

.vehicle-card:hover {
    transform: translateY(-4px) !important;
    border-color: rgba(255, 0, 85, 0.15) !important;
}

.vehicle-photo {
    height: 150px !important;
    background-color: #f1f5f9;
    background-size: cover;
    background-position: center;
    position: relative;
    border-bottom: 1px solid #e2e8f0;
}

.vehicle-details {
    padding: 20px !important;
    flex-grow: 1;
}

.vehicle-plate {
    display: inline-block;
    padding: 4px 10px !important;
    border: 1.5px solid #0f172a;
    border-radius: 6px;
    font-weight: 800;
    font-size: 13px !important;
    letter-spacing: 0.5px;
    background-color: #fef08a;
    color: #0f172a;
    margin-bottom: 12px !important;
}

.vehicle-meta {
    font-size: 13px !important;
    color: #64748b;
    margin-bottom: 16px !important;
}

.vehicle-qr-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
}

.qr-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.qr-linked {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.qr-unlinked {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* History logs list */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 16px !important;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.01);
    transition: all 0.25s ease;
}

.history-item:hover {
    border-color: rgba(255, 0, 85, 0.12);
}

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

.history-icon-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.history-title {
    font-weight: 700;
    font-size: 14px;
    color: #0f172a;
}

.history-desc {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.history-time {
    font-size: 11px;
    color: #94a3b8;
}

/* Settings Toggle Switches */
.toggle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.toggle-info h4 {
    font-size: 14px;
    margin-bottom: 2px;
    color: #0f172a;
}

.toggle-info p {
    font-size: 12px;
    color: #64748b;
}

/* Premium Form Elements */
.form-control {
    border-radius: 12px !important;
    padding: 12px 16px !important;
    border: 1.5px solid #e2e8f0 !important;
    background-color: #ffffff !important;
    color: #0f172a !important;
    font-size: 14px !important;
    outline: none !important;
    transition: all 0.25s ease !important;
    width: 100%;
}

.form-control:focus {
    border-color: #ff0055 !important;
    box-shadow: 0 0 0 3px rgba(255, 0, 85, 0.05) !important;
}

.btn-primary {
    background: linear-gradient(135deg, #ff0055 0%, #e11d48 100%) !important;
    color: #ffffff !important;
    border-radius: 30px !important;
    font-weight: 700 !important;
    padding: 12px 24px !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(255, 0, 85, 0.2) !important;
    transition: all 0.25s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    font-family: 'Outfit', sans-serif !important;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(255, 0, 85, 0.3) !important;
}

/* Styled Switch Toggle */
.switch-toggle {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
}

.switch-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 20px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .switch-slider {
    background-color: #ff0055;
}

input:checked + .switch-slider:before {
    transform: translateX(18px);
}

/* Responsive overrides (Hide mockup elements and fit full screen on mobile devices) */
@media (max-width: 480px) {
    body.app-body {
        padding: 0;
        background: #ffffff;
    }
    .phone-container {
        width: 100%;
        height: 100%;
        border-radius: 0;
        box-shadow: none;
        border: none;
    }
    .phone-notch,
    .phone-status-bar,
    .phone-home-indicator {
        display: none !important;
    }
    .app-header-compact {
        border-radius: 0;
    }
}
