/**
 * MyTasbih Pro — Account Pages Styles
 * Login, registration, and account management pages.
 *
 * @package MyTasbih Pro
 * @version 1.0.0
 */

/* ========================================
   Account Page Layout
   ======================================== */
.account-section {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px 20px 40px;
    position: relative;
    z-index: 1;
}

/* When showing the full dashboard, remove centering */
.account-section:has(.dash) {
    padding: 0;
    display: block;
}

.account-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 28px 28px;
    border: 1px solid rgba(212, 175, 55, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

.page-wrapper.dark .account-card {
    background: rgba(30, 30, 50, 0.85);
    border-color: rgba(224, 201, 127, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ========================================
   Account Header
   ======================================== */
.account-header {
    text-align: center;
    margin-bottom: 20px;
}

.account-header-icon {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
}

.account-header h2 {
    font-family: 'Amiri', serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 6px;
}

.page-wrapper.dark .account-header h2 {
    color: var(--text-dark);
}

.account-header p {
    font-size: 14px;
    color: #718096;
    margin: 0;
}

.page-wrapper.dark .account-header p {
    color: #a0aec0;
}

/* ========================================
   Form Styles
   ======================================== */
.account-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.page-wrapper.dark .form-group label {
    color: var(--text-dark);
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.6);
    font-size: 15px;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: 'Inter', sans-serif;
}

.form-input::placeholder {
    color: #a0aec0;
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
    outline: none;
}

.page-wrapper.dark .form-input {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(224, 201, 127, 0.2);
    color: var(--text-dark);
}

.page-wrapper.dark .form-input::placeholder {
    color: #64748b;
}

.page-wrapper.dark .form-input:focus {
    border-color: #e0c97f;
    box-shadow: 0 0 0 3px rgba(224, 201, 127, 0.1);
}

/* ========================================
   Submit Button
   ======================================== */
.account-submit {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #e0c97f 0%, #c9a84c 100%);
    color: #1a1a2e;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    margin-top: 4px;
}

.account-submit:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.account-submit:active {
    transform: translateY(0);
}

.account-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ========================================
   Divider
   ======================================== */
.account-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0;
}

.account-divider::before,
.account-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(212, 175, 55, 0.2);
}

.account-divider span {
    font-size: 12px;
    color: #a0aec0;
    font-weight: 500;
    white-space: nowrap;
}

.page-wrapper.dark .account-divider span {
    color: #64748b;
}

/* ========================================
   Social Login Buttons
   ======================================== */
.social-login-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
}

.social-login-btn:hover {
    border-color: rgba(212, 175, 55, 0.4);
    background: rgba(255, 255, 255, 0.8);
}

.page-wrapper.dark .social-login-btn {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(224, 201, 127, 0.15);
    color: var(--text-dark);
}

.page-wrapper.dark .social-login-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(224, 201, 127, 0.3);
}

.social-login-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ========================================
   Form Links
   ======================================== */
.account-links {
    text-align: center;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.account-link {
    font-size: 13px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.account-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Register CTA button (bottom of login card) */
.account-register-btn {
    display: block;
    width: 100%;
    padding: 12px;
    border: 1.5px solid rgba(212, 175, 55, 0.3);
    border-radius: 10px;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    text-align: center;
    font-family: 'Inter', sans-serif;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.account-register-btn:hover {
    background: rgba(212, 175, 55, 0.06);
    border-color: rgba(212, 175, 55, 0.5);
    transform: translateY(-1px);
}

.page-wrapper.dark .account-register-btn {
    border-color: rgba(224, 201, 127, 0.25);
    color: #e0c97f;
}

.page-wrapper.dark .account-register-btn:hover {
    background: rgba(224, 201, 127, 0.08);
    border-color: rgba(224, 201, 127, 0.4);
}

/* SVG header icon (replaces emoji) */
svg.account-header-icon {
    display: block;
    margin: 0 auto 8px;
}

/* Inline row for label + forgot link */
.form-row-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forgot-link {
    font-size: 12px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* ========================================
   Messages (Error / Success)
   ======================================== */
.account-message {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.account-message--error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.25);
    color: #dc3545;
}

.page-wrapper.dark .account-message--error {
    background: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.3);
    color: #f08080;
}

.account-message--success {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.25);
    color: #28a745;
}

.page-wrapper.dark .account-message--success {
    background: rgba(40, 167, 69, 0.15);
    border-color: rgba(40, 167, 69, 0.3);
    color: #6dd58c;
}

.account-message--warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.25);
    color: #856404;
}

.page-wrapper.dark .account-message--warning {
    background: rgba(255, 193, 7, 0.12);
    border-color: rgba(255, 193, 7, 0.25);
    color: #e0c97f;
}

/* ========================================
   Logged-In Dashboard
   ======================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.dashboard-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(212, 175, 55, 0.12);
    border-radius: 14px;
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    transition: border-color 0.2s, transform 0.15s;
}

.dashboard-link:hover {
    border-color: rgba(212, 175, 55, 0.3);
    transform: translateY(-2px);
}

.page-wrapper.dark .dashboard-link {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(224, 201, 127, 0.1);
    color: var(--text-dark);
}

.page-wrapper.dark .dashboard-link:hover {
    border-color: rgba(224, 201, 127, 0.25);
}

.dashboard-link-icon {
    font-size: 28px;
}

.dashboard-logout {
    text-align: center;
    margin-top: 24px;
}

.dashboard-logout a {
    font-size: 13px;
    color: #dc3545;
    text-decoration: none;
    font-weight: 500;
}

.dashboard-logout a:hover {
    text-decoration: underline;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 480px) {
    .account-card {
        padding: 28px 20px;
        border-radius: 16px;
    }

    .account-header h2 {
        font-size: 22px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }
}
