/* 
 * ERCP Mobile — Mega Elevadores Brand Theme
 * Navy: #1a3a6e | Orange: #e87722
 */

:root {
    --mobile-bg:      #0c1829;
    --mobile-card:    rgba(26, 58, 110, 0.28);
    --mobile-border:  rgba(232, 119, 34, 0.18);
    --mobile-accent:  #e87722;
    --mobile-success: #10b981;
    --mobile-warning: #f59e0b;
    --mobile-danger:  #ef4444;
    --mobile-navy:    #1a3a6e;
    --bottom-nav-height: 70px;
    --top-bar-height:    60px;
}

body.mobile-theme {
    background: var(--mobile-bg);
    color: #f8fafc;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* Header */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--top-bar-height);
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--mobile-border);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-title {
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sync-indicator {
    color: var(--mobile-success);
    font-size: 1.1rem;
    opacity: 0.8;
}

.avatar-small {
    width: 32px;
    height: 32px;
    background: var(--mobile-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--mobile-border);
}

/* Main Content Area */
.mobile-main {
    margin-top: var(--top-bar-height);
    margin-bottom: var(--bottom-nav-height);
    padding: 1.25rem;
    min-height: calc(100vh - var(--top-bar-height) - var(--bottom-nav-height));
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--mobile-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s ease;
    flex: 1;
}

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

.nav-item span {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.nav-item.active i {
    transform: translateY(-2px);
    text-shadow: 0 0 12px rgba(232, 119, 34, 0.6);
    filter: drop-shadow(0 0 6px rgba(232,119,34,0.5));
}

/* Cards & Components */
.mobile-card {
    background: var(--mobile-card);
    border: 1px solid var(--mobile-border);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.stat-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--mobile-border);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--mobile-accent);
}

.stat-label {
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 600;
}

/* Quick Actions Scroll */
.quick-action {
    background: var(--mobile-card);
    border: 1px solid var(--mobile-border);
    border-radius: 16px;
    padding: 1rem;
    min-width: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}
.quick-action i {
    font-size: 1.5rem;
    color: var(--mobile-accent);
}
.quick-action span {
    font-size: 0.75rem;
    font-weight: 600;
    color: #f8fafc;
}
.quick-action:active {
    transform: scale(0.95);
    background: rgba(255,255,255,0.05);
}

/* Task / Order Items */
.order-list-item {
    background: var(--mobile-card);
    border: 1px solid var(--mobile-border);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.order-icon {
    width: 44px;
    height: 44px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--mobile-accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.order-info {
    flex: 1;
    min-width: 0;
}

.order-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-subtitle {
    font-size: 0.75rem;
    color: #94a3b8;
}

.order-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-weight: 700;
}

/* Auth / Login specific */
.mobile-auth-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.15), transparent),
                radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.05), transparent);
}

.auth-hero {
    text-align: center;
    margin-bottom: 3rem;
}

.auth-hero i {
    font-size: 3.5rem;
    color: var(--mobile-accent);
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.4));
}

.auth-hero h1 {
    font-weight: 800;
    font-size: 2rem;
    margin: 0;
}

.auth-hero p {
    color: #94a3b8;
    margin-top: 0.5rem;
}

.mobile-form-group {
    margin-bottom: 1.25rem;
}

.mobile-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--mobile-border);
    padding: 1.1rem 1.25rem;
    border-radius: 14px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

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

.btn-mobile-primary {
    width: 100%;
    background: var(--mobile-accent);
    color: white;
    border: none;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 800;
    margin-top: 1rem;
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    line-height: 1.2;
    text-align: center;
    letter-spacing: 0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn-mobile-primary:active {
    transform: scale(0.97);
    opacity: 0.9;
}

/* AST / Safety button variant */
.btn-mobile-primary.btn-ast {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 10px 15px -3px rgba(245, 158, 11, 0.35);
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    white-space: normal;
    line-height: 1.25;
}

/* Actions footer layout */
.actions-footer .btn-mobile-primary {
    margin-top: 0;
    flex: 1;
}

/* Premium Mobile UI Overrides */
body.mobile-theme {
    background-color: #0c1829 !important;
    background-image: 
        radial-gradient(ellipse at 0% 0%,   rgba(26, 58, 110, 0.6), transparent 50%) !important,
        radial-gradient(ellipse at 100% 80%, rgba(232, 119, 34, 0.12), transparent 45%) !important;
}

.mobile-theme .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    transition: all 0.2s ease !important;
    border: none !important;
    gap: 0.5rem !important;
    cursor: pointer !important;
    box-shadow: none !important;
}

.mobile-theme .btn:active {
    transform: scale(0.96) !important;
}

.mobile-theme .form-control {
    width: 100% !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid var(--mobile-border) !important;
    padding: 0.85rem 1.1rem !important;
    border-radius: 12px !important;
    color: white !important;
    font-size: 0.9rem !important;
    outline: none !important;
    transition: all 0.2s !important;
    box-shadow: none !important;
}

.mobile-theme .form-control:focus {
    border-color: var(--mobile-accent) !important;
    background: rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

.mobile-theme select.form-control {
    appearance: none !important;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E") !important;
    background-position: right 0.75rem center !important;
    background-repeat: no-repeat !important;
    background-size: 1.25rem auto !important;
    padding-right: 2.5rem !important;
}

/* Scrollbars styling */
.mobile-theme ::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}
.mobile-theme ::-webkit-scrollbar-track {
    background: transparent;
}
.mobile-theme ::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

