/**
 * AuditedReturns Whitelabel Design System
 * Investor portal: blue gradient, card layout, clean forms
 */

:root {
    --auditedreturns-brand: #2563eb;
    --auditedreturns-brand-hover: #1d4ed8;
    --auditedreturns-brand-light: #3b82f6;
    --auditedreturns-gradient-from: #f8fafc;
    --auditedreturns-gradient-via: #f0fdf4;
    --auditedreturns-gradient-to: #f1f5f9;
    --auditedreturns-card-border: 2px solid #e2e8f0;
    --auditedreturns-input-focus: #2563eb;
    --auditedreturns-success: #16a34a;
    --auditedreturns-success-hover: #15803d;
    --auditedreturns-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html.auditedreturns-active,
body.auditedreturns-active {
    margin: 0;
    padding: 0;
    font-family: var(--auditedreturns-font);
}

/* Guest / auth page background */
.auditedreturns-guest-bg {
    min-height: 100vh;
    background: linear-gradient(to bottom right, var(--auditedreturns-gradient-from), var(--auditedreturns-gradient-via), var(--auditedreturns-gradient-to));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* Logo block */
.auditedreturns-logo-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    text-decoration: none;
    color: inherit;
}
.auditedreturns-logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    background: linear-gradient(to bottom right, #2563eb, #1e40af);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}
.auditedreturns-logo-icon svg {
    width: 1.75rem;
    height: 1.75rem;
    color: white;
}
.auditedreturns-logo-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #1d4ed8, #1e3a8a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}
.auditedreturns-logo-text p {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
}

/* Card */
.auditedreturns-card {
    width: 100%;
    max-width: 28rem;
    background: white;
    border: var(--auditedreturns-card-border);
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.05);
}
.auditedreturns-card-header {
    padding: 1.5rem 1.5rem 0;
    text-align: center;
}
.auditedreturns-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 0.25rem 0;
}
.auditedreturns-card-description {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
}
.auditedreturns-card-body {
    padding: 1.5rem;
}
.auditedreturns-card-footer {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    justify-content: center;
}

/* Tabs (Login / Sign Up) */
.auditedreturns-tabs {
    width: 100%;
}
.auditedreturns-tabs-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    margin-bottom: 1rem;
    background: #f1f5f9;
    border-radius: 0.375rem;
    padding: 0.25rem;
}
.auditedreturns-tabs-trigger {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    background: transparent;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}
.auditedreturns-tabs-trigger:hover {
    color: #334155;
}
.auditedreturns-tabs-trigger.active {
    background: white;
    color: #0f172a;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}
.auditedreturns-tab-panel {
    display: none;
}
.auditedreturns-tab-panel.active {
    display: block;
}

/* Form */
.auditedreturns-form-group {
    margin-bottom: 1rem;
}
.auditedreturns-form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
    margin-bottom: 0.5rem;
}
.auditedreturns-input-wrap {
    position: relative;
}
.auditedreturns-input-wrap .icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: #94a3b8;
    pointer-events: none;
}
.auditedreturns-input-wrap input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.5rem;
    font-size: 0.875rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    background: white;
    color: #0f172a;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.auditedreturns-input-wrap input:focus {
    outline: none;
    border-color: var(--auditedreturns-input-focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.auditedreturns-input-wrap input::placeholder {
    color: #94a3b8;
}
.auditedreturns-input-wrap.without-icon input {
    padding-left: 0.75rem;
}

/* Buttons */
.auditedreturns-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
}
.auditedreturns-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
.auditedreturns-btn-primary {
    width: 100%;
    padding: 0.625rem 1rem;
    background: var(--auditedreturns-brand);
    color: white;
}
.auditedreturns-btn-primary:hover:not(:disabled) {
    background: var(--auditedreturns-brand-hover);
}
.auditedreturns-btn-success {
    width: 100%;
    padding: 0.625rem 1rem;
    background: var(--auditedreturns-success);
    color: white;
}
.auditedreturns-btn-success:hover:not(:disabled) {
    background: var(--auditedreturns-success-hover);
}
.auditedreturns-btn-ghost {
    background: transparent;
    color: #64748b;
}
.auditedreturns-btn-ghost:hover:not(:disabled) {
    background: #f1f5f9;
    color: #334155;
}

