/* ============================================================
   TACTICAL UX - Design System Premium
   Style: Military HUD / Mission Briefing Interface
   ============================================================ */

/* === TYPOGRAPHY === */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Rajdhani:wght@400;500;600;700&display=swap');

/* === WEEK TIMELINE - Tactical Mission Calendar === */
.week-timeline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 12px 10px;
    margin: 12px 12px 12px;
    background: linear-gradient(180deg, rgba(20, 20, 20, 0.95) 0%, rgba(10, 10, 10, 0.98) 100%);
    border: 1px solid rgba(46, 204, 113, 0.15);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

/* Week navigation buttons */
.week-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.2);
    border-radius: 8px;
    color: #2ECC71;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    z-index: 2;
}

.week-nav-btn:hover:not(.disabled) {
    background: rgba(46, 204, 113, 0.2);
    transform: scale(1.05);
}

.week-nav-btn:active:not(.disabled) {
    transform: scale(0.95);
}

.week-nav-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Today quick-return button */
.week-today-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.3) 0%, rgba(25, 230, 57, 0.2) 100%);
    border: 1px solid rgba(46, 204, 113, 0.5);
    border-radius: 50%;
    color: #2ECC71;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3;
    animation: pulse-today 2s ease-in-out infinite;
}

@keyframes pulse-today {
    0%, 100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(46, 204, 113, 0); }
}

.week-today-btn:hover {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.5) 0%, rgba(25, 230, 57, 0.3) 100%);
    transform: scale(1.1);
}

.week-today-btn:active {
    transform: scale(0.95);
}

/* Days container */
.week-days-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.week-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(46, 204, 113, 0.7);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.week-days {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    gap: 0;
    position: relative;
}

/* Ligne de connexion entre les jours */
.week-days::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(46, 204, 113, 0.15) 15%,
        rgba(46, 204, 113, 0.15) 85%,
        transparent 100%
    );
    z-index: 0;
}

/* Scan line animation */
.week-timeline::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(46, 204, 113, 0.03) 50%,
        transparent 100%
    );
    animation: timeline-scan 4s ease-in-out infinite;
}

@keyframes timeline-scan {
    0% { left: -50%; }
    100% { left: 150%; }
}

/* Chaque jour - Hexagonal style */
.day-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    z-index: 1;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 4px 2px;
    border-radius: 10px;
}

.day-node:hover:not(.is-future):not(.is-before-account) {
    background: rgba(46, 204, 113, 0.08);
}

.day-node:active:not(.is-future):not(.is-before-account) {
    transform: scale(0.9);
    background: rgba(46, 204, 113, 0.15);
}

.day-node.is-future {
    cursor: not-allowed;
    opacity: 0.4;
}

/* Before account creation — locked/inaccessible */
.day-node.is-before-account {
    cursor: not-allowed;
    opacity: 0.25;
}

.day-node.is-before-account .day-hex-inner {
    background: rgba(15, 15, 15, 0.6);
}

.day-node.is-before-account .day-num {
    color: rgba(255, 255, 255, 0.12);
}

.day-node.is-before-account .day-label {
    color: rgba(255, 255, 255, 0.1);
}

/* Hexagon container */
.day-hex {
    position: relative;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hexagon shape using clip-path */
.day-hex-inner {
    width: 28px;
    height: 28px;
    background: rgba(30, 30, 30, 0.9);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

/* Hexagon border effect */
.day-hex::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    opacity: 0.5;
}

/* Day number inside hex */
.day-num {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: -0.5px;
    transition: all 0.3s ease;
}

/* Day label below hex */
.day-label {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

/* === DAY STATES === */

/* Current day - Glowing green */
.day-node.is-today .day-hex-inner {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.3) 0%, rgba(25, 230, 57, 0.2) 100%);
    box-shadow:
        0 0 20px rgba(46, 204, 113, 0.4),
        inset 0 0 15px rgba(46, 204, 113, 0.2);
}

.day-node.is-today .day-hex::before {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.4) 0%, transparent 60%);
    opacity: 1;
}

.day-node.is-today .day-num {
    color: #2ECC71;
    text-shadow: 0 0 10px rgba(46, 204, 113, 0.8);
}

.day-node.is-today .day-label {
    color: rgba(46, 204, 113, 0.9);
    font-weight: 700;
}

/* Pulse animation for today */
.day-node.is-today .day-hex-inner::after {
    content: '';
    position: absolute;
    inset: -4px;
    background: transparent;
    border: 2px solid rgba(46, 204, 113, 0.5);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: hex-pulse 2s ease-in-out infinite;
}

