:root {
    --ios-blue: #007aff;
    --ios-green: #34c759;
    --ios-orange: #ff9500;
    --ios-red: #ff3b30;
    --ios-purple: #af52de;
    --ios-bg: #f2f2f7;
    --ios-card: #ffffff;
    --ios-text: #000000;
    --ios-text-dim: #8e8e93;
    --app-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

body {
    background-color: var(--ios-bg);
    color: var(--ios-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* System Bar */
.system-bar {
    height: 44px;
    padding: 0 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
    background: rgba(242, 242, 247, 0.8);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0; width: 100%;
    z-index: 10001;
}

/* App Bottom Dock */
.app-dock {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 400px;
    height: 80px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(30px) saturate(180%);
    border-radius: 35px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    z-index: 10000;
    border: 1px solid rgba(255,255,255,0.4);
}

.dock-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    text-decoration: none;
    transition: transform 0.2s;
}

.dock-icon:active { transform: scale(0.9); }

/* App Content Headers */
.app-header {
    padding: 60px 25px 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.app-header h1 { font-size: 34px; font-weight: 800; margin: 0; }
.app-header p { color: var(--ios-text-dim); margin: 5px 0 0; font-weight: 500; }

/* Widget Styles */
.app-card {
    background: var(--ios-card);
    border-radius: 20px;
    padding: 20px;
    margin: 0 20px 20px;
    box-shadow: var(--app-shadow);
    border: 1px solid rgba(0,0,0,0.02);
}

/* Large App Card */
.app-card-lg {
    background: var(--ios-card);
    border-radius: 30px;
    overflow: hidden;
    margin: 0 20px 20px;
    box-shadow: var(--app-shadow);
}

.app-card-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.app-card-content {
    padding: 25px;
}

.btn-ios {
    background: var(--ios-blue);
    color: white;
    width: 100%;
    padding: 16px;
    border-radius: 15px;
    text-align: center;
    font-weight: 700;
    text-decoration: none;
    display: block;
    margin-top: 20px;
}

/* App Grid Layout */
.app-widget {
    background: var(--ios-card);
    border-radius: 24px;
    padding: 20px;
    box-shadow: var(--app-shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 160px;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(0,0,0,0.02);
}

.widget-full { grid-column: span 2; }

.widget-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 20px;
    color: white;
}

/* List Styles (For Fleet/Tracking) */
.app-list-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #e5e5ea;
    text-decoration: none;
    color: inherit;
}

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

.list-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

/* Map specific */
#trackingMap {
    height: calc(100vh - 200px);
    width: 100%;
    border-radius: 30px;
    margin-top: 10px;
}

/* Forms (Login) */
.ios-input {
    background: #e9e9eb;
    border: none;
    border-radius: 12px;
    padding: 15px;
    width: 100%;
    margin-bottom: 15px;
    font-weight: 500;
}

.ios-btn-primary {
    background: var(--ios-blue);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 15px;
    width: 100%;
    font-weight: 700;
    font-size: 17px;
}

/* Badges */
.ios-badge {
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}

.badge-green { background: rgba(52, 199, 89, 0.1); color: var(--ios-green); }
.badge-orange { background: rgba(255, 149, 0, 0.1); color: var(--ios-orange); }

/* Utility Classes */
.fw-800 { font-weight: 800 !important; }
.tracking-tighter { letter-spacing: -1.5px; }
.tracking-widest { letter-spacing: 2px; }

/* Grid */
.app-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; padding: 0 20px 20px; }

/* Premium Animations */
[data-aos] { pointer-events: none; }
.aos-animate { pointer-events: auto; }

.shadow-glow { box-shadow: 0 0 20px var(--ios-blue); }

@media (min-width: 992px) {
    .main-wrapper { max-width: 1200px; margin: 0 auto; }
}
