/* ═══ UNTIS COMPONENT ═══ */

/* ── Overlay & Panel ── */
.untis-overlay {
    position: fixed;
    inset: 0;
    z-index: 9900;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: untis-fade-in 0.25s ease;
}

.untis-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 3, 5, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: pointer;
}

@keyframes untis-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Setup Panel ── */
.untis-setup-panel {
    position: relative;
    z-index: 1;
    width: 95%;
    max-width: 480px;
    background: linear-gradient(160deg, #0d0b1a 0%, #060514 50%, #0a0612 100%);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 24px;
    padding: 2rem;
    box-shadow:
        0 0 0 1px rgba(168, 85, 247, 0.06),
        0 40px 80px rgba(0, 0, 0, 0.6),
        0 0 120px rgba(168, 85, 247, 0.04);
    animation: untis-slide-up 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

/* ── Dashboard Panel ── */
.untis-dashboard-panel {
    position: relative;
    z-index: 1;
    width: 98%;
    max-width: 900px;
    max-height: 92vh;
    background: linear-gradient(160deg, #0d0b1a 0%, #060514 60%, #0a0612 100%);
    border: 1px solid rgba(168, 85, 247, 0.18);
    border-radius: 24px;
    box-shadow:
        0 0 0 1px rgba(168, 85, 247, 0.06),
        0 40px 100px rgba(0, 0, 0, 0.7),
        0 0 140px rgba(168, 85, 247, 0.05);
    animation: untis-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@keyframes untis-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ── Ambient orbs ── */
.untis-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(60px);
}

.untis-orb-1 {
    width: 280px;
    height: 280px;
    top: -100px;
    right: -80px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.08) 0%, transparent 70%);
}

.untis-orb-2 {
    width: 200px;
    height: 200px;
    bottom: -80px;
    left: -60px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.06) 0%, transparent 70%);
}

.untis-orb-3 {
    width: 160px;
    height: 160px;
    top: 40%;
    left: 20%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.04) 0%, transparent 70%);
}

/* ── Progress Steps ── */
.untis-progress {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 2rem;
    justify-content: center;
}

.untis-progress-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0;
    transition: all 0.3s ease;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.35);
}

.untis-progress-dot.active {
    background: rgba(168, 85, 247, 0.25);
    border-color: rgba(168, 85, 247, 0.7);
    color: #d8b4fe;
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.3);
}

.untis-progress-dot.done {
    background: rgba(74, 222, 128, 0.2);
    border-color: rgba(74, 222, 128, 0.6);
    color: #86efac;
}

.untis-progress-line {
    flex: 1;
    max-width: 60px;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0 8px;
}

/* ── Step Content ── */
.untis-step-inner {
    animation: untis-step-in 0.3s ease;
}

@keyframes untis-step-in {
    from {
        opacity: 0;
        transform: translateX(12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ── Typography ── */
.untis-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin: 0 0 0.4rem 0;
}

.untis-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 1.5rem 0;
    line-height: 1.5;
}

/* ── Feature List ── */
.untis-features {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1.75rem;
}

.untis-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
}

.untis-feature-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.untis-feature-text {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

/* ── Instruction Steps ── */
.untis-instructions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.untis-instruction-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    transition: border-color 0.2s;
}

.untis-instruction-item:hover {
    border-color: rgba(168, 85, 247, 0.2);
}

.untis-instruction-num {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid rgba(168, 85, 247, 0.4);
    color: #d8b4fe;
    font-size: 0.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.untis-instruction-body {
    flex: 1;
}

.untis-instruction-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2px;
}

.untis-instruction-desc {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.5;
}

.untis-instruction-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding: 4px 10px;
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.25);
    border-radius: 6px;
    color: #67e8f9;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.untis-instruction-action:hover {
    background: rgba(34, 211, 238, 0.18);
    border-color: rgba(34, 211, 238, 0.5);
}

/* ── URL Input ── */
.untis-url-wrapper {
    position: relative;
    margin-bottom: 0.75rem;
}

.untis-url-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: #fff;
    font-size: 0.875rem;
    font-family: 'JetBrains Mono', monospace;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.untis-url-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.untis-url-input:focus {
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

/* ── Connection Status ── */
.untis-test-status {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: none;
    align-items: center;
    gap: 0.5rem;
    animation: untis-step-in 0.2s ease;
}

.untis-test-status.loading {
    display: flex;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.25);
    color: #d8b4fe;
}

.untis-test-status.success {
    display: flex;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: #86efac;
}

.untis-test-status.error {
    display: flex;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #fca5a5;
}