@keyframes hex-pulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.08);
    }
}

/* Good day (>= 80%) - Solid green */
.day-node.is-good .day-hex-inner {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.25) 0%, rgba(46, 204, 113, 0.15) 100%);
}

.day-node.is-good .day-num {
    color: #2ECC71;
}

.day-node.is-good .day-label {
    color: rgba(46, 204, 113, 0.7);
}

/* Checkmark for completed days */
.day-node.is-good .day-hex-inner::before {
    content: '✓';
    position: absolute;
    font-size: 0.6rem;
    color: #2ECC71;
    top: 2px;
    right: 2px;
    opacity: 0.8;
}

/* Perfect day (100%) - Bright green */
.day-node.is-perfect .day-hex-inner {
    background: linear-gradient(135deg, rgba(0, 230, 64, 0.35) 0%, rgba(46, 204, 113, 0.25) 100%);
    box-shadow: 0 0 8px rgba(0, 230, 64, 0.3);
}

.day-node.is-perfect .day-num {
    color: #00E640;
}

.day-node.is-perfect .day-label {
    color: rgba(0, 230, 64, 0.8);
}

.day-node.is-perfect .day-hex-inner::before {
    content: '✓';
    position: absolute;
    font-size: 0.6rem;
    color: #00E640;
    top: 2px;
    right: 2px;
    opacity: 1;
}

/* Partial day (< 80%) - Orange/amber */
.day-node.is-partial .day-hex-inner {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.2) 0%, rgba(230, 126, 34, 0.15) 100%);
}

.day-node.is-partial .day-num {
    color: #F39C12;
}

.day-node.is-partial .day-label {
    color: rgba(243, 156, 18, 0.6);
}

/* Missed day - Red with X */
.day-node.is-missed .day-hex-inner {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.15) 0%, rgba(192, 57, 43, 0.1) 100%);
}

.day-node.is-missed .day-num {
    color: rgba(231, 76, 60, 0.7);
    text-decoration: line-through;
    text-decoration-color: rgba(231, 76, 60, 0.5);
}

.day-node.is-missed .day-label {
    color: rgba(231, 76, 60, 0.5);
}

/* Rest day - Neutral gray */
.day-node.is-rest .day-hex-inner {
    background: rgba(45, 45, 45, 0.5);
}

.day-node.is-rest .day-num {
    color: rgba(255, 255, 255, 0.25);
}

.day-node.is-rest .day-label {
    color: rgba(255, 255, 255, 0.2);
}

/* Future day - Faded */
.day-node.is-future .day-hex-inner {
    background: rgba(25, 25, 25, 0.6);
    opacity: 0.5;
}

.day-node.is-future .day-num {
    color: rgba(255, 255, 255, 0.15);
}

/* Selected day indicator */
.day-node.is-selected .day-hex::after {
    content: '';
    position: absolute;
    inset: -3px;
    border: 2px solid var(--accent-green);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: selected-glow 1.5s ease-in-out infinite;
}

@keyframes selected-glow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}


/* ============================================================
   HABIT CARDS - Tactical Mission Cards
   ============================================================ */

.habits-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 12px 12px;
}

