/**
 * DIA CRM — Custom Login Page Styles
 */

/* ── Login body ────────────────────────────────── */
.dia-login-body {
    margin: 0;
    padding: 0;
    font-family: var(--dia-font, 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    color: #e2e8f0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-font-smoothing: antialiased;
}

/* ── Wrapper ───────────────────────────────────── */
.dia-login-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ── Card ──────────────────────────────────────── */
.dia-login-card {
    width: 100%;
    background: #fff;
    border-radius: 16px;
    padding: 40px 36px 36px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    color: #0f172a;
}

/* ── Header ────────────────────────────────────── */
.dia-login-header {
    text-align: center;
    margin-bottom: 28px;
}

.dia-login-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: #fff;
    font-size: 28px;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.dia-login-logo .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
}

.dia-login-title {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #0f172a;
}

.dia-login-subtitle {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

/* ── Error box ─────────────────────────────────── */
.dia-login-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: #dc2626;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

/* ── Fields ────────────────────────────────────── */
.dia-login-field {
    margin-bottom: 20px;
}

.dia-login-field label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dia-login-field label .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #6366f1;
}

.dia-login-field input[type="text"],
.dia-login-field input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    color: #0f172a;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.dia-login-field input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: #fff;
}

/* ── Password wrap (with toggle) ───────────────── */
.dia-password-wrap {
    position: relative;
}

.dia-password-wrap input {
    padding-right: 44px;
}

.dia-toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.2s;
}

.dia-toggle-password:hover {
    color: #6366f1;
}

.dia-toggle-password .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* ── Options row ───────────────────────────────── */
.dia-login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    font-size: 13px;
}

.dia-remember-me {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #475569;
    cursor: pointer;
}

.dia-remember-me input[type="checkbox"] {
    accent-color: #6366f1;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.dia-forgot-link {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.dia-forgot-link:hover {
    color: #4f46e5;
    text-decoration: underline;
}

/* ── Submit button ─────────────────────────────── */
.dia-login-submit {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #818cf8);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.dia-login-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.4);
}

.dia-login-submit:active:not(:disabled) {
    transform: translateY(0);
}

.dia-login-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.dia-login-spinner {
    display: inline-flex;
    align-items: center;
}

/* ── Spinner animation ─────────────────────────── */
@keyframes dia-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.dia-spin {
    animation: dia-spin 0.8s linear infinite;
}

/* ── Footer ────────────────────────────────────── */
.dia-login-footer {
    margin-top: 24px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
}

/* ── Responsive ────────────────────────────────── */
@media (max-width: 480px) {
    .dia-login-wrapper {
        padding: 16px;
    }

    .dia-login-card {
        padding: 28px 20px 24px;
        border-radius: 12px;
    }

    .dia-login-title {
        font-size: 22px;
    }

    .dia-login-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}
