/* ============================================================
   EternaForge — Auth Page Styles
   ============================================================ */

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

:root {
    --primary:       #1e6bbd;
    --primary-dark:  #1558a0;
    --primary-light: #e8f1fb;
    --accent:        #2563eb;
    --text-dark:     #111827;
    --text-mid:      #374151;
    --text-muted:    #6b7280;
    --text-light:    #9ca3af;
    --border:        #e5e7eb;
    --border-focus:  #1e6bbd;
    --bg-white:      #ffffff;
    --bg-panel:      #f9fafb;
    --error:         #ef4444;
    --success:       #10b981;
    --warning:       #f59e0b;
    --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
    --shadow-md:     0 4px 16px rgba(0,0,0,.10);
    --shadow-lg:     0 8px 32px rgba(0,0,0,.15);
    --radius-sm:     8px;
    --radius-md:     12px;
    --radius-lg:     20px;
    --font:          'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html, body {
    height: 100%;
    font-family: var(--font);
    background: #dde3ec;
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
}

/* ---- Wrapper ---- */
.auth-wrapper {
    display: flex;
    height: 100vh;
    min-height: 600px;
    padding: 20px;
    align-items: stretch;
    overflow: hidden;
}

/* ============================================================
   LEFT PANEL
   ============================================================ */
.auth-left {
    flex: 0 0 50%;
    background: var(--bg-white);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
}

.auth-left-inner {
    width: 100%;
    max-width: 420px;
    padding: 0 48px;
    display: flex;
    flex-direction: column;
}

/* ---- Logo ---- */
.auth-logo {
    margin-bottom: 44px;
}

.logo-img {
    height: 44px;
    width: auto;
    display: block;
}

/* ---- Heading ---- */
.auth-heading {
    margin-bottom: 32px;
}

.auth-heading h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.auth-heading p {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.65;
}

/* ---- Alert ---- */
.auth-alert {
    display: none;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.5;
}

.auth-alert.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    display: block;
}

.auth-alert.success {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    display: block;
}

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

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

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-mid);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.forgot-link {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
}

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

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

.input-icon {
    position: absolute;
    left: 12px;
    color: var(--text-light);
    display: flex;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 11px 40px 11px 38px;
    font-size: 14px;
    font-family: var(--font);
    color: var(--text-dark);
    background: var(--bg-white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.input-wrapper input::placeholder { color: var(--text-light); }

.input-wrapper input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(30,107,189,.12);
}

.input-wrapper input.is-invalid {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(239,68,68,.10);
}

.toggle-password {
    position: absolute;
    right: 11px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    display: flex;
    padding: 2px;
    border-radius: 4px;
    transition: color .2s;
}

.toggle-password:hover { color: var(--text-mid); }

.field-error {
    font-size: 12px;
    color: var(--error);
    min-height: 16px;
}

/* ---- Button ---- */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 24px;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font);
    color: #fff;
    background: linear-gradient(135deg, #1e6bbd 0%, #1558a0 100%);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: opacity .2s, transform .1s, box-shadow .2s;
    box-shadow: 0 2px 14px rgba(30,107,189,.38);
    margin-top: 6px;
}

.btn-primary:hover {
    opacity: .92;
    box-shadow: 0 4px 20px rgba(30,107,189,.48);
}

.btn-primary:active { transform: scale(.985); }
.btn-primary:disabled { opacity: .65; cursor: not-allowed; }

.btn-spinner svg { animation: spin .7s linear infinite; }

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

/* ---- Footer ---- */
.auth-footer {
    position: absolute;
    bottom: 28px;
    left: 0;
    right: 0;
    text-align: center;
}

.auth-footer p {
    font-size: 12px;
    color: var(--text-light);
    text-align: center;
}

/* ============================================================
   RIGHT PANEL — SLIDER
   ============================================================ */
.auth-right {
    flex: 0 0 50%;
    background: linear-gradient(155deg, #0d2a5e 0%, #061429 100%);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    position: relative;
    overflow: hidden;
}

/* Grid texture */
.auth-right::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(37,99,235,.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37,99,235,.07) 1px, transparent 1px);
    background-size: 44px 44px;
    pointer-events: none;
    z-index: 0;
}

/* ---- Slider wrapper ---- */
.slider-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- Slides ---- */
.slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 60px 48px 80px;
    opacity: 0;
    transform: translateX(40px);
    transition: opacity .5s ease, transform .5s ease;
    pointer-events: none;
    z-index: 1;
}

.slide.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.slide.exit-left {
    opacity: 0;
    transform: translateX(-40px);
}

