:root {
    --bg-main: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #221f1f;
    --text-sub: #64748b;
    --border-light: #e2e8f0;
    --accent: #00b5ad;
    --accent-hover: #009891;
    --accent-glow: rgba(0, 181, 173, 0.15);
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
}

.portal-container {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    padding: 28px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05), 0 0 20px var(--accent-glow);
}

.logo-wrapper {
    text-align: center;
    margin-bottom: 20px;
    padding: 10px 0;
}

.brand-logo {
    max-width: 220px;
    height: auto;
}

.portal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-sub);
    margin-bottom: 22px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 12px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.status-indicator.online { background-color: #22c55e; box-shadow: 0 0 8px #22c55e; }
.status-indicator.offline { background-color: #ef4444; }

.portal-screen h2 { 
    margin: 0 0 6px 0; 
    font-size: 1.5rem; 
    font-weight: 700; 
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.subtitle { 
    color: var(--text-sub); 
    font-size: 0.88rem; 
    margin-top: 0;
    margin-bottom: 22px; 
}

.social-login-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-social {
    width: 100%;
    padding: 11px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
}
.btn-social:hover { 
    background: #f1f5f9; 
    border-color: var(--accent); 
    box-shadow: 0 0 10px var(--accent-glow);
}

.divider {
    text-align: center;
    border-bottom: 1px solid var(--border-light);
    line-height: 0.1em;
    margin: 22px 0;
    color: var(--text-sub);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}
.divider span { background: var(--card-bg); padding: 0 10px; }

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-group label { font-size: 0.82rem; color: var(--text-sub); font-weight: 500; }
.input-group input {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 12px;
    color: var(--text-main);
    font-size: 0.95rem;
    transition: border-color 0.2s;
}
.input-group input:focus { 
    border-color: var(--accent); 
    outline: none; 
    box-shadow: 0 0 8px var(--accent-glow);
}

/* Custom Searchable Dropdown */
.custom-select-group {
    position: relative;
}
.custom-dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    z-index: 50;
    margin-top: 4px;
}
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 0.9rem;
}
.dropdown-item:hover {
    background: #f1f5f9;
    color: var(--accent);
}
.org-item-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.btn-primary {
    background: var(--accent);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s, transform 0.1s;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: scale(0.99); }
.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Spinner Animation */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
}

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

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-main);
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.auth-toggle-text {
    font-size: 0.85rem;
    color: var(--text-sub);
    text-align: center;
    margin-top: 8px;
}
.auth-toggle-text a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}
.auth-toggle-text a:hover {
    text-decoration: underline;
}

.console-log { margin-top: 15px; font-size: 0.85rem; font-family: monospace; }
.resend-text { font-size: 0.85rem; color: var(--text-sub); text-align: center; }
.resend-text span { color: var(--accent); cursor: pointer; text-decoration: underline; }

.hidden { display: none !important; }

/* Dashboard Styles */
#orgoraDashboard {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    width: 90vw;
    max-width: 850px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    border-bottom: 1px solid var(--border-light);
}
.dashboard-logo { height: 32px; width: auto; }
.session-badge { margin-right: 15px; color: var(--accent); font-weight: 600; font-size: 0.9rem; }
.dashboard-content { padding: 40px 20px; text-align: center; }
.dashboard-content p { color: var(--text-sub); margin-top: 8px; }

/* Approval Status Card & Badges */
.status-card {
    margin: 30px auto 0;
    max-width: 480px;
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 20px;
    text-align: left;
}
.status-card h3 {
    margin-top: 0;
    font-size: 1.1rem;
    color: var(--text-main);
}
.status-details p {
    margin: 6px 0;
    font-size: 0.9rem;
}
.approval-badge-container {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}
.approval-badge {
    padding: 6px 14px;
    border-radius: 20px;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.badge-orange { background-color: #f97316; } /* For Approval */
.badge-green { background-color: #22c55e; }  /* Approved */
.badge-red { background-color: #ef4444; }    /* Declined */

.btn-social-icon {
    flex-shrink: 0;
    display: inline-block;
}