/* ── Buttons ── */
.untis-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.4rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.untis-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.untis-btn-primary {
    background: linear-gradient(135deg, #a855f7, #9333ea);
    color: #fff;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.35);
}

.untis-btn-primary:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 28px rgba(168, 85, 247, 0.5);
}

.untis-btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.untis-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.untis-btn-ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.untis-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
}

.untis-btn-test {
    background: rgba(34, 211, 238, 0.12);
    color: #67e8f9;
    border: 1px solid rgba(34, 211, 238, 0.3);
    width: 100%;
    margin-bottom: 0.75rem;
}

.untis-btn-test:not(:disabled):hover {
    background: rgba(34, 211, 238, 0.2);
    border-color: rgba(34, 211, 238, 0.5);
}

.untis-btn-row {
    display: flex;
    gap: 0.65rem;
    align-items: center;
}

.untis-btn-row .untis-btn-primary {
    flex: 1;
}

/* ── Spinner ── */
.untis-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(168, 85, 247, 0.3);
    border-top-color: #a855f7;
    border-radius: 50%;
    animation: untis-spin 0.7s linear infinite;
    flex-shrink: 0;
}

.untis-spinner-sm {
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: untis-spin 0.7s linear infinite;
}

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

/* ═══ DASHBOARD ═══ */

.untis-db-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.untis-db-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.untis-db-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(147, 51, 234, 0.2));
    border: 1px solid rgba(168, 85, 247, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.untis-db-icon svg {
    width: 18px;
    height: 18px;
    color: #d8b4fe;
}

.untis-db-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
}

.untis-db-meta {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    font-family: 'JetBrains Mono', monospace;
    margin-top: 1px;
}

.untis-db-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.untis-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.untis-icon-btn svg {
    width: 16px;
    height: 16px;
}

.untis-icon-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.15);
}

.untis-icon-btn.spinning svg {
    animation: untis-spin 1s linear infinite;
}

/* ── Dashboard Body ── */
.untis-db-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(168, 85, 247, 0.2) transparent;
}

.untis-db-body::-webkit-scrollbar {
    width: 4px;
}

.untis-db-body::-webkit-scrollbar-thumb {
    background: rgba(168, 85, 247, 0.2);
    border-radius: 4px;
}

/* ── Section Header ── */
.untis-section-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.untis-section-label {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
}

.untis-section-line {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
}

/* ── Today Hero Cards ── */
.untis-today-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.untis-hero-card {
    position: relative;
    padding: 1.1rem;
    border-radius: 16px;
    overflow: hidden;
}

.untis-hero-card.current {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(147, 51, 234, 0.1));
    border: 1px solid rgba(168, 85, 247, 0.35);
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.1);
}

.untis-hero-card.next {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.untis-hero-tag {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 6px;
    margin-bottom: 0.6rem;
}

.untis-hero-card.current .untis-hero-tag {
    background: rgba(168, 85, 247, 0.3);
    color: #d8b4fe;
}

.untis-hero-card.next .untis-hero-tag {
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.45);
}

.untis-hero-subject {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.untis-hero-time {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 2px;
}

.untis-hero-room {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
}

.untis-hero-countdown {
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: #d8b4fe;
    font-family: 'JetBrains Mono', monospace;
    margin-top: 0.5rem;
}

.untis-pulse-ring {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #a855f7;
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.6);
    animation: untis-pulse 2s ease infinite;
}

@keyframes untis-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.6); }
    70%  { box-shadow: 0 0 0 8px rgba(168, 85, 247, 0); }
    100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0); }
}

/* ── Today Timeline ── */
.untis-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.untis-timeline-item {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
    position: relative;
}

.untis-timeline-time-col {
    width: 52px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding-top: 2px;
}

.untis-timeline-time {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.3);
    font-family: 'JetBrains Mono', monospace;
    line-height: 1;
}

.untis-timeline-bar {
    width: 2px;
    background: rgba(255, 255, 255, 0.06);
    flex: 1;
    margin-top: 4px;
    border-radius: 2px;
    min-height: 8px;
}

.untis-timeline-card {
    flex: 1;
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    min-height: 48px;
    margin-bottom: 4px;
    transition: border-color 0.2s;
}

.untis-timeline-card:hover {
    border-color: rgba(168, 85, 247, 0.2);
}

.untis-timeline-card.current {
    background: rgba(168, 85, 247, 0.12);
    border-color: rgba(168, 85, 247, 0.35);
}

.untis-timeline-card.past {
    opacity: 0.45;
}

.untis-timeline-subject {
    font-size: 0.875rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1px;
}

.untis-timeline-card.current .untis-timeline-subject {
    color: #d8b4fe;
}

