:root {
    --mobile-brand: #6366f1;
    --mobile-brand-dark: #4f46e5;
    --mobile-brand-light: #eef2ff;
    --mobile-surface: #f8fafc;
    --mobile-dark: #0f172a;
    --mobile-dark-2: #1e293b;
}

* { -webkit-tap-highlight-color: transparent; }

.mobile-shell {
    min-height: 100dvh;
    background: var(--mobile-dark);
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
    color: #1e293b;
}

.pb-mobile-nav {
    padding-bottom: calc(4.75rem + env(safe-area-inset-bottom));
}

/* Header */
.mobile-header {
    color: #fff;
}

.mobile-header-sub {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.01em;
}

.mobile-header-user {
    color: #fff;
    font-size: 1rem;
    line-height: 1.3;
}

.mobile-header .btn-link {
    color: rgba(255, 255, 255, 0.55) !important;
    text-decoration: underline;
    font-size: 0.75rem;
}

/* Hero zone (dark) */
.mobile-hero {
    padding: 0 1rem 0.5rem;
}

.mobile-welcome-card {
    background: var(--mobile-brand);
    color: #fff;
    border-radius: 1rem;
    padding: 1rem 1.1rem;
    box-shadow: 0 10px 28px rgba(99, 102, 241, 0.35);
    margin-bottom: 0.75rem;
}

.mobile-welcome-card .welcome-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 0.15rem;
}

.mobile-welcome-card .welcome-name {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.1rem;
}