/* Links */
.auditedreturns-link {
    color: var(--auditedreturns-brand);
    text-decoration: none;
    font-size: 0.875rem;
}
.auditedreturns-link:hover {
    color: var(--auditedreturns-brand-hover);
    text-decoration: underline;
}

/* Help text */
.auditedreturns-help {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: #64748b;
}
.auditedreturns-help a {
    color: var(--auditedreturns-brand);
    text-decoration: none;
}
.auditedreturns-help a:hover {
    text-decoration: underline;
}

/* Errors */
.auditedreturns-errors {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
    color: #b91c1c;
    font-size: 0.875rem;
}

/* Checkbox */
.auditedreturns-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #475569;
}
.auditedreturns-checkbox input {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
    border: 1px solid #cbd5e1;
    color: var(--auditedreturns-brand);
}

/* Terms text */
.auditedreturns-terms {
    font-size: 0.75rem;
    text-align: center;
    color: #64748b;
    margin-top: 1rem;
}

/* ============================================
   MEMBER LAYOUT (Authenticated)
   Matches AuditedReturns React investor portal: green logo, green active nav, green footer accents
   ============================================ */

/* Page background: from-slate-50 via-blue-50 to-slate-100 (Tailwind) */
.auditedreturns-member-bg {
    min-height: 100vh;
    background: linear-gradient(to bottom right, #f8fafc, #eff6ff, #f1f5f9);
}

/* Sticky header: bg-white/80 backdrop-blur-lg border-b */
.auditedreturns-member-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
}

.auditedreturns-member-header .container {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding: 0.75rem 1rem;
}