.untis-timeline-detail {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
}

/* ── Week Grid ── */
.untis-week-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    overflow-x: auto;
}

.untis-day-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.untis-day-header {
    text-align: center;
    padding: 0.5rem 0.25rem 0.4rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.untis-day-name {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
}

.untis-day-date {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.55);
    font-family: 'JetBrains Mono', monospace;
    margin-top: 2px;
}

.untis-day-header.today {
    background: rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.35);
}

.untis-day-header.today .untis-day-name {
    color: #d8b4fe;
}

.untis-day-header.today .untis-day-date {
    color: #c4b5fd;
}

.untis-lesson-chip {
    padding: 0.5rem 0.6rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.3;
    cursor: default;
    transition: transform 0.15s, box-shadow 0.15s;
}

.untis-lesson-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.untis-lesson-name {
    color: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.untis-lesson-t {
    font-size: 0.68rem;
    opacity: 0.6;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
    display: block;
    margin-top: 1px;
}

.untis-day-empty {
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.15);
}

/* ── No Data States ── */
.untis-empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.875rem;
}

.untis-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

/* ── Loading skeleton ── */
.untis-skeleton {
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.04) 25%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.04) 75%
    );
    background-size: 200% 100%;
    animation: untis-shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes untis-shimmer {
    to { background-position: -200% 0; }
}

/* ── Note bar ── */
.untis-note {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.5;
}

.untis-note.info {
    background: rgba(34, 211, 238, 0.06);
    border: 1px solid rgba(34, 211, 238, 0.15);
}

.untis-note.warning {
    background: rgba(251, 146, 60, 0.07);
    border: 1px solid rgba(251, 146, 60, 0.2);
}

/* ── Mobile ── */
@media (max-width: 600px) {
    .untis-setup-panel {
        padding: 1.5rem;
        border-radius: 20px;
        max-height: 92vh;
        overflow-y: auto;
    }

    .untis-dashboard-panel {
        border-radius: 20px 20px 0 0;
        align-self: flex-end;
        max-height: 92vh;
        width: 100%;
        max-width: 100%;
    }

    .untis-overlay {
        align-items: flex-end;
    }

    .untis-today-hero {
        grid-template-columns: 1fr;
    }

    .untis-week-grid {
        gap: 0.35rem;
        padding-bottom: 0.5rem;
    }

    .untis-lesson-chip {
        padding: 0.4rem 0.45rem;
        font-size: 0.7rem;
    }

    .untis-lesson-t {
        display: none;
    }

    .untis-db-body {
        padding: 1rem;
    }

    .untis-db-header {
        padding: 1rem;
    }

    .untis-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 400px) {
    .untis-day-name {
        font-size: 0.6rem;
    }
    .untis-day-date {
        font-size: 0.65rem;
    }
    .untis-lesson-name {
        font-size: 0.68rem;
    }
}

/* ═══ DUAL-CHOICE CARDS (Step 1) ═══ */

.untis-choice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.untis-choice-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 1.2rem 1rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid rgba(255, 255, 255, 0.09);
    cursor: pointer;
    text-align: left;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.untis-choice-card:hover {
    transform: translateY(-2px);
    border-color: rgba(168, 85, 247, 0.35);
    box-shadow: 0 8px 32px rgba(168, 85, 247, 0.12);
}

.untis-choice-card.untis-choice-manual:hover {
    border-color: rgba(34, 211, 238, 0.35);
    box-shadow: 0 8px 32px rgba(34, 211, 238, 0.1);
}

.untis-choice-card:active {
    transform: translateY(0) scale(0.98);
}

.untis-choice-glow {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: inherit;
}

.untis-choice-ical .untis-choice-glow {
    background: radial-gradient(circle at 50% 0%, rgba(168, 85, 247, 0.1) 0%, transparent 70%);
}

.untis-choice-manual .untis-choice-glow {
    background: radial-gradient(circle at 50% 0%, rgba(34, 211, 238, 0.08) 0%, transparent 70%);
}

.untis-choice-card:hover .untis-choice-glow {
    opacity: 1;
}

.untis-choice-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: #d8b4fe;
    flex-shrink: 0;
    margin-bottom: 0.25rem;
    transition: background 0.2s, border-color 0.2s;
}

.untis-choice-label {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #d8b4fe;
    line-height: 1;
}

.untis-choice-name {
    font-size: 0.9rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.untis-choice-desc {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.4;
    flex: 1;
}

.untis-choice-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    border-radius: 6px;
    margin-top: 0.25rem;
}

.untis-badge-purple {
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: #d8b4fe;
}

