@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

/* ═══════════════════════════════════════════════════════════════
   GSection Cloud — Glass login experience
   ═══════════════════════════════════════════════════════════════ */

.gsection-login-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #050508;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #c9d1d9;
    isolation: isolate;
}

/* Ambient glow orbs — give the glass something to blur. */

.gsection-login-scene {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.gsection-login-scene::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
    opacity: 0.5;
}

.gsection-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.35;
}

.gsection-orb--blue {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, #1a4fa0 0%, transparent 70%);
    top: 15%;
    left: 30%;
    animation: gsection-drift-blue 14s ease-in-out infinite alternate;
}

.gsection-orb--pink {
    width: 340px;
    height: 340px;
    background: radial-gradient(circle, #c2185b 0%, transparent 70%);
    bottom: 18%;
    right: 28%;
    animation: gsection-drift-pink 12s ease-in-out infinite alternate;
}

.gsection-orb--accent {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, #7b2ff7 0%, transparent 70%);
    top: 55%;
    left: 55%;
    animation: gsection-drift-accent 16s ease-in-out infinite alternate;
}

@keyframes gsection-drift-blue {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-40px, 30px) scale(1.15); }
}

@keyframes gsection-drift-pink {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, -40px) scale(1.1); }
}

@keyframes gsection-drift-accent {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-20px, -20px) scale(0.9); }
}

/* Compact mode — card only, no scene or viewport height. */

.gsection-login-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #c9d1d9;
}

.gsection-login-compact .gsection-login-card {
    margin: 0;
    animation: none;
    box-shadow: none;
    border: none;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Glass card */

.gsection-login-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    margin: 1.5rem;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(40px) saturate(1.3);
    -webkit-backdrop-filter: blur(40px) saturate(1.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.03) inset,
        0 25px 60px -12px rgba(0, 0, 0, 0.6),
        0 0 80px -20px rgba(26, 79, 160, 0.12);
    animation: gsection-card-enter 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes gsection-card-enter {
    0%   { opacity: 0; transform: translateY(24px) scale(0.97); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.gsection-login-logo {
    display: flex;
    justify-content: center;
    padding: 2.5rem 2rem 0;
}

.gsection-login-logo img {
    display: block;
}

.gsection-login-body {
    padding: 1.75rem 2.25rem 2.25rem;
}

.gsection-login-body h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e6edf3;
    margin: 0 0 1.25rem;
}

/* ═══════════════════════════════════════════════════════════════
   Form elements (scoped inside the glass card)
   ═══════════════════════════════════════════════════════════════ */

.gsection-login-body .gsection-field {
    margin-bottom: 1.15rem;
}

.gsection-login-body .gsection-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 0.4rem;
}

.gsection-login-body .gsection-field input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: #e6edf3;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.gsection-login-body .gsection-field input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.gsection-login-body .gsection-field input:focus {
    border-color: rgba(194, 24, 91, 0.5);
    box-shadow: 0 0 0 3px rgba(194, 24, 91, 0.1), 0 0 20px -4px rgba(194, 24, 91, 0.15);
    background: rgba(255, 255, 255, 0.06);
}

/* Buttons */

.gsection-login-body .gsection-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.gsection-login-body .gsection-btn-primary {
    display: block;
    width: 100%;
    padding: 0.75rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #fff;
    background: linear-gradient(135deg, rgba(26, 79, 160, 0.7), rgba(194, 24, 91, 0.5));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.gsection-login-body .gsection-btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 79, 160, 0.9), rgba(194, 24, 91, 0.7));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gsection-login-body .gsection-btn-primary:hover:not(:disabled)::before { opacity: 1; }
.gsection-login-body .gsection-btn-primary:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 4px 24px -4px rgba(194, 24, 91, 0.3);
    transform: translateY(-1px);
}

.gsection-login-body .gsection-btn-primary:active { transform: translateY(0); }
.gsection-login-body .gsection-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.gsection-login-body .gsection-btn-secondary {
    width: 100%;
    padding: 0.65rem 1.25rem;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s;
}

.gsection-login-body .gsection-btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.8);
}

.gsection-login-body .gsection-btn-google {
    width: 100%;
    padding: 0.65rem 1.25rem;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    transition: all 0.25s;
}

.gsection-login-body .gsection-btn-google:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
}

.gsection-login-body .gsection-btn-google:disabled,
.gsection-login-body .gsection-btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Messages */

.gsection-login-body .gsection-error {
    padding: 0.6rem 0.85rem;
    margin-bottom: 1.15rem;
    font-size: 0.85rem;
    color: #ffa4a4;
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid rgba(248, 81, 73, 0.2);
    border-radius: 10px;
}

.gsection-login-body .gsection-success {
    padding: 0.6rem 0.85rem;
    margin-bottom: 1.15rem;
    font-size: 0.85rem;
    color: #7dff7d;
    background: rgba(25, 135, 84, 0.1);
    border: 1px solid rgba(25, 135, 84, 0.2);
    border-radius: 10px;
}

/* Misc */

.gsection-login-body .gsection-link-row {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
}

.gsection-login-body .gsection-link-row a {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    transition: color 0.25s;
}

.gsection-login-body .gsection-link-row a:hover {
    color: rgba(255, 255, 255, 0.65);
}

.gsection-login-body .gsection-hint {
    font-size: 0.8em;
    opacity: 0.45;
    text-align: center;
    margin-top: 0.75rem;
}

.gsection-login-body .gsection-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.25rem 0;
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.3);
}

.gsection-login-body .gsection-divider::before,
.gsection-login-body .gsection-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

/* ═══════════════════════════════════════════════════════════════
   Session conflict / conflict resolution (standalone panels)
   ═══════════════════════════════════════════════════════════════ */

.gsection-session-banner {
    padding: 1.5rem;
    border: 1px solid rgba(220, 53, 69, 0.4);
    border-radius: 0.5rem;
    background: rgba(220, 53, 69, 0.08);
}

.gsection-session-info {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 1rem;
    margin: 1rem 0;
    font-size: 0.9em;
}

.gsection-session-info dt {
    font-weight: 600;
    opacity: 0.7;
}

.gsection-logo-wrap {
    text-align: center;
    margin-bottom: 1.5rem;
}

.gsection-conflict-panel {
    padding: 1.5rem;
    border: 1px solid rgba(255, 200, 0, 0.3);
    border-radius: 0.5rem;
    background: rgba(255, 200, 0, 0.05);
}

.gsection-conflict-versions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1rem 0;
}

.gsection-version-card {
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
}

.gsection-version-card pre {
    font-size: 0.75em;
    max-height: 200px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem;
    border-radius: 0.25rem;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0.5rem 0;
}

/* Standalone action buttons (conflict/session panels) */

.gsection-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.gsection-btn-primary {
    width: 100%;
    padding: 0.6rem 1.25rem;
    background: #4f8ef7;
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.gsection-btn-primary:hover:not(:disabled) { background: #3a7de0; }
.gsection-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.gsection-btn-secondary {
    width: 100%;
    padding: 0.6rem 1.25rem;
    background: transparent;
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.375rem;
    font-size: 1rem;
    cursor: pointer;
}

.gsection-btn-secondary:hover:not(:disabled) { background: rgba(255, 255, 255, 0.05); }