/* Mission Card */
.mission-card {
    position: relative;
    background: linear-gradient(135deg,
        rgba(20, 20, 20, 0.98) 0%,
        rgba(15, 15, 15, 0.95) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center;
    /* Entry animation */
    animation: card-slide-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

@keyframes card-slide-in {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.mission-card:active {
    transform: scale(0.97);
}

/* Hover glow effect */
.mission-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(46, 204, 113, 0.05) 0%,
        transparent 50%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mission-card:hover::before,
.mission-card:active::before {
    opacity: 1;
}

/* Scan line effect on card */
.mission-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(46, 204, 113, 0.03) 40%,
        rgba(46, 204, 113, 0.06) 50%,
        rgba(46, 204, 113, 0.03) 60%,
        transparent 100%
    );
    transition: left 0.6s ease;
    pointer-events: none;
}

.mission-card:hover::after {
    left: 150%;
}

/* Left status bar - Charge indicator */
.mission-status-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.mission-charge {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(0deg,
        rgba(46, 204, 113, 0.8) 0%,
        rgba(25, 230, 57, 0.6) 100%
    );
    transition: height 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 0 12px rgba(46, 204, 113, 0.5);
}

/* Card content layout */
.mission-content {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 16px 16px 20px;
    position: relative;
    z-index: 1;
}

/* Icon container */
.mission-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    background: rgba(46, 204, 113, 0.10);
    border: 1px solid rgba(46, 204, 113, 0.15);
    border-radius: 12px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

/* Main info */
.mission-info {
    flex: 1;
    min-width: 0;
}

.mission-name {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mission-desc {
    font-size: 0.72rem;
    color: var(--accent-dim);
    opacity: 0.7;
    font-style: italic;
    margin-bottom: 3px;
    line-height: 1.3;
}

.mission-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mission-streak {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.mission-streak-fire {
    font-size: 0.7rem;
    filter: grayscale(0.3);
}

/* Stats badge */
.mission-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.mission-percent {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.mission-progress-ring {
    width: 38px;
    height: 38px;
    position: relative;
}

.mission-progress-ring svg {
    transform: rotate(-90deg);
}

.mission-progress-ring circle {
    fill: none;
    stroke-width: 3;
}

.mission-progress-ring .ring-bg {
    stroke: rgba(255, 255, 255, 0.08);
}

.mission-progress-ring .ring-fill {
    stroke: rgba(46, 204, 113, 0.4);
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    transition: stroke-dashoffset 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    stroke-linecap: round;
}

/* ============================================================
   MISSION CARD STATES
   ============================================================ */

/* === COMPLETED STATE === */
.mission-card.is-completed {
    border-color: rgba(46, 204, 113, 0.25);
}

.mission-card.is-completed .mission-charge {
    height: 100%;
}

.mission-card.is-completed .mission-icon {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.25) 0%, rgba(25, 230, 57, 0.15) 100%);
    border-color: rgba(46, 204, 113, 0.4);
    box-shadow: 0 0 16px rgba(46, 204, 113, 0.2);
}

.mission-card.is-completed .mission-name {
    color: #2ECC71;
}

.mission-card.is-completed .mission-streak {
    color: rgba(46, 204, 113, 0.7);
}

.mission-card.is-completed .mission-streak-fire {
    filter: none;
    animation: fire-glow 1s ease-in-out infinite alternate;
}

@keyframes fire-glow {
    0% { filter: drop-shadow(0 0 2px rgba(255, 150, 0, 0.5)); }
    100% { filter: drop-shadow(0 0 6px rgba(255, 100, 0, 0.8)); }
}

.mission-card.is-completed .mission-percent {
    color: #2ECC71;
    text-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
}

.mission-card.is-completed .ring-fill {
    stroke: #2ECC71;
}

/* Checkmark animation overlay */
.mission-card .mission-check {
    position: absolute;
    top: 0;
    left: 0;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: currentColor;
    border-radius: 50%;
    animation: check-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mission-card .mission-check svg {
    width: 24px;
    height: 24px;
    stroke: #0A0A0A;
    stroke-width: 4;
}

@keyframes check-pop {
    0% { transform: scale(0) rotate(-45deg); opacity: 0; }
    50% { transform: scale(1.2) rotate(0); }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

/* === FAILED STATE (Past days) === */
.mission-card.is-failed {
    border-color: rgba(231, 76, 60, 0.2);
}

.mission-card.is-failed .mission-status-bar {
    background: rgba(231, 76, 60, 0.2);
}

.mission-card.is-failed .mission-charge {
    background: linear-gradient(0deg, rgba(231, 76, 60, 0.5) 0%, transparent 100%);
    height: 30%;
}

.mission-card.is-failed .mission-icon {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.15) 0%, rgba(192, 57, 43, 0.1) 100%);
    border-color: rgba(231, 76, 60, 0.25);
    filter: grayscale(0.5);
}

.mission-card.is-failed .mission-name {
    color: rgba(231, 76, 60, 0.8);
    text-decoration: line-through;
    text-decoration-color: rgba(231, 76, 60, 0.4);
}

.mission-card.is-failed .mission-streak {
    color: rgba(231, 76, 60, 0.5);
}

.mission-card.is-failed .mission-percent {
    color: rgba(231, 76, 60, 0.6);
}

.mission-card.is-failed .ring-fill {
    stroke: rgba(231, 76, 60, 0.5);
}

/* X mark for failed */
.mission-card.is-failed .mission-fail-mark {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(231, 76, 60, 0.6);
    font-size: 0.75rem;
    font-weight: 900;
}

/* === LOCKED STATE === */
.mission-card.is-locked {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(0.3);
}

.mission-card.is-locked .mission-charge {
    background: rgba(255, 255, 255, 0.1);
}

/* ============================================================
   EMPTY STATES
   ============================================================ */

.empty-state {
    text-align: center;
    padding: 50px 30px;
    margin: 0 12px;
    background: linear-gradient(180deg, rgba(20, 20, 20, 0.8) 0%, rgba(15, 15, 15, 0.6) 100%);
    border: 1px dashed rgba(46, 204, 113, 0.2);
    border-radius: 16px;
}

.empty-state-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.15) 0%, rgba(46, 204, 113, 0.05) 100%);
    border: 1px solid rgba(46, 204, 113, 0.2);
    border-radius: 20px;
    font-size: 2rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.empty-state-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.empty-state-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: var(--accent-dim);
    line-height: 1.5;
    margin-bottom: 24px;
}