.mobile-welcome-card .welcome-code {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Clock card */
.mobile-clock-card {
    background: #0f172a;
    color: #fff;
    border-radius: 1rem;
    padding: 1rem 1.1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    margin-bottom: 0;
}

.mobile-clock-card .clock-label {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-bottom: 0.15rem;
}

.mobile-live-clock {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.mobile-clock-date {
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: capitalize;
}

.mobile-clock-shift {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    color: #fff;
    white-space: nowrap;
}

.mobile-btn-clock-in {
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    padding: 0.45rem 1.1rem;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.mobile-btn-clock-out {
    background: #fff;
    color: #0f172a;
    border: none;
    border-radius: 0.5rem;
    padding: 0.45rem 1.1rem;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Content sheet */
.mobile-sheet {
    background: var(--mobile-surface);
    border-radius: 1.25rem 1.25rem 0 0;
    padding: 1rem 1rem 0.5rem;
    margin-top: 0.75rem;
    min-height: 40vh;
}

.mobile-sheet--standalone {
    margin-top: 0;
    border-radius: 1.25rem 1.25rem 0 0;
    padding-top: 1.25rem;
    min-height: calc(100dvh - 5rem);
}

.mobile-section {
    background: #fff;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.mobile-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.mobile-section__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.mobile-section__title svg {
    color: var(--mobile-brand);
    flex-shrink: 0;
}

.mobile-section__count {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

.mobile-btn-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    background: var(--mobile-brand);
    color: #fff;
    border: none;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.85rem;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.28);
    text-decoration: none;
}

.mobile-btn-cta:hover,
.mobile-btn-cta:active {
    color: #fff;
    background: var(--mobile-brand-dark);
}

.mobile-btn-cta--outline {
    background: transparent;
    color: var(--mobile-brand);
    border: 2px dashed #c7d2fe;
    background: var(--mobile-brand-light);
    box-shadow: none;
}

.mobile-list-link {
    display: block;
    padding: 0.85rem 0.5rem;
    margin: 0 -0.5rem;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: inherit;
    border-radius: 0.75rem;
    transition: background 0.15s;
}

.mobile-list-link:last-child {
    border-bottom: none;
}

.mobile-list-link:active {
    background: #f8fafc;
}

.mobile-list-link__title {
    font-weight: 500;
    font-size: 0.9rem;
    color: #1e293b;
    margin-bottom: 0;
}

.mobile-list-link__meta {
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 0.2rem;
    margin-bottom: 0;
}

.mobile-list-link__hint {
    font-size: 0.68rem;
    color: var(--mobile-brand);
    font-weight: 500;
    margin-top: 0.4rem;
    margin-bottom: 0;
}

.mobile-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
}

.mobile-badge--success { background: #d1fae5; color: #065f46; }
.mobile-badge--warning { background: #fef3c7; color: #92400e; }
.mobile-badge--info { background: #dbeafe; color: #1e40af; }
.mobile-badge--danger { background: #fee2e2; color: #991b1b; }

.mobile-empty {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
}

.mobile-stat-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.mobile-stat-mini {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.mobile-stat-mini span { font-size: 0.7rem; color: #64748b; }
.mobile-stat-mini strong { font-size: 1.1rem; }

.mobile-card--warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 1rem;
    padding: 1rem;
    color: #92400e;
    font-size: 0.85rem;
}

/* Bottom nav */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    padding: 0.35rem 0;
    padding-bottom: calc(0.35rem + env(safe-area-inset-bottom));
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    padding: 0.2rem 0.35rem;
    min-width: 0;
    flex: 1;
    max-width: 4.5rem;
    font-size: 0.58rem;
    line-height: 1.15;
    color: #64748b;
    text-decoration: none;
    text-align: center;
}

.mobile-nav-item svg {
    width: 1.35rem;
    height: 1.35rem;
    flex-shrink: 0;
}

.mobile-nav-item--active {
    color: var(--mobile-brand);
    font-weight: 600;
}

.mobile-nav-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* Alerts in sheet */
.mobile-sheet .alert {
    border-radius: 0.75rem;
    font-size: 0.8rem;
}

/* Clock modal bottom sheet */
.mobile-clock-modal .modal-dialog {
    margin: 0;
    max-width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
}

.mobile-clock-modal .modal-content {
    border-radius: 1rem 1rem 0 0;
    border: none;
    padding-bottom: env(safe-area-inset-bottom);
}

@media (min-width: 576px) {
    .mobile-clock-modal .modal-dialog {
        position: relative;
        margin: 1rem auto;
        max-width: 28rem;
    }
    .mobile-clock-modal .modal-content {
        border-radius: 1rem;
    }
}

/* Login */
.mobile-login-shell {
    min-height: 100dvh;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 55%, #f8fafc 55%);
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

.mobile-login-hero {
    min-height: 38vh;
    padding-bottom: 2rem !important;
}

.mobile-login-brand {
    font-size: 0.875rem;
    color: #94a3b8;
}

.mobile-login-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.25;
}

.mobile-login-subtitle {
    font-size: 0.875rem;
    color: #cbd5e1;
    line-height: 1.45;
}

.mobile-login-card {
    background: #fff;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    padding: 1.5rem;
    margin: -0.5rem 1rem 1.5rem;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.1);
    max-width: 28rem;
}

@media (min-width: 480px) {
    .mobile-login-card {
        margin-left: auto;
        margin-right: auto;
    }
}

.mobile-login-error {
    color: #dc2626;
    font-size: 0.875rem;
    line-height: 1.4;
}

.mobile-login-error p::before {
    content: "• ";
}

.mobile-login-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
    margin-bottom: 0.35rem;
}

.mobile-login-input {
    display: block;
    width: 100%;
    min-height: 2.75rem;
    padding: 0.625rem 0.875rem;
    font-size: 1rem;
    color: #1e293b;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 0.5rem;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.mobile-login-input:focus {
    border-color: var(--mobile-brand);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: #fff;
}

.mobile-login-remember .form-check-label {
    font-size: 0.875rem;
    color: #64748b;
}

.mobile-login-remember .form-check-input:checked {
    background-color: var(--mobile-brand);
    border-color: var(--mobile-brand);
}

.mobile-login-btn {
    display: block;
    width: 100%;
    min-height: 2.75rem;
    padding: 0.65rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: var(--mobile-brand);
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
    cursor: pointer;
}

.mobile-login-btn:hover,
.mobile-login-btn:active {
    background: var(--mobile-brand-dark);
    color: #fff;
}

.mobile-login-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
}

.mobile-login-footer a {
    color: var(--mobile-brand);
    font-weight: 500;
    text-decoration: none;
}

.mobile-login-footer a:hover {
    text-decoration: underline;
}

.clock-submit-btn:disabled { opacity: 0.65; }

.mobile-list-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
}

.mobile-qr-reader {
    background: #0f172a;
    border-radius: 0.75rem;
    min-height: 280px;
    overflow: hidden;
}

.mobile-qr-reader video {
    border-radius: 0.75rem;
}
