/* VibeSim Portal Styles - FalconCloud Design */

:root {
    /* FalconCloud colors */
    --color-bg-dark: #0D1117;
    --color-bg-input: rgba(255, 255, 255, 0.05);
    --color-border-input: rgba(255, 255, 255, 0.1);
    --color-text: #FFFFFF;
    --color-text-muted: rgba(255, 255, 255, 0.6);
    --color-link: #27E09D;
    --color-link-alt: #58A6FF;
    --color-btn-bg: rgba(255, 255, 255, 0.9);
    --color-btn-text: #0D1117;
    --color-error: #f85149;

    /* Gradient colors */
    --gradient-start: #00E5FF;
    --gradient-mid: #4ECCA3;
    --gradient-end: #B8E994;

    /* Dashboard colors (for logged-in pages) */
    --color-success: #28a745;
    --color-secondary: #6c757d;

    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --border-radius: 8px;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--color-bg-dark);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ============================================
   LOGIN PAGE - Split Screen Layout
   ============================================ */

.login-page {
    overflow: hidden;
}

.login-split {
    display: flex;
    min-height: 100vh;
}

/* Left gradient panel */
.login-gradient {
    flex: 0 0 55%;
    background: linear-gradient(
        135deg,
        #00E5FF 0%,
        #00D4AA 25%,
        #4ECCA3 50%,
        #8FD9A8 75%,
        #B8E994 100%
    );
}

/* Dev watermark */
.login-gradient {
    position: relative;
    overflow: hidden;
}

.dev-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 6rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.18);
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

/* Right form panel */
.login-panel {
    flex: 0 0 45%;
    background-color: var(--color-bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-form-container {
    width: 100%;
    max-width: 360px;
}

/* Logo */
.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.falcon-logo {
    height: 48px;
    width: auto;
}

/* Heading */
.login-heading {
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    color: var(--color-text);
    margin-bottom: 1rem;
}

.login-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
}

/* Alert */
.login-alert {
    background-color: rgba(248, 81, 73, 0.15);
    border: 1px solid var(--color-error);
    color: var(--color-error);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

/* Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Input group with icon */
.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--color-text-muted);
    pointer-events: none;
}

.input-icon svg {
    width: 100%;
    height: 100%;
}

.input-group input {
    width: 100%;
    padding: 12px 12px 12px 44px;
    background-color: var(--color-bg-input);
    border: 1px solid var(--color-border-input);
    border-radius: var(--border-radius);
    color: var(--color-text);
    font-size: 1rem;
    transition: border-color 0.2s, background-color 0.2s;
}

.input-group input::placeholder {
    color: var(--color-text-muted);
}

.input-group input:focus {
    outline: none;
    border-color: var(--color-link);
    background-color: rgba(255, 255, 255, 0.08);
}

/* Sign In button */
.login-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--color-btn-bg);
    color: var(--color-btn-text);
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.login-btn:hover {
    opacity: 0.9;
}

.login-btn:active {
    transform: scale(0.98);
}

/* Helper links */
.login-links {
    border-left: 3px solid var(--color-link);
    padding-left: 1rem;
}

.link-row {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.link-row:last-child {
    margin-bottom: 0;
}

.link-text {
    color: var(--color-text-muted);
}

.link-action {
    color: var(--color-link);
    text-decoration: none;
    margin-left: 0.25rem;
}

.link-action:hover {
    text-decoration: underline;
}

.build-info {
    position: fixed;
    bottom: 0.5rem;
    right: 0.75rem;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.25);
    pointer-events: none;
    user-select: none;
    font-family: monospace;
}

/* ============================================
   SESSION ACTIVE PAGE
   ============================================ */

.session-status {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 24px;
    font-size: 0.95rem;
}

.status-badge.status-running {
    background-color: rgba(39, 224, 157, 0.15);
    color: var(--color-link);
}

.status-badge.status-stopped {
    background-color: rgba(248, 81, 73, 0.15);
    color: var(--color-error);
}

.status-badge .status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-badge.status-running .status-dot {
    background-color: var(--color-link);
}

.status-badge.status-stopped .status-dot {
    background-color: var(--color-error);
    animation: none;
}

.session-info {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.session-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.session-label {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.session-value {
    color: var(--color-text);
    font-size: 0.875rem;
}

.session-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.session-btn-primary {
    text-align: center;
    text-decoration: none;
}

.session-btn-secondary {
    width: 100%;
    padding: 12px;
    background-color: transparent;
    color: var(--color-text-muted);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.session-btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--color-text);
}

.session-logout-form {
    width: 100%;
}

.session-help {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.session-help p {
    margin-bottom: 0.25rem;
}

/* Responsive - Login page */
@media (max-width: 900px) {
    .login-split {
        flex-direction: column;
    }

    .login-gradient {
        flex: 0 0 30vh;
    }

    .login-panel {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .login-gradient {
        display: none;
    }

    .login-panel {
        padding: 1.5rem;
    }

    .login-heading {
        font-size: 1.75rem;
    }
}

/* ============================================
   DASHBOARD / LOGGED-IN PAGES
   ============================================ */

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-link);
}

.nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.logout-form {
    display: inline;
}

/* Main content */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    width: 100%;
    max-width: 400px;
}

.alert-error {
    background-color: rgba(248, 81, 73, 0.15);
    border: 1px solid var(--color-error);
    color: #f8d7da;
}

.alert-info {
    background-color: rgba(88, 166, 255, 0.15);
    border: 1px solid var(--color-link-alt);
    color: #d1ecf1;
}

.alert-success {
    background-color: rgba(39, 224, 157, 0.15);
    border: 1px solid var(--color-link);
    color: #d4edda;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.1s;
}

.btn:hover {
    opacity: 0.9;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--color-btn-bg);
    color: var(--color-btn-text);
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: white;
}

.btn-full {
    width: 100%;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Dashboard */
.dashboard-container {
    width: 100%;
    max-width: 500px;
}

.dashboard-card {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 2rem;
}

.dashboard-title {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.5rem;
}

.service-status {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.status-running {
    background-color: rgba(39, 224, 157, 0.15);
}

.status-stopped {
    background-color: rgba(248, 81, 73, 0.15);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-running .status-dot {
    background-color: var(--color-link);
    animation: pulse 2s infinite;
}

.status-stopped .status-dot {
    background-color: var(--color-error);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.service-info {
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--color-text-muted);
}

.info-value {
    font-family: monospace;
}

.service-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.dashboard-footer {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.dashboard-footer p {
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    padding: 1rem 2rem;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive - Dashboard */
@media (max-width: 480px) {
    .header {
        flex-direction: column;
        gap: 1rem;
    }

    .dashboard-card {
        padding: 1.5rem;
    }
}
