* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background: #eef4fb;
    color: #1f2937;
}

.app-login-page {
    min-height: 100vh;
    padding: 24px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #f8fbff 0%, #e7effa 100%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 28px;
    padding: 28px 22px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

.login-logo {
    text-align: center;
    margin-bottom: 28px;
}

.logo-circle {
    width: 72px;
    height: 72px;
    margin: 0 auto 14px;
    border-radius: 22px;
    background: linear-gradient(135deg, #0f4c81, #2563eb);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 800;
}

.login-logo h1 {
    margin: 0;
    font-size: 25px;
}

.login-logo p {
    margin: 7px 0 0;
    color: #64748b;
}

form label {
    display: block;
    margin-bottom: 8px;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 700;
}

form input {
    width: 100%;
    height: 54px;
    border: 1px solid #d8e2ef;
    border-radius: 16px;
    padding: 0 15px;
    font-size: 16px;
    background: #f8fafc;
    outline: none;
}

form button {
    width: 100%;
    height: 56px;
    border: none;
    border-radius: 18px;
    margin-top: 24px;
    background: linear-gradient(135deg, #0f4c81, #2563eb);
    color: #fff;
    font-size: 17px;
    font-weight: 800;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 13px 14px;
    border-radius: 14px;
    font-size: 14px;
    margin-bottom: 18px;
}

.mobile-app {
    max-width: 520px;
    margin: 0 auto;
    min-height: 100vh;
    padding: 22px 16px 90px;
}

.app-header,
.invoice-top,
.detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-header {
    margin-bottom: 22px;
}

.app-header small {
    color: #64748b;
    font-weight: 600;
}

.app-header h2,
.page-top h2 {
    margin: 4px 0 0;
    font-size: 22px;
    color: #0f172a;
}

.logout-btn,
.back-btn {
    text-decoration: none;
    background: #fff;
    color: #0f4c81;
    padding: 10px 14px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 13px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.debt-card,
.detail-total-card {
    background: linear-gradient(135deg, #0f4c81, #2563eb);
    color: #fff;
    border-radius: 28px;
    padding: 24px 20px;
    box-shadow: 0 22px 42px rgba(37, 99, 235, 0.28);
}

.debt-card h1,
.detail-total-card h1 {
    margin: 10px 0 8px;
    font-size: 34px;
}

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

.quick-card,
.invoice-card,
.empty-card,
.detail-section,
.profile-card {
    background: #fff;
    border-radius: 24px;
    padding: 18px;
    text-decoration: none;
    color: #0f172a;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5edf7;
}

.quick-card strong {
    display: block;
    font-size: 16px;
    margin-bottom: 8px;
}

.quick-card span,
.page-top p {
    font-size: 13px;
    color: #64748b;
}

.section-title {
    margin: 24px 0 12px;
    font-size: 17px;
    font-weight: 800;
}

.invoice-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.invoice-top strong {
    display: block;
    font-size: 17px;
}

.invoice-top span {
    font-size: 13px;
    color: #64748b;
}

.status {
    font-style: normal;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.status.unpaid {
    background: #dbeafe;
    color: #1d4ed8;
}

.invoice-price {
    margin: 18px 0;
    font-size: 28px;
    font-weight: 900;
    color: #0f4c81;
}

.detail-btn {
    display: block;
    text-align: center;
    text-decoration: none;
    background: #eff6ff;
    color: #0f4c81;
    padding: 13px;
    border-radius: 16px;
    font-weight: 800;
}

.page-top {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
}

.back-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.detail-section {
    margin-top: 14px;
}

.detail-section h3 {
    margin: 0 0 14px;
    font-size: 17px;
}

.detail-row {
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid #eef2f7;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row span {
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
}

.detail-row b {
    font-size: 14px;
    text-align: right;
}

.profile-card {
    text-align: center;
    margin-bottom: 16px;
}

.profile-avatar {
    width: 76px;
    height: 76px;
    margin: 0 auto 14px;
    border-radius: 24px;
    background: linear-gradient(135deg, #0f4c81, #2563eb);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 900;
}

.profile-card h2 {
    margin: 0;
    font-size: 22px;
}

.profile-card p {
    color: #64748b;
}

.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    width: calc(100% - 20px);
    max-width: 520px;
    background: #fff;
    border-radius: 22px;
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
    border: 1px solid #e5edf7;
    z-index: 999;
}

.bottom-nav a {
    text-align: center;
    text-decoration: none;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    padding: 9px 2px;
    border-radius: 14px;
    line-height: 1.2;
}

.bottom-nav a.active {
    background: #eff6ff;
    color: #0f4c81;
}

@media (max-width: 480px) {
    .mobile-app {
        padding: 20px 14px 90px;
    }

    .debt-card h1,
    .detail-total-card h1 {
        font-size: 30px;
    }
}

.mobile-logout-full {
    display: block;
    margin-top: 18px;
    text-align: center;
    text-decoration: none;
    background: #fee2e2;
    color: #991b1b;
    padding: 15px;
    border-radius: 18px;
    font-weight: 900;
    border: 1px solid #fecaca;
}

.change-password-btn {
    display: block;
    margin-top: 18px;
    text-align: center;
    text-decoration: none;
    background: #eff6ff;
    color: #0f4c81;
    padding: 15px;
    border-radius: 18px;
    font-weight: 900;
    border: 1px solid #bfdbfe;
}