.empty-state-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.2) 0%, rgba(25, 230, 57, 0.15) 100%);
    border: 1px solid rgba(46, 204, 113, 0.4);
    border-radius: 12px;
    color: #2ECC71;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.empty-state-btn:hover {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.3) 0%, rgba(25, 230, 57, 0.2) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(46, 204, 113, 0.3);
}

/* Rest day state */
.rest-state {
    text-align: center;
    padding: 40px 30px;
    margin: 0 12px;
}

.rest-state-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    filter: grayscale(0.3);
}

.rest-state-icon svg {
    display: block;
    margin: 0 auto;
}

.rest-state-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.rest-state-text {
    font-size: 0.85rem;
    color: var(--accent-dim);
}

/* ============================================================
   LIGHT THEME OVERRIDES
   ============================================================ */

[data-theme="light"] .week-timeline {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 250, 0.95) 100%);
    border-color: rgba(46, 204, 113, 0.2);
}

[data-theme="light"] .week-days::before {
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(46, 204, 113, 0.15) 10%,
        rgba(46, 204, 113, 0.15) 90%,
        transparent 100%
    );
}

[data-theme="light"] .week-nav-btn {
    background: rgba(46, 204, 113, 0.08);
    border-color: rgba(46, 204, 113, 0.15);
}

[data-theme="light"] .week-label {
    color: rgba(46, 204, 113, 0.8);
}

[data-theme="light"] .day-hex-inner {
    background: rgba(248, 249, 250, 0.95);
}

[data-theme="light"] .day-num {
    color: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .day-label {
    color: rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .mission-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 250, 0.95) 100%);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .mission-icon {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.1) 0%, rgba(46, 204, 113, 0.05) 100%);
}

[data-theme="light"] .mission-name {
    color: #212529;
}

[data-theme="light"] .mission-streak {
    color: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .mission-percent {
    color: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .empty-state {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 249, 250, 0.8) 100%);
    border-color: rgba(46, 204, 113, 0.25);
}

/* ============================================================
   TACTICAL BUTTONS - Unified button system
   ============================================================ */

/* Toggle badges button - Tactical style */
#toggleBadgesBtn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    background: linear-gradient(135deg,
        rgba(20, 20, 20, 0.95) 0%,
        rgba(15, 15, 15, 0.9) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-family: 'Rajdhani', 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#toggleBadgesBtn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(46, 204, 113, 0.08) 0%,
        transparent 60%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

#toggleBadgesBtn:hover::before,
#toggleBadgesBtn:active::before {
    opacity: 1;
}

#toggleBadgesBtn:hover {
    border-color: rgba(46, 204, 113, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

#toggleBadgesBtn:active {
    transform: scale(0.98) translateY(0);
}

#toggleBadgesBtn svg {
    width: 18px;
    height: 18px;
    stroke: #2ECC71;
    transition: all 0.3s ease;
}

#toggleBadgesBtn:hover svg {
    filter: drop-shadow(0 0 6px rgba(46, 204, 113, 0.5));
}

/* Scan line effect */
#toggleBadgesBtn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(46, 204, 113, 0.1) 50%,
        transparent 100%
    );
    transition: left 0.5s ease;
}

#toggleBadgesBtn:hover::after {
    left: 150%;
}

/* Badge section header - tactical style */
.badges-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.9) 0%, rgba(15, 15, 15, 0.85) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    margin-bottom: 12px;
}

.badges-section-header svg {
    stroke: #F39C12;
    filter: drop-shadow(0 0 6px rgba(243, 156, 18, 0.4));
}

.badges-section-header .badges-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent);
}

/* Badges progress bar tactical */
.badges-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(243, 156, 18, 0.8);
}

