/* View-specific styles not covered by components.css or layout.css */

/* ========== AUTH VIEW ========== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

/* Animated gradient background — fixed to viewport so it covers the entire screen */
.auth-wrapper::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 50vw 50vh at 20% 25%, rgba(138, 42, 86, 0.25) 0%, transparent 60%),
        radial-gradient(ellipse 45vw 45vh at 80% 75%, rgba(110, 234, 255, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse 35vw 35vh at 55% 45%, rgba(26, 29, 90, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 30vw 30vh at 85% 15%, rgba(138, 42, 86, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 40vw 40vh at 15% 85%, rgba(110, 234, 255, 0.10) 0%, transparent 50%);
    animation: authGradientMove 16s ease-in-out infinite alternate;
    z-index: 0;
    pointer-events: none;
}

/* Floating orb accents — fixed to viewport */
.auth-wrapper::after {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle 22vw at 10% 20%, rgba(138, 42, 86, 0.10) 0%, transparent 70%),
        radial-gradient(circle 25vw at 90% 80%, rgba(110, 234, 255, 0.08) 0%, transparent 70%),
        radial-gradient(circle 15vw at 75% 10%, rgba(138, 42, 86, 0.06) 0%, transparent 70%),
        radial-gradient(circle 18vw at 25% 90%, rgba(110, 234, 255, 0.06) 0%, transparent 70%);
    animation: authOrbFloat 12s ease-in-out infinite alternate-reverse;
    z-index: 0;
    pointer-events: none;
}

@keyframes authGradientMove {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    25% {
        transform: translate(2vw, -3vh) rotate(3deg) scale(1.05);
    }
    50% {
        transform: translate(-1vw, 2vh) rotate(-2deg) scale(0.97);
    }
    75% {
        transform: translate(3vw, 1vh) rotate(2deg) scale(1.03);
    }
    100% {
        transform: translate(-2vw, -1vh) rotate(-3deg) scale(1);
    }
}

@keyframes authOrbFloat {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    33% {
        transform: translate(3vw, -2vh) scale(1.1);
        opacity: 0.8;
    }
    66% {
        transform: translate(-2vw, 1.5vh) scale(0.95);
        opacity: 1;
    }
    100% {
        transform: translate(1.5vw, -3vh) scale(1.05);
        opacity: 0.85;
    }
}

/* Light theme gradient adjustments */
[data-theme="light"] .auth-wrapper::before {
    background:
        radial-gradient(ellipse 50vw 50vh at 20% 25%, rgba(138, 42, 86, 0.10) 0%, transparent 60%),
        radial-gradient(ellipse 45vw 45vh at 80% 75%, rgba(8, 145, 178, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse 35vw 35vh at 55% 45%, rgba(138, 42, 86, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse 30vw 30vh at 85% 15%, rgba(8, 145, 178, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 40vw 40vh at 15% 85%, rgba(138, 42, 86, 0.06) 0%, transparent 50%);
}

[data-theme="light"] .auth-wrapper::after {
    background:
        radial-gradient(circle 22vw at 10% 20%, rgba(138, 42, 86, 0.06) 0%, transparent 70%),
        radial-gradient(circle 25vw at 90% 80%, rgba(8, 145, 178, 0.06) 0%, transparent 70%),
        radial-gradient(circle 15vw at 75% 10%, rgba(138, 42, 86, 0.04) 0%, transparent 70%),
        radial-gradient(circle 18vw at 25% 90%, rgba(8, 145, 178, 0.04) 0%, transparent 70%);
}

.auth-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 48px 40px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

[data-theme="light"] .auth-card {
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

.auth-logo {
    text-align: center;
    margin-bottom: 36px;
}

.auth-logo .logo-mark {
    margin: 0 auto 16px;
    width: 56px;
    height: 56px;
    font-size: 24px;
}

.auth-logo h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.auth-logo p {
    font-size: 13px;
    color: var(--text-muted);
}

.auth-step {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.auth-input {
    font-size: 16px;
    padding: 14px 16px;
}

.auth-code-input {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 8px;
    font-family: 'Inter', monospace;
}

.auth-btn {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    margin-top: 4px;
}

.auth-error {
    color: var(--red);
    font-size: 13px;
    min-height: 0;
}

.auth-error:empty {
    display: none;
}

.auth-hint {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.auth-sent-to {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.auth-sent-to strong {
    color: var(--cyan);
}

.auth-back-btn {
    width: 100%;
    font-size: 13px;
}

/* ========== SETUP VIEW ========== */
.setup-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 48px 40px;
    backdrop-filter: blur(16px);
    width: 100%;
    max-width: 480px;
}

.setup-header {
    text-align: center;
    margin-bottom: 32px;
}

.setup-header .logo-mark {
    margin: 0 auto 16px;
    width: 56px;
    height: 56px;
    font-size: 24px;
}

.setup-header h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.setup-header p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.setup-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.setup-form .form-group {
    margin-bottom: 0;
}

.setup-success {
    color: var(--green);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.setup-success:empty {
    display: none;
}

.form-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ========== HEADER USER EMAIL ========== */
.user-email-badge {
    font-size: 11px;
    color: var(--text-muted);
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========== JIRA TICKET DESCRIPTION ========== */
.jira-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.jira-description h1, .jira-description h2, .jira-description h3 {
    color: var(--text-primary);
    margin: 16px 0 8px;
}

.jira-description p { margin-bottom: 12px; }
.jira-description ul, .jira-description ol { padding-left: 20px; margin-bottom: 12px; }
.jira-description li { margin-bottom: 4px; }

.jira-description code {
    background: var(--bg-hover-strong);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--cyan);
}

.jira-description pre {
    background: var(--bg-subtle);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    margin-bottom: 12px;
}

.jira-description pre code {
    background: none;
    padding: 0;
}

.jira-description a {
    color: var(--cyan);
}

/* ========== PROJECT CARD (dashboard grid) ========== */
.project-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 28px;
    backdrop-filter: blur(16px);
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.project-card-header h3 {
    font-size: 17px;
    font-weight: 600;
}

.project-card-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.project-mini-stat {
    text-align: center;
}

.project-mini-stat .value {
    font-size: 20px;
    font-weight: 700;
}

.project-mini-stat .label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Mini progress bar for project cards */
.mini-progress {
    height: 6px;
    background: var(--progress-track);
    border-radius: 100px;
    overflow: hidden;
    margin-top: 12px;
}

.mini-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--magenta), var(--cyan));
    border-radius: 100px;
    transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ========== TAB SECTIONS ========== */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ========== DATA TABLE (admin) ========== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--card-border);
}

.data-table td {
    padding: 14px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border-divider);
    color: var(--text-secondary);
}

.data-table tr:hover td {
    background: var(--bg-subtle);
}

.data-table .actions {
    display: flex;
    gap: 8px;
}
