/* ============================================
   CLEAN WHITE SIGNUP THEME - Trello Inspired
   NeuraPM Premium SaaS Design
   Extends login-clean.css styles
   ============================================ */

/* ============================================
   VARIABLES & RESET (Same as Login)
   ============================================ */

:root {
    /* Color Palette */
    --white: #FFFFFF;
    --background: #F7F9FB;
    --surface: #E9EDF2;
    --text-primary: #0F172A;
    --text-secondary: #1E293B;
    --text-tertiary: #4B5563;
    --text-muted: #6B7280;
    --accent: #00D3C0;
    --accent-hover: #00BDB0;
    --border: #D8DEE6;
    --border-focus: #00D3C0;
    --error: #EF4444;
    --success: #10B981;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-focus: 0 0 0 4px rgba(0, 211, 192, 0.15);
    --shadow-glow: 0 0 16px rgba(0, 211, 192, 0.35);

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-smooth: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-bounce: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   MAIN LAYOUT
   ============================================ */

.signup-wrapper {
    display: grid;
    grid-template-columns: 1fr 540px 1fr;
    min-height: 100vh;
    align-items: center;
    gap: 3rem;
    padding: 2rem;
}

/* ============================================
   ILLUSTRATION AREAS
   ============================================ */

.illustration-left,
.illustration-right {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.illustration-left {
    animation-delay: 0.2s;
}

.illustration-right {
    animation-delay: 0.4s;
}

.floating-element {
    width: 100%;
    max-width: 400px;
    animation: float 6s ease-in-out infinite;
}

.floating-element svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(var(--shadow-sm));
}

.floating-element:hover svg {
    animation: gentleBounce 0.6s ease;
}

.growth-illustration,
.team-illustration {
    transform-origin: center;
}

.floating-element:hover .growth-illustration,
.floating-element:hover .team-illustration {
    animation: scaleUp 0.3s ease forwards;
}

/* ============================================
   SIGNUP CARD
   ============================================ */

.signup-card-container {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: fadeInScale 0.6s ease forwards;
    animation-delay: 0.1s;
}

.signup-card {
    background: var(--white);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 540px;
    transition: var(--transition-smooth);
}

.signup-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

/* ============================================
   LOGO & HEADER
   ============================================ */

.signup-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: rotateIn 0.5s ease;
}

.logo-icon svg {
    transition: var(--transition-fast);
}

.logo-icon:hover svg {
    transform: scale(1.1) rotate(5deg);
}

.logo-text {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin: 0;
}

.tagline {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-tertiary);
    margin: 0;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.signup-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.form-input {
    width: 100%;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px 14px;
    font-size: 0.9375rem;
    color: var(--text-primary);
    transition: var(--transition-fast);
    outline: none;
    font-family: inherit;
}

.form-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.form-input:hover {
    border-color: var(--border-focus);
}

.form-input:focus {
    border-color: var(--border-focus);
    box-shadow: var(--shadow-focus);
}

.form-input:focus::placeholder {
    opacity: 0.5;
}

/* Password Input with Toggle */
.password-input-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-muted);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password:hover {
    color: var(--accent);
}

/* ============================================
   PASSWORD STRENGTH RULES
   ============================================ */

.password-rules {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.rule-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.rule-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.rule-item.rule-valid {
    color: var(--success);
}

.rule-item.rule-valid .rule-icon {
    color: var(--success);
    font-weight: 700;
}

.rule-text {
    flex: 1;
}

/* ============================================
   PASSWORD MATCH INDICATOR
   ============================================ */

.password-match {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.password-match.match-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.password-match.match-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.match-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
   CHECKBOX & TERMS
   ============================================ */

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    position: relative;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--accent);
    border-color: var(--accent);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    width: 10px;
    height: 6px;
    border: solid white;
    border-width: 0 0 2px 2px;
    transform: rotate(-45deg);
    margin-top: -2px;
}

.checkbox-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-tertiary);
    line-height: 1.5;
}

.terms-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-fast);
    position: relative;
}

.terms-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition-fast);
}

.terms-link:hover {
    color: var(--accent-hover);
}

.terms-link:hover::after {
    width: 100%;
}

/* ============================================
   PRIMARY BUTTON
   ============================================ */

.btn-primary {
    width: 100%;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: var(--transition-fast);
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-md);
}

.arrow-icon {
    transition: var(--transition-fast);
}

.btn-primary:hover .arrow-icon {
    transform: translateX(4px);
}

/* Ripple Effect */
.btn-primary::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}

.btn-primary:active::after {
    animation: ripple 0.6s ease-out;
}

/* ============================================
   DIVIDER
   ============================================ */

.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0.5rem 0;
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--surface);
}

/* ============================================
   SSO BUTTONS
   ============================================ */

.sso-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.btn-sso {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn-sso svg {
    transition: var(--transition-fast);
}

.btn-sso:hover {
    background: #F7FAFB;
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-sso:hover svg {
    transform: scale(1.1);
}

.btn-sso:active {
    transform: translateY(0);
}

/* ============================================
   FOOTER LINKS
   ============================================ */

.form-footer {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-tertiary);
    padding-top: 0.5rem;
}

.footer-text {
    margin-right: 0.5rem;
}

.footer-link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-fast);
    position: relative;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition-fast);
}

.footer-link:hover {
    color: var(--accent-hover);
}

.footer-link:hover::after {
    width: 100%;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes gentleBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes scaleUp {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.05);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0.5);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
    20%, 40%, 60%, 80% { transform: translateX(8px); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1200px) {
    .signup-wrapper {
        grid-template-columns: 0.8fr 540px 0.8fr;
        gap: 2rem;
    }

    .floating-element {
        max-width: 300px;
    }
}

@media (max-width: 968px) {
    .signup-wrapper {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }

    .illustration-left,
    .illustration-right {
        display: none;
    }

    .signup-card {
        padding: 2.5rem 2rem;
    }
}

@media (max-width: 480px) {
    .signup-card {
        padding: 2rem 1.5rem;
    }

    .logo-text {
        font-size: 1.75rem;
    }

    .tagline {
        font-size: 0.9375rem;
    }

    .sso-buttons {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   FORM VALIDATION STATES
   ============================================ */

.form-input:invalid:not(:placeholder-shown) {
    border-color: var(--error);
}

.form-input:valid:not(:placeholder-shown) {
    border-color: var(--success);
}

.form-input:invalid:not(:placeholder-shown):focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.btn-primary:focus-visible,
.btn-sso:focus-visible,
.form-input:focus-visible {
    outline: none;
    box-shadow: var(--shadow-focus);
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