.auditedreturns-member-header .flex-between {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

/* Logo: green gradient icon (w-10 h-10) + green gradient text (text-xl) - matches AR investor */
.auditedreturns-member-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}
.auditedreturns-member-logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    background: linear-gradient(to bottom right, #16a34a, #15803d);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}
.auditedreturns-member-logo-icon svg,
.auditedreturns-member-logo-icon i {
    color: white;
    font-size: 1.25rem;
}
.auditedreturns-member-logo-text h1 {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(to right, #15803d, #166534);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}
.auditedreturns-member-logo-text span {
    font-size: 0.75rem;
    color: #64748b;
}

/* Desktop nav links: green gradient active, clean hover (matches current nav markup) */
.auditedreturns-member-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.auditedreturns-member-nav a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: color 0.15s, background 0.15s;
}
.auditedreturns-member-nav a:hover {
    color: #0f172a;
    background: #f1f5f9;
}
.auditedreturns-member-nav a.active {
    background: linear-gradient(to bottom right, #16a34a, #15803d);
    color: white;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}
.auditedreturns-member-nav a.active:hover {
    background: linear-gradient(to bottom right, #15803d, #166534);
    color: white;
}

/* Desktop nav links inside .auditedreturns-nav-inner (padding, gradient, hover) */
.auditedreturns-nav-inner .auditedreturns-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: color 0.15s, background 0.15s;
}
.auditedreturns-nav-inner .auditedreturns-nav-link i,
.auditedreturns-nav-inner .auditedreturns-nav-link .bx {
    font-size: 1.125rem;
}
.auditedreturns-nav-inner .auditedreturns-nav-link:hover {
    color: #0f172a;
    background: #f1f5f9;
}
.auditedreturns-nav-inner .auditedreturns-nav-link.active {
    background: linear-gradient(to bottom right, #16a34a, #15803d);
    color: white;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}
.auditedreturns-nav-inner .auditedreturns-nav-link.active:hover {
    background: linear-gradient(to bottom right, #15803d, #166534);
    color: white;
}

/* Notifications badge and view-all button (green accent) */
.auditedreturns-badge-new {
    background: #dcfce7;
    color: #15803d;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
}
.auditedreturns-btn-viewall {
    background: #dcfce7;
    color: #15803d;
}
.auditedreturns-btn-viewall:hover {
    background: #bbf7d0;
}

/* Profile dropdown */
.auditedreturns-member-dropdown {
    min-width: 16rem;
    position: absolute;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    z-index: 50;
    padding: 0.5rem 0;
}
.auditedreturns-member-dropdown .section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 1rem 0.25rem;
}
.auditedreturns-member-dropdown .divider {
    height: 1px;
    background: #e2e8f0;
    margin: 0.5rem 0;
}
.auditedreturns-member-dropdown a,
.auditedreturns-member-dropdown .submit-logout {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #334155;
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}
.auditedreturns-member-dropdown a:hover,
.auditedreturns-member-dropdown .submit-logout:hover {
    background: #f1f5f9;
}
.auditedreturns-member-dropdown .submit-logout {
    color: #64748b;
}

/* Member header right actions: align icons and hide burger on desktop */
.auditedreturns-member-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.auditedreturns-member-actions > a,
.auditedreturns-member-actions > div button,
.auditedreturns-member-actions > div.relative button {
    color: #64748b;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: color 0.15s, background 0.15s;
}
.auditedreturns-member-actions > a:hover,
.auditedreturns-member-actions button:hover {
    color: #16a34a;
    background: #f1f5f9;
}
.auditedreturns-member-actions .profile-divider {
    width: 1px;
    height: 1.5rem;
    background: #e2e8f0;
}
.auditedreturns-member-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    object-fit: cover;
}
@media (min-width: 768px) {
    .auditedreturns-member-mobile-toggle {
        display: none !important;
    }
}

/* Mobile menu panel: green active state, same gradient as desktop */
.auditedreturns-member-mobile-menu {
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}
.auditedreturns-member-mobile-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: color 0.15s, background 0.15s;
}
.auditedreturns-member-mobile-menu a:hover {
    color: #0f172a;
    background: #f1f5f9;
}
.auditedreturns-member-mobile-menu a.active {
    background: linear-gradient(to bottom right, #16a34a, #15803d);
    color: white;
}
.auditedreturns-member-mobile-menu a.active:hover {
    background: linear-gradient(to bottom right, #15803d, #166534);
    color: white;
}

/* Legacy mobile link class */
.auditedreturns-mobile-link {
    transition: color 0.15s, background 0.15s;
}
.auditedreturns-mobile-link:hover {
    color: #0f172a;
    background: #f1f5f9;
}
.auditedreturns-mobile-link.active {
    background: linear-gradient(to bottom right, #16a34a, #15803d);
    color: white;
}

/* On desktop, hide mobile menu (Tailwind .hidden + safety) */
@media (min-width: 768px) {
    #auditedreturnsMobileMenu {
        display: none !important;
    }
}

/* On mobile, dropdowns full width */
@media (max-width: 767px) {
    #auditedreturnsProfileDropdown {
        left: 0.5rem;
        right: 0.5rem;
        width: auto;
        max-width: calc(100vw - 1rem);
    }
    #auditedreturnsNotificationsDropdown {
        left: 0.5rem;
        right: 0.5rem;
        width: auto;
        max-width: calc(100vw - 1rem);
    }
}

/* Member footer: border-t bg-white/50 backdrop-blur-sm mt-12; Shield green-600; hover:text-green-600 */
.auditedreturns-member-footer {
    border-top: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(4px);
    margin-top: 3rem;
}
.auditedreturns-member-footer .container {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding: 1.5rem 1rem;
}
.auditedreturns-member-footer .flex-between {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.auditedreturns-member-footer .footer-copy {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
}
.auditedreturns-member-footer .footer-copy .footer-icon {
    color: #16a34a;
    font-size: 1.25rem;
}
.auditedreturns-member-footer .links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: #64748b;
}
.auditedreturns-member-footer .links a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.15s;
}
.auditedreturns-member-footer .links a:hover {
    color: #16a34a;
}
