/* =============================================
   NCP Bookkeeping — Login Styles
   ============================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --blue-deep: #1a237e;
    --blue-mid: #283593;
    --blue-vivid: #1565c0;
    --blue-bright: #1976d2;
    --blue-accent: #42a5f5;
    --white: #ffffff;
    --gray-100: #f5f7fa;
    --gray-300: #d0d5dd;
    --gray-500: #667085;
    --gray-700: #344054;
    --error: #f04438;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-card: 0 20px 60px rgba(0, 0, 0, 0.28), 0 4px 16px rgba(0, 0, 0, 0.18);
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    overflow: hidden;
    position: relative;
}

/* ---- Background ---- */
.bg-layer {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #0d1b6e 0%, #1a3a8f 35%, #1565c0 65%, #1e88e5 100%);
    z-index: 0;
}

.dots-layer {
    position: fixed;
    inset: 0;
    z-index: 1;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}

/* ---- Card ---- */
.login-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.97);
    border-radius: var(--radius-lg);
    padding: 36px 36px 40px;
    box-shadow: var(--shadow-card);
    animation: cardIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ---- Brand ---- */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    margin-bottom: 24px;
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--blue-vivid), var(--blue-accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.brand-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--gray-700);
    letter-spacing: -0.3px;
}

/* ---- Tab Toggle ---- */
.tab-toggle {
    display: flex;
    background: var(--gray-100);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 28px;
    gap: 4px;
}

.tab {
    flex: 1;
    padding: 9px 0;
    border: none;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    color: var(--gray-500);
    transition: all 0.2s ease;
}

.tab.active {
    background: var(--blue-bright);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.35);
}

.tab:not(.active):hover {
    color: var(--gray-700);
    background: rgba(0, 0, 0, 0.04);
}

/* ---- Panels ---- */
.panel {
    display: none;
}

.panel.active {
    display: block;
}

.panel-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-700);
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: -0.4px;
}

/* ---- Google Button ---- */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 13px 20px;
    background: var(--white);
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-700);
    text-decoration: none;
    transition: all 0.18s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.btn-google:hover {
    border-color: var(--blue-accent);
    background: #f0f7ff;
    box-shadow: 0 2px 10px rgba(25, 118, 210, 0.12);
    transform: translateY(-1px);
}

/* ---- Admin Form ---- */
.admin-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
}

.field input {
    padding: 11px 14px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--gray-700);
    transition: border-color 0.18s, box-shadow 0.18s;
    outline: none;
    background: var(--white);
}

.field input:focus {
    border-color: var(--blue-bright);
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.12);
}

.field input::placeholder {
    color: #adb5bd;
}

.btn-submit {
    padding: 13px;
    background: linear-gradient(135deg, var(--blue-vivid), var(--blue-bright));
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
    transition: all 0.18s ease;
    box-shadow: 0 3px 12px rgba(25, 118, 210, 0.35);
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 18px rgba(25, 118, 210, 0.45);
}

.btn-submit:active {
    transform: translateY(0);
}

.error-msg {
    font-size: 13px;
    color: var(--error);
    text-align: center;
    background: #fff1f0;
    border: 1px solid #fecdca;
    border-radius: var(--radius-sm);
    padding: 8px 12px;
}

.google-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.subtitle {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 15px;
    align-items: center;
}

/* ---- Responsive ---- */
@media (max-width: 440px) {
    .login-card {
        margin: 16px;
        padding: 28px 24px 32px;
        border-radius: var(--radius-md);
    }
}