/* ===== THE WEAVER GATEWAY MODAL ===== */
#weaver-gateway-modal {
    background: rgba(15, 23, 42, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
}

.weaver-gateway-container {
    display: flex;
    width: 900px;
    max-width: 95vw;
    background: transparent;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    z-index: 10;
}

.weaver-info-col {
    flex: 1;
    background: #0f766e;
    /* Aiudit Emerald */
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #f8fafc;
}

.weaver-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #ffffff;
    line-height: 1.2;
}

.weaver-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    color: #ccfbf1;
    line-height: 1.6;
}

.weaver-login-col {
    flex: 1;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.frosted-glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.weaver-tabs {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 1rem;
}

.weaver-tab {
    background: none;
    border: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s;
    letter-spacing: 0.05em;
}

.weaver-tab:hover {
    color: #0f172a;
}

.weaver-tab.active {
    color: #0f766e;
    font-weight: 700;
}

.weaver-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 0;
    width: 100%;
    height: 2px;
    background: #0f766e;
}

.weaver-form-fields {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.weaver-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

.weaver-input-group label {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.weaver-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #0f172a;
    transition: all 0.3s;
    outline: none;
}

.weaver-input:focus {
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.weaver-primary-btn {
    background: #0f766e;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
    margin-top: 0.5rem;
}

.weaver-primary-btn:hover {
    background: #115e59;
}

.weaver-primary-btn:active {
    transform: scale(0.98);
}

.weaver-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1rem 0;
}

.weaver-divider::before,
.weaver-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.weaver-divider span {
    padding: 0 1rem;
    color: #94a3b8;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
}

.weaver-secondary-btn {
    background: transparent;
    color: #0f172a;
    border: 1px solid rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.weaver-secondary-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.weaver-close-btn {
    background: none;
    border: none;
    color: #64748b;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    margin-top: 2rem;
    transition: color 0.3s;
    text-align: center;
    width: 100%;
}

.weaver-close-btn:hover {
    color: #0f172a;
}

.weaver-error {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    text-align: center;
}

@media (max-width: 768px) {
    .weaver-gateway-container {
        flex-direction: column;
        height: 90vh;
        overflow-y: auto;
    }

    .weaver-info-col {
        padding: 2rem;
        flex: none;
    }

    .weaver-login-col {
        padding: 2rem;
    }
}

/* ===== THE 'DEEP SWAY' LOGIN MODAL ===== */
.deep-sway-modal {
    background: #050505 !important;
    /* Deep Obsidian */
    overflow: hidden;
}

/* The Weaver Geometric Grid Background */
.weaver-grid-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
    /* Deep Obsidian base with a faint linear-gradient grid */
    background-color: #050505;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    /* Adjust size of grid squares */
}

/* Slow-moving Emerald Glow */
.weaver-glow {
    position: absolute;
    width: 60vw;
    height: 60vh;
    background: radial-gradient(circle, rgba(45, 74, 62, 0.5) 0%, rgba(5, 5, 5, 0) 70%);
    filter: blur(100px);
    border-radius: 50%;
    top: -10vh;
    left: -10vw;
    animation: panGlow 20s infinite alternate ease-in-out;
    transform: translateZ(0);
    /* Hardware acceleration */
}

@keyframes panGlow {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(40vw, 30vh) scale(1.2);
    }
}

/* The Content Layer */
.deep-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

/* Minimalist Frosted Glass Card */
.deep-glass-card {
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

/* Tab Toggle (Sign In / Create Identity) */
.auth-tabs {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.auth-tab {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}

.auth-tab:hover {
    color: rgba(255, 255, 255, 0.8);
}

.auth-tab.active {
    color: #fdfcfb;
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 100%;
    height: 2px;
    background: #2d4a3e;
    /* Subtle Emerald underline */
    border-radius: 2px;
}

/* Typography */
.deep-title {
    color: #fdfcfb;
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-align: center;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.deep-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 2.5rem;
    letter-spacing: 0.5px;
}

/* Form Fields */
.deep-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.deep-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fdfcfb;
    padding: 1rem;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    outline: none;
}

.deep-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.deep-input:focus {
    border-color: rgba(45, 74, 62, 0.8);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 15px rgba(45, 74, 62, 0.2);
}

/* Buttons */
.deep-btn {
    width: 100%;
    background: #2d4a3e;
    /* Professional Muted Emerald */
    color: #fdfcfb;
    border: 1px solid rgba(45, 74, 62, 0.5);
    padding: 1rem;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.deep-btn:hover {
    background: #385c4d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45, 74, 62, 0.3);
}

.deep-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.deep-close-btn:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Error Message */
.deep-error-msg {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 1rem;
}