.progress-bar-small {
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill-small {
    height: 100%;
    background: linear-gradient(90deg, #F39C12, #E67E22);
    border-radius: 2px;
    transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* === QR BUTTON TACTICAL === */
.btn-tactical-qr {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.2) 0%, rgba(25, 230, 57, 0.1) 100%);
    border: 1px solid rgba(46, 204, 113, 0.35);
    border-radius: 12px;
    color: #2ECC71;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-tactical-qr::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.1) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-tactical-qr:hover {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.3) 0%, rgba(25, 230, 57, 0.15) 100%);
    border-color: rgba(46, 204, 113, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(46, 204, 113, 0.2);
    color: #19E639;
}

.btn-tactical-qr:hover::before {
    opacity: 1;
}

.btn-tactical-qr:active {
    transform: translateY(0) scale(0.96);
}

.btn-tactical-qr svg {
    stroke: currentColor;
    filter: drop-shadow(0 0 5px rgba(46, 204, 113, 0.4));
    transition: all 0.3s ease;
}

.btn-tactical-qr:hover svg {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(46, 204, 113, 0.6));
}

/* Scan line effect */
.btn-tactical-qr::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(46, 204, 113, 0.15) 50%,
        transparent 100%
    );
    transition: left 0.6s ease;
}

.btn-tactical-qr:hover::after {
    left: 150%;
}

/* Light theme */
[data-theme="light"] .btn-tactical-qr {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.15) 0%, rgba(46, 204, 113, 0.08) 100%);
    border-color: rgba(46, 204, 113, 0.3);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .btn-tactical-qr:hover {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.25) 0%, rgba(46, 204, 113, 0.15) 100%);
    box-shadow: 0 6px 15px rgba(46, 204, 113, 0.15);
}

/* === GROUP CODE TACTICAL === */
.group-code-tactical {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.group-code-tactical:hover {
    background: rgba(30, 30, 30, 0.8);
    border-color: rgba(46, 204, 113, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3), inset 0 0 5px rgba(46, 204, 113, 0.1);
}

.group-code-tactical:active {
    transform: translateY(0) scale(0.98);
}

.group-code-value-tactical {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 4px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
}

.group-code-copy-tactical {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-dim);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.group-code-tactical:hover .group-code-copy-tactical {
    opacity: 1;
    color: var(--accent-green);
    transform: rotate(5deg) scale(1.1);
}

/* Corner accents for technical look */
.group-code-tactical::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 8px;
    height: 8px;
    border-top: 2px solid rgba(46, 204, 113, 0.5);
    border-left: 2px solid rgba(46, 204, 113, 0.5);
    border-radius: 4px 0 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.group-code-tactical::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 8px;
    height: 8px;
    border-bottom: 2px solid rgba(46, 204, 113, 0.5);
    border-right: 2px solid rgba(46, 204, 113, 0.5);
    border-radius: 0 0 4px 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.group-code-tactical:hover::before,
.group-code-tactical:hover::after {
    opacity: 1;
}

/* Light theme overrides */
[data-theme="light"] .group-code-tactical {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .group-code-tactical:hover {
    background: rgba(0, 0, 0, 0.07);
    border-color: rgba(46, 204, 113, 0.4);
}

[data-theme="light"] .group-code-value-tactical {
    color: #212529;
    text-shadow: none;
}

/* === CHAT SYSTEM MESSAGES TACTICAL === */
.chat-bubble-system {
    background: rgba(30, 30, 30, 0.6) !important;
    border: 1px solid rgba(25, 230, 57, 0.2) !important;
    border-left: 4px solid var(--accent-green) !important;
    border-radius: 8px !important;
    margin: 20px 10px !important;
    padding: 16px 20px !important;
    position: relative;
    box-shadow: 0 0 15px rgba(25, 230, 57, 0.1), 0 4px 10px rgba(0, 0, 0, 0.3);
}

.chat-system-transmission-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 900;
    color: var(--accent-green);
    letter-spacing: 3px;
    margin-bottom: 10px;
    text-transform: uppercase;
    filter: drop-shadow(0 0 5px rgba(25, 230, 57, 0.5));
}

.chat-bubble-system .chat-bubble-text {
    font-size: 0.95rem !important;
    color: #E0E0E0 !important;
    line-height: 1.6;
    font-weight: 400;
    text-align: left !important;
    word-wrap: break-word;
    white-space: pre-wrap;
    font-style: italic;
}

.chat-bubble-system::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, transparent 50%, rgba(25, 230, 57, 0.05) 50%);
    pointer-events: none;
    border-top-right-radius: 8px;
}

.chat-bubble-system::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, transparent 50%, rgba(46, 204, 113, 0.05) 50%);
    pointer-events: none;
}

/* Light theme overrides */
[data-theme="light"] .chat-bubble-system {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Light theme */
[data-theme="light"] #toggleBadgesBtn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 250, 0.95) 100%);
    border-color: rgba(0, 0, 0, 0.1);
    color: #212529;
}

[data-theme="light"] .badges-section-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.9) 100%);
    border-color: rgba(0, 0, 0, 0.08);
}
