* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Inter, Arial, sans-serif;
}

html, body {
    background: #eef3f9;
    color: #0f172a;
}

body {
    min-height: 100vh;
}

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

.mobile-app {
    width: 100%;
    max-width: 520px;
    min-height: 100vh;
    margin: 0 auto;
    background: #ffffff;
    position: relative;
    box-shadow: 0 0 30px rgba(15, 23, 42, 0.06);
    overflow-x: hidden;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #edf2f7;
    padding: 14px 14px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(15, 98, 254, 0.18);
    flex-shrink: 0;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-text h1 {
    font-size: 18px;
    line-height: 1.1;
    font-weight: 800;
    color: #0f172a;
}

.brand-text small {
    font-size: 12px;
    color: #6b7280;
}

.profile-pill {
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: linear-gradient(180deg, #eff4ff, #e6eeff);
    color: #1d4ed8;
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.screen-content {
    padding: 14px;
    padding-bottom: 100px;
}

.card {
    background: #ffffff;
    border: 1px solid #eaf0f7;
    border-radius: 22px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.card h2 {
    font-size: 18px;
    margin-bottom: 8px;
    font-weight: 800;
}

.card h3 {
    font-size: 17px;
    margin-bottom: 10px;
    font-weight: 800;
}

.hero-card {
    background: linear-gradient(135deg, #f8fbff 0%, #eef4ff 100%);
    border: 1px solid #d9e8ff;
}

.hero-card .hero-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 6px;
}

.hero-card .hero-sub {
    color: #5b6472;
    font-size: 13px;
    line-height: 1.5;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat-box {
    border-radius: 18px;
    padding: 14px;
    background: linear-gradient(180deg, #fafcff, #f4f8ff);
    border: 1px solid #e1ebff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.stat-title {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
    font-weight: 700;
}

.stat-value {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
}

.form-group {
    margin-bottom: 14px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

input, textarea, select {
    width: 100%;
    border: 1px solid #d7e2ef;
    border-radius: 18px;
    background: #fff;
    padding: 14px 15px;
    font-size: 15px;
    color: #111827;
    outline: none;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input:focus, textarea:focus, select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59,130,246,0.08);
}

button, .btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 18px;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s ease;
}

button, .btn-primary, .btn {
    background: linear-gradient(90deg, #0f62fe 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 12px 24px rgba(37,99,235,0.24);
}

.btn-secondary {
    background: #eef4ff;
    color: #1e3a8a;
    box-shadow: none;
}

.btn-danger {
    background: #ef4444;
    color: #fff;
    box-shadow: none;
}

.link-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.link-row .btn,
.link-row a.btn {
    width: auto;
    min-width: 130px;
}

.table-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.item {
    background: #fff;
    border: 1px solid #edf2f7;
    border-radius: 18px;
    padding: 14px;
}

.item h4 {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 6px;
    color: #0f172a;
}

.item p {
    font-size: 13px;
    color: #4b5563;
    line-height: 1.55;
}

.muted {
    font-size: 12px;
    color: #6b7280;
}

.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    margin-top: 8px;
    margin-right: 6px;
    background: #f3f4f6;
    color: #111827;
}

.badge.high { background: #fee2e2; color: #991b1b; }
.badge.medium { background: #fef3c7; color: #92400e; }
.badge.low { background: #dcfce7; color: #166534; }
.badge.pending { background: #dbeafe; color: #1d4ed8; }
.badge.done { background: #dcfce7; color: #166534; }

.row-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.row-actions .btn,
.row-actions a.btn {
    width: auto;
    min-width: 88px;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
}

.auth-wrap {
    padding: 28px 16px;
}

.auth-title {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 8px;
    color: #0f172a;
}

.auth-sub {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 20px;
    line-height: 1.5;
}

.notice {
    padding: 12px 14px;
    border-radius: 14px;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 600;
}

.notice.error {
    background: #fef2f2;
    color: #991b1b;
}

.notice.success {
    background: #ecfdf5;
    color: #166534;
}

.chat-box {
    min-height: 130px;
    border-radius: 18px;
    border: 1px solid #dce7f5;
    background: #f8fbff;
    padding: 14px;
    white-space: pre-wrap;
    line-height: 1.7;
    font-size: 15px;
    color: #111827;
}

.file-link {
    display: inline-block;
    padding: 10px 12px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    font-size: 13px;
    font-weight: 700;
}

.bottom-app-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 520px;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(14px);
    border-top: 1px solid #e5e7eb;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    padding: 8px 4px 10px;
    z-index: 999;
    box-shadow: 0 -10px 24px rgba(15,23,42,0.05);
}

.bottom-app-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #64748b;
    padding: 8px 4px;
    border-radius: 14px;
    min-height: 56px;
    transition: 0.2s ease;
}

.bottom-app-nav a.active {
    background: #eef4ff;
    color: #0f62fe;
}

.nav-icon {
    font-size: 18px;
    line-height: 1;
}

.nav-label {
    font-size: 11px;
    font-weight: 800;
    line-height: 1.1;
}

.empty-state {
    text-align: center;
    padding: 18px 10px;
    color: #64748b;
    font-size: 14px;
}

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

.quick-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 52px;
    border-radius: 16px;
    background: #f8fbff;
    border: 1px solid #dde8f8;
    font-size: 13px;
    font-weight: 800;
    color: #1e3a8a;
}

@media (max-width: 420px) {
    .brand-text h1 {
        font-size: 17px;
    }

    .profile-pill {
        max-width: 95px;
        font-size: 12px;
        padding: 9px 12px;
    }

    .screen-content {
        padding: 12px;
    }

    .card {
        border-radius: 20px;
        padding: 14px;
    }

    .grid-2 {
        gap: 10px;
    }

    .stat-value {
        font-size: 22px;
    }

    .nav-icon {
        font-size: 17px;
    }

    .nav-label {
        font-size: 10px;
    }
}
.warning-box {
    background: linear-gradient(180deg, #fffaf5, #fff4ea);
    border: 1px solid #fde3c8;
}

.search-summary {
    font-size: 13px;
    color: #475569;
    margin-top: 6px;
}