.untis-badge-cyan {
    background: rgba(34, 211, 238, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.28);
    color: #67e8f9;
}

.untis-choice-arrow {
    position: absolute;
    bottom: 0.9rem;
    right: 0.9rem;
    color: rgba(255, 255, 255, 0.2);
    transition: color 0.2s, transform 0.2s;
}

.untis-choice-card:hover .untis-choice-arrow {
    color: rgba(255, 255, 255, 0.5);
    transform: translateX(2px);
}

@media (max-width: 420px) {
    .untis-choice-grid {
        grid-template-columns: 1fr;
    }

    .untis-choice-card {
        flex-direction: row;
        align-items: center;
        gap: 0.85rem;
        padding: 0.9rem 1rem;
    }

    .untis-choice-icon {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .untis-choice-arrow {
        position: static;
        margin-left: auto;
        flex-shrink: 0;
    }

    .untis-choice-desc {
        display: none;
    }
}

/* ═══ MANUAL GRID BUILDER ═══ */

/* ── Day Tabs ── */
.untis-day-tabs {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.untis-day-tab {
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    cursor: pointer;
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.45);
    transition: all 0.2s ease;
    flex: 1;
    min-width: 44px;
    text-align: center;
}

.untis-day-tab:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.75);
    border-color: rgba(255, 255, 255, 0.15);
}

.untis-day-tab.active {
    background: rgba(34, 211, 238, 0.12);
    border-color: rgba(34, 211, 238, 0.4);
    color: #67e8f9;
    box-shadow: 0 0 16px rgba(34, 211, 238, 0.12);
}

.untis-day-tab.has-lessons::after {
    content: '';
    position: absolute;
    top: 5px;
    right: 5px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #67e8f9;
    opacity: 0.7;
}

.untis-day-tab.active.has-lessons::after {
    opacity: 1;
    background: #67e8f9;
    box-shadow: 0 0 6px rgba(34, 211, 238, 0.6);
}

/* ── Lesson Rows ── */
.untis-manual-lesson {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.8rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    margin-bottom: 0.4rem;
    transition: border-color 0.2s, background 0.2s;
}

.untis-manual-lesson:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}

.untis-manual-lesson-time {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
    flex-shrink: 0;
}

.untis-manual-lesson-room {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
}

.untis-manual-lesson-del {
    margin-left: auto;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    border: 1px solid rgba(248, 113, 113, 0.2);
    background: rgba(248, 113, 113, 0.07);
    color: rgba(248, 113, 113, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.untis-manual-lesson-del:hover {
    background: rgba(248, 113, 113, 0.18);
    border-color: rgba(248, 113, 113, 0.45);
    color: #fca5a5;
}

/* ── Empty Day State ── */
.untis-manual-empty {
    text-align: center;
    padding: 2rem 1rem;
    border-radius: 14px;
    border: 1.5px dashed rgba(255, 255, 255, 0.08);
}

/* ── Add Lesson Button ── */
.untis-btn-add-lesson {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0.3rem 0.7rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    cursor: pointer;
    border: 1.5px solid rgba(34, 211, 238, 0.3);
    background: rgba(34, 211, 238, 0.08);
    color: #67e8f9;
    transition: all 0.2s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.untis-btn-add-lesson:hover {
    background: rgba(34, 211, 238, 0.15);
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.12);
}

/* ── Add Form ── */
.untis-manual-add-form {
    padding: 1rem;
    border-radius: 14px;
    background: rgba(34, 211, 238, 0.04);
    border: 1.5px solid rgba(34, 211, 238, 0.2);
    margin-top: 0.75rem;
    animation: untis-step-in 0.2s ease;
}

.untis-form-row {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
    align-items: flex-end;
}

.untis-form-input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.untis-form-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.untis-form-input:focus {
    border-color: rgba(34, 211, 238, 0.45);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.08);
}

input[type="time"].untis-form-input::-webkit-calendar-picker-indicator {
    filter: invert(0.4);
    cursor: pointer;
}

/* ── Manual Footer ── */
.untis-manual-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1rem 1.5rem;
    flex-shrink: 0;
    background: rgba(6, 5, 20, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.untis-manual-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.untis-manual-footer-info {
    flex: 1;
    min-width: 0;
}

@media (max-width: 600px) {
    .untis-day-tab {
        padding: 0.45rem 0.6rem;
        font-size: 0.75rem;
    }

    .untis-manual-footer {
        padding: 0.85rem 1rem;
    }

    .untis-form-row {
        flex-direction: column;
    }

    .untis-form-row > div {
        width: 100%;
    }

    .untis-choice-grid {
        grid-template-columns: 1fr;
    }
}
