* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    background: #eef3f8;
    color: #101828;
}

body {
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.mobile-shell,
.app,
.app-shell {
    width: 100%;
    max-width: 520px;
    min-height: 100vh;
    margin: 0 auto;
    background: #f8fafc;
    padding-bottom: 104px;
}

.mobile-header,
.top-header,
.header {
    background: linear-gradient(135deg, #123c88, #0ea5e9);
    color: #fff;
    padding: 24px 18px 34px;
    border-bottom-left-radius: 28px;
    border-bottom-right-radius: 28px;
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.18);
}

.mobile-header h1,
.mobile-header h2,
.mobile-header h3,
.top-header h3,
.header h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.18;
    letter-spacing: 0;
}

.mobile-header p,
.top-header p,
.header p {
    margin: 7px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

.avatar,
.profile-avatar {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: #fff;
    color: #2563eb;
    font-weight: 900;
}

.profile-avatar {
    width: 90px;
    height: 90px;
    margin: 0 auto 14px;
    border-radius: 28px;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    color: #fff;
    font-size: 40px;
}

.content,
.mobile-content {
    padding: 16px;
}

.premium-card,
.card,
.section-card,
.visitor-card,
.request-card,
.profile-card,
.list-card,
.welcome-card {
    background: #fff;
    margin: 16px;
    padding: 18px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 20px;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.content .premium-card,
.content .card,
.content .section-card,
.content .visitor-card,
.content .request-card,
.content .profile-card,
.content .list-card,
.content .welcome-card {
    margin: 0 0 16px;
}

.welcome-card {
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    color: #fff;
}

.premium-card h3,
.card h3,
.section-card h3 {
    margin: 0 0 14px;
    font-size: 18px;
}

label {
    display: block;
    margin: 14px 0 8px;
    color: #344054;
    font-size: 13px;
    font-weight: 800;
}

input,
select,
textarea {
    width: 100%;
    min-height: 52px;
    border: 1px solid #d7e0ea;
    border-radius: 16px;
    padding: 0 14px;
    outline: none;
    background: #f8fafc;
    color: #101828;
    font-size: 15px;
}

textarea {
    min-height: 104px;
    padding-top: 13px;
    resize: vertical;
}

input[type="file"] {
    padding: 13px;
    background: #fff;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.btn,
.btn-primary,
.btn-green,
.btn-warning,
.logout,
.logout-btn {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 16px;
    padding: 0 16px;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
    text-align: center;
}

.btn,
.btn-primary {
    width: 100%;
    margin-top: 16px;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    box-shadow: 0 14px 26px rgba(37, 99, 235, 0.22);
}

.btn-green,
.green,
.btn-warning,
.orange,
.red,
.danger,
.blue,
.purple,
.dark {
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.btn:disabled,
.btn-primary:disabled,
.is-disabled,
.disabled {
    opacity: 0.72;
    cursor: not-allowed;
}

.alert {
    padding: 13px 15px;
    border-radius: 16px;
    margin: 16px;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.4;
    text-align: center;
}

.alert.success,
.success {
    background: #dcfce7;
    color: #166534;
}

.alert.error,
.error {
    background: #fee2e2;
    color: #991b1b;
}

.stats-grid,
.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 16px;
}

.stat-card,
.stat {
    min-height: 116px;
    padding: 17px;
    border-radius: 20px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #06b6d4) !important;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.16);
}

.stat-card span,
.stat span {
    display: block;
    min-height: 32px;
    font-size: 13px;
    line-height: 1.25;
    opacity: 0.88;
}

.stat-card h2,
.stat h2 {
    margin: 10px 0 0;
    font-size: 30px;
}

.quick-actions,
.actions {
    display: grid;
    gap: 11px;
}

.quick-actions a,
.actions a {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #e5edf5;
    border-radius: 16px;
    padding: 0 14px;
    background: #f8fafc;
    color: #101828;
    font-weight: 900;
}

.quick-actions a::after,
.actions a::after {
    content: "›";
    color: #667085;
    font-size: 24px;
    line-height: 1;
}

.search-row,
.search-box {
    display: grid;
    grid-template-columns: 1fr 112px;
    gap: 10px;
    align-items: end;
}

.search-row .btn,
.search-box .btn-primary {
    width: 100%;
    margin-top: 0;
}

.visitor-box,
.visitor,
.list-card {
    display: flex;
    gap: 13px;
    align-items: center;
}

.visitor-img,
.visitor img,
.list-card img,
.mini-avatar {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 18px;
    object-fit: cover;
    background: #e2e8f0;
}

.badge,
.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 0 10px;
    background: #e0f2fe;
    color: #155e75;
    font-size: 12px;
    font-weight: 900;
}

.row,
.info-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid #e5e7eb;
}

.row span,
.info-row span {
    color: #667085;
}

.row b,
.info-row b {
    text-align: right;
}

.note,
.upload-status {
    margin-top: 7px;
    color: #667085;
    font-size: 12px;
    line-height: 1.4;
}

.upload-status.is-success {
    color: #166534;
}

.upload-status.is-error {
    color: #991b1b;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.56);
    z-index: 1000;
}

.modal-backdrop.is-open {
    display: flex;
}

.modal-panel {
    width: 100%;
    max-width: 430px;
    border-radius: 22px;
    background: #fff;
    padding: 18px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.32);
}

.modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.bottom-nav,
.nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    z-index: 999;
    display: grid;
    width: 100%;
    max-width: 520px;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 9px 8px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid #e6edf3;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -14px 30px rgba(15, 23, 42, 0.08);
    transform: translateX(-50%);
    backdrop-filter: blur(14px);
}

.bottom-nav a,
.nav a {
    display: grid;
    min-width: 0;
    min-height: 54px;
    place-items: center;
    border-radius: 16px;
    color: #667085;
    font-size: 12px;
    font-weight: 800;
}

.bottom-nav a.active,
.nav a.active {
    background: #eff6ff;
    color: #2563eb;
}

.bottom-nav span,
.nav span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.1;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-icon {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    margin-bottom: 2px;
    color: inherit;
}

.nav-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 2.2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.masked-mobile {
    letter-spacing: 0;
}

.blur-doc {
    filter: blur(9px);
    transform: scale(1.01);
}

.profile-message {
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    color: #fff;
    margin: 16px;
    padding: 18px;
    border-radius: 20px;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.16);
}

.profile-message h3 {
    margin: 0 0 6px;
    font-size: 19px;
}

.profile-message p {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
}

.empty-state,
.empty {
    padding: 24px;
    border-radius: 18px;
    background: #fff;
    color: #667085;
    text-align: center;
}

@media (max-width: 480px) {
    .mobile-shell,
    .app,
    .app-shell {
        max-width: 100%;
    }

    .premium-card,
    .card,
    .section-card,
    .visitor-card,
    .request-card,
    .profile-card,
    .list-card,
    .welcome-card {
        margin: 14px;
        border-radius: 18px;
    }

    .search-row,
    .search-box {
        grid-template-columns: 1fr;
    }
}
