/*
 * Missionize Authentication Styles
 * Light theme for login, register, and dashboard
 */

:root {
    --color-bg: #f8fafc;
    --color-bg-secondary: #ffffff;
    --color-bg-card: #ffffff;
    --color-text: #1f2937;
    --color-text-muted: #6b7280;
    --color-accent: #10b981;
    --color-accent-blue: #3b82f6;
    --color-gradient-start: #10b981;
    --color-gradient-end: #059669;
    --color-border: #e5e7eb;
    --color-error: #ef4444;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

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

/* Auth Container */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-box {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 3rem;
    max-width: 450px;
    width: 100%;
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo img {
    height: 40px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.1);
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    font-family: var(--font-sans);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end));
    color: white;
    width: 100%;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(45, 212, 191, 0.3);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

.btn-secondary:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

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

.btn-danger:hover {
    background: #dc2626;
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: none;
}

.alert.show {
    display: block;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--color-error);
    color: var(--color-error);
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid var(--color-success);
    color: var(--color-success);
}

.alert-warning {
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid var(--color-warning);
    color: var(--color-warning);
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.auth-footer a {
    color: var(--color-accent);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Dashboard Layout */
.dashboard-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Status Bar */
.status-bar {
    background: var(--color-bg-secondary);
    border-bottom: 1px solid var(--color-border);
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    font-size: 0.9rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-indicator.online {
    background: var(--color-success);
    box-shadow: 0 0 8px var(--color-success);
}

.status-indicator.offline {
    background: var(--color-error);
    box-shadow: 0 0 8px var(--color-error);
}

.status-indicator.standby {
    background: var(--color-warning);
    box-shadow: 0 0 8px var(--color-warning);
}

.status-refresh {
    margin-left: auto;
}

.status-refresh button {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

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

.status-value {
    color: var(--color-text);
    font-weight: 500;
}

/* Dashboard Header */
.dashboard-header {
    background: var(--color-bg-card);
    border-bottom: 1px solid var(--color-border);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-logo img {
    height: 32px;
}

.dashboard-user {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

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

/* Dashboard Content */
.dashboard-content {
    flex: 1;
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.dashboard-section {
    margin-bottom: 3rem;
}

.section-header {
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.section-header p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* Cards */
.card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s;
}

.card:hover {
    border-color: var(--color-accent);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

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

/* Coming Soon Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-warning {
    background: rgba(234, 179, 8, 0.2);
    color: var(--color-warning);
}

/* Profile Card */
.profile-info {
    display: grid;
    gap: 1rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
}

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

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

.info-value {
    color: var(--color-text);
    font-weight: 500;
}

/* API Keys */
.api-keys-list {
    display: grid;
    gap: 1rem;
}

.api-key-item {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
}

.key-info h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.key-prefix {
    font-family: var(--font-mono);
    color: var(--color-accent);
    font-size: 0.85rem;
}

.key-meta {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.key-actions {
    display: flex;
    gap: 0.5rem;
}

.create-key-btn {
    margin-top: 1rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
}

.modal-header {
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    font-size: 1.25rem;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.modal-footer .btn {
    flex: 1;
}

/* Code Display */
.code-display {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--color-accent);
    word-break: break-all;
    margin: 1rem 0;
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 300px;
    background-color: var(--color-bg-secondary);
    color: var(--color-text);
    text-align: left;
    border-radius: 8px;
    padding: 1rem;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -150px;
    opacity: 0;
    transition: opacity 0.3s;
    border: 1px solid var(--color-border);
    font-size: 0.85rem;
    line-height: 1.5;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-box {
        padding: 2rem;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .dashboard-user {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .status-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1rem;
    }

    .status-refresh {
        margin-left: 0;
        width: 100%;
    }

    .status-refresh button {
        width: 100%;
    }

    .dashboard-content {
        padding: 2rem 1rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .api-key-item {
        grid-template-columns: 1fr;
    }
}
/* ============================================================================
   LOGO ANIMATION - Working State Indicator
   ============================================================================ */
.dashboard-logo img,
.auth-logo img {
    transition: all 0.3s ease;
}
/* Pulse/glow animation when Missionize is working */
.dashboard-logo.working img,
.auth-logo.working img {
    animation: logo-pulse 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(45, 212, 191, 0.6));
}
@keyframes logo-pulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 8px rgba(45, 212, 191, 0.4));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 16px rgba(45, 212, 191, 0.8));
    }
}
/* Status bar indicators also animate when working */
.status-bar.working .status-indicator.online {
    animation: indicator-pulse 1s ease-in-out infinite;
}
@keyframes indicator-pulse {
    0%, 100% {
        box-shadow: 0 0 4px currentColor;
    }
    50% {
        box-shadow: 0 0 12px currentColor;
    }
}
