/* ========================================
   Pram Broadcaster — Enterprise Login
   ======================================== */

:root {
    --bg-deep: #06060A;
    --bg-surface: #0C0C14;
    --bg-raised: #12121E;
    --bg-card: rgba(20, 20, 34, 0.85);
    --border-subtle: rgba(255,255,255,0.06);
    --border-default: rgba(255,255,255,0.08);
    --border-hover: rgba(255,255,255,0.14);
    --border-focus: rgba(16,185,129,0.35);
    --text-primary: #F5F5F8;
    --text-secondary: #A0A0B8;
    --text-muted: #64647A;
    --accent: #10b981;
    --accent-glow: rgba(16,185,129,0.20);
    --accent-dim: rgba(16,185,129,0.08);
    --danger: #ef4444;
    --danger-dim: rgba(239,68,68,0.12);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: 180ms ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: var(--bg-deep);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ---- Layout ---- */
.container {
    display: flex;
    width: 100%;
    height: 100vh;
}

/* ---- Brand Panel ---- */
.brand-panel {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--bg-surface);
}

/* Animated mesh background */
.brand-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 30% 40%, rgba(16,185,129,0.06) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 70% 60%, rgba(59,130,246,0.05) 0%, transparent 55%),
        radial-gradient(ellipse 40% 40% at 50% 80%, rgba(99,102,241,0.04) 0%, transparent 50%);
    animation: bgShift 12s ease-in-out infinite alternate;
}

@keyframes bgShift {
    0%   { opacity: 0.7; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.05); }
}

/* Mesh dots */
.brand-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 30%, transparent 70%);
}

/* Floating glow orbs */
.brand-bg::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16,185,129,0.08) 0%, transparent 70%);
    top: -10%;
    right: -10%;
    animation: orbFloat 14s ease-in-out infinite;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%  { transform: translate(-40px, 30px) scale(1.1); }
    66%  { transform: translate(20px, -20px) scale(0.95); }
}

.brand-content {
    position: relative;
    z-index: 1;
    max-width: 440px;
    padding: 60px 48px;
}

.brand-logo {
    margin-bottom: 28px;
    animation: fadeInUp 0.6s ease;
}

.brand-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 12px;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.brand-subtitle {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 36px;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(16,185,129,0.10);
    flex-shrink: 0;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Login Panel ---- */
.login-panel {
    flex: 0 0 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-deep);
    padding: 48px;
}

.login-card {
    width: 100%;
    max-width: 380px;
    animation: fadeInUp 0.5s ease 0.15s both;
}

.login-header {
    margin-bottom: 32px;
}

.login-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-dim);
    padding: 5px 12px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.login-header h2 {
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.login-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ---- Error Message ---- */
.error-msg {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    background: var(--danger-dim);
    border: 1px solid rgba(239,68,68,0.20);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.8rem;
    color: #fca5a5;
    font-weight: 500;
    animation: shakeIn 0.35s ease;
}

.error-msg.show { display: flex; }

@keyframes shakeIn {
    0%   { opacity: 0; transform: translateX(-6px); }
    25%  { transform: translateX(5px); }
    50%  { transform: translateX(-3px); }
    75%  { transform: translateX(2px); }
    100% { opacity: 1; transform: translateX(0); }
}

/* ---- Form ---- */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 13px;
    color: var(--text-muted);
    pointer-events: none;
    transition: color var(--transition);
}

.input-wrapper:focus-within .input-icon {
    color: var(--accent);
}

.input-wrapper input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    background: var(--bg-raised);
    border: 1px solid var(--border-default);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-family: inherit;
    letter-spacing: 0.01em;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.input-wrapper input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow), 0 0 0 1px var(--accent-glow);
}

/* ---- Submit Button ---- */
.login-btn {
    position: relative;
    width: 100%;
    padding: 13px;
    margin-top: 6px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #021c11;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.02em;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    overflow: hidden;
}

.login-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    opacity: 0;
    transition: opacity var(--transition);
}

.login-btn:hover::before { opacity: 1; }

.login-btn:hover {
    box-shadow: 0 4px 24px rgba(16,185,129,0.30), 0 0 0 1px rgba(16,185,129,0.20);
    transform: translateY(-1px);
}

.login-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 12px rgba(16,185,129,0.20);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.login-btn:disabled:hover::before { opacity: 0; }

.login-btn span { position: relative; z-index: 1; }

/* Spinner */
.spinner {
    display: inline-flex;
    animation: spin 0.7s linear infinite;
}

.spinner.hidden { display: none; }

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---- Footer ---- */
.login-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

.footer-divider {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--border-default);
}

/* ---- Responsive ---- */
@media (max-width: 860px) {
    .brand-panel { display: none; }
    .login-panel { flex: 1; padding: 32px 24px; }
    .login-card { max-width: 100%; }
}

@media (max-width: 420px) {
    .login-panel { padding: 24px 16px; }
    .login-header h2 { font-size: 1.35rem; }
}