/* ---- Visual area ---- */
.slide-visual {
    position: relative;
    width: 100%;
    max-width: 480px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.slide-card-main {
    flex: 1;
    animation: floatMain 5s ease-in-out infinite;
}

.slide-card-side {
    width: 130px;
    flex-shrink: 0;
    animation: floatSide 5.5s ease-in-out infinite;
    margin-top: 24px;
}

@keyframes floatMain {
    0%,100% { transform: translateY(0px); }
    50%      { transform: translateY(-8px); }
}
@keyframes floatSide {
    0%,100% { transform: translateY(0px); }
    50%      { transform: translateY(-5px); }
}

/* ---- Cards ---- */
.showcase-card {
    background: rgba(255,255,255,.97);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,.4);
    color: var(--text-dark);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.card-title {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-dark);
}

.card-meta {
    font-size: 10px;
    color: var(--text-muted);
}

.card-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 99px;
}

.badge-green { background: #d1fae5; color: #065f46; }
.badge-blue  { background: #dbeafe; color: #1e40af; }

/* Sprint card */
.card-stat { margin-bottom: 12px; }

.stat-num {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -1px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: 6px;
}

.card-progress-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.progress-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
}

.progress-item > span:first-child { min-width: 68px; }

.progress-item > span:last-child {
    font-weight: 600;
    color: var(--text-dark);
    min-width: 18px;
    text-align: right;
}

.progress-bar {
    flex: 1;
    height: 5px;
    background: #f3f4f6;
    border-radius: 99px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 99px;
}

.card-action-btn {
    width: 100%;
    padding: 8px 0;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font);
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* Side mini stats */
.mini-stat-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.ms-num {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.ms-label {
    font-size: 10px;
    color: var(--text-muted);
}

/* Bug card */
.bug-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.bug-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
}

.bug-tag {
    font-size: 9.5px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.bug-tag.critical { background: #fef2f2; color: #991b1b; }
.bug-tag.high     { background: #fff7ed; color: #92400e; }
.bug-tag.medium   { background: #fffbeb; color: #78350f; }
.bug-tag.low      { background: #f0fdf4; color: #14532d; }

.bug-name {
    color: var(--text-mid);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bug-assign {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.av-sm { width: 22px; height: 22px; font-size: 8px; }

/* Bug count side card */
.bug-counts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bc-item { text-align: center; }

.bc-num {
    display: block;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.bc-label { font-size: 10px; color: var(--text-muted); }
.bc-critical { color: #dc2626; }
.bc-high     { color: #d97706; }
.bc-med      { color: #ca8a04; }

/* Team card */
.team-members {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.member {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.av-1 { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.av-2 { background: linear-gradient(135deg, #ec4899, #db2777); }
.av-3 { background: linear-gradient(135deg, #f59e0b, #d97706); }
.av-4 { background: linear-gradient(135deg, #10b981, #059669); }

.member-info {
    display: flex;
    flex-direction: column;
    min-width: 68px;
}

.member-name {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-dark);
}

.member-role {
    font-size: 9.5px;
    color: var(--text-muted);
}

.member-bar-wrap {
    flex: 1;
    height: 5px;
    background: #f3f4f6;
    border-radius: 99px;
    overflow: hidden;
}

.member-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1e6bbd);
    border-radius: 99px;
}

.member-pts {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    min-width: 36px;
    text-align: right;
}

/* ---- Slide text ---- */
.slide-text {
    text-align: center;
    color: rgba(255,255,255,.9);
    max-width: 420px;
}

.slide-text h2 {
    font-size: 21px;
    font-weight: 400;
    line-height: 1.4;
    color: rgba(255,255,255,.8);
    margin-bottom: 10px;
}

.slide-text h2 strong {
    font-weight: 800;
    color: #fff;
}

.slide-text p {
    font-size: 13px;
    color: rgba(255,255,255,.5);
    line-height: 1.7;
}

/* ---- Slider dots ---- */
.slider-dots {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 7px;
    z-index: 10;
}

.slider-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,.3);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background .3s, width .3s;
}

.slider-dot.active {
    background: #fff;
    width: 22px;
    border-radius: 4px;
}

/* ---- Arrows ---- */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
    color: rgba(255,255,255,.8);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background .2s, color .2s;
    backdrop-filter: blur(4px);
}

.slider-arrow:hover {
    background: rgba(255,255,255,.22);
    color: #fff;
}

.arrow-prev { left: 20px; }
.arrow-next { right: 20px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
    .auth-wrapper {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        overflow: auto;
        padding: 12px;
    }
    .auth-left {
        flex: none;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
    .auth-left-inner { padding: 36px 32px; justify-content: flex-start; }
    .auth-right {
        flex: none;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
        min-height: 420px;
    }
    .slide { padding: 40px 32px 72px; }
}

@media (max-width: 480px) {
    .auth-left-inner { padding: 28px 20px; }
    .auth-heading h1 { font-size: 20px; }
    .slide-card-side { display: none; }
}
