/* --- Custom Properties --- */
:root {
    --primary-color: #8719E2;
    --white: #fff;
    --text-main: #000000
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #fcfdfe;
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* --- Animated Background Elements --- */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 10s infinite ease-in-out alternate;
}

.shape-1 {
    width: 40vw;
    height: 40vw;
    max-width: 400px;
    max-height: 400px;
    background: #818CF8;
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 50vw;
    height: 50vw;
    max-width: 500px;
    max-height: 500px;
    background: #22D3EE;
    bottom: -15%;
    right: -10%;
    animation-delay: -5s;
}

.shape-3 {
    width: 30vw;
    height: 30vw;
    max-width: 300px;
    max-height: 300px;
    background: #C084FC;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-duration: 15s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, 50px) scale(1.1);
    }
}

.container {
    height: 100vh;
    width: 100vw;
    display: flex;
}

/* --- Glassmorphism Utils --- */
.glass-effect {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

.shadow-effect {
    box-shadow: none;
}

.error-message {
    color: #ff0000;
}

/* --- Login Panel Styles --- */
.login-panel {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-box {
    border-radius: 24px;
    padding: 50px 40px;
    width: 100%;
    max-width: 440px;
    text-align: center;
}

.logo-container {
    margin-bottom: 15px
}

.logo-container img {
    width: 143px;
    height: auto;
}

.login-box h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.login-box p {
    color: var(--text-muted);
    margin-bottom: 35px;
    font-size: 15px;
}

.input-group {
    position: relative;
    margin-bottom: 24px;
}

.input-group i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
    font-size: 18px;
    transition: color 0.3s ease;
    z-index: 2;
}

.input-group input {
    width: 100%;
    padding: 16px;
    border: 2px solid transparent;
    border-radius: 9px;
    background: #BBB8B8;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-main);
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.input-group input::placeholder {
    color: #9CA3AF;
    font-weight: 400;
}

.input-group input:focus {
    border-color: var(--primary-light);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.primary-btn {
    width: 100%;
    padding: 16px;
    background: #340562;
    color: var(--white);
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.25);
    margin-top: 10px;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(79, 70, 229, 0.4);
}

.primary-btn:active {
    transform: translateY(1px);
}

/* Login button loading state */
.login-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: login-spin 0.7s linear infinite;
    flex-shrink: 0;
}
.login-btn.loading .login-btn-text { opacity: 0.7; }
.login-btn.loading .login-btn-arrow { display: none; }
.login-btn.loading .login-spinner { display: inline-block; }
.login-btn.loading { cursor: not-allowed; opacity: 0.85; }
@keyframes login-spin {
    to { transform: rotate(360deg); }
}

/* --- Chat Window Styles --- */
.chat-window {
    background: #fcfdfe;
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    padding: 10px 150px;
    display: flex;
    align-items: center;
    color: var(--primary-color);
    border-bottom: 1px solid #F3F4F6;
    font-size: 16px;
    position: relative;
}

.chat-logout {
    margin-left: auto;
    cursor: pointer;
}

.chat-header img {
    margin-right: 5px
}

.header-info {
    display: flex;
    align-items: center;
    gap: 18px;
}

.header-info .avatar {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.header-info h2 {
    font-size: 19px;
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}

.header-info .status {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-info .status::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    background-color: #10B981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10B981;
}

.close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--white);
    font-size: 18px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 24px;
    scroll-behavior: smooth;
    padding: 16px 150px;
}

/* Custom Scrollbar */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

.message {
    display: flex;
    max-width: 100%;
    gap: 16px;
    line-height: 1.5;
    animation: fadeIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.bot-message {
    align-self: flex-start;
}

.bot-message.card-wrapper {
    width: 100%;
}

.bot-message.card-wrapper .message-content {
    width: 100%;
    padding: 0;
    background: transparent !important;
}

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
    max-width: 70%;
}

.user-message .message-content {
    background-color: #8719E2;
    color: #ffffff;
    border-radius: 20px 20px 4px 20px;
}

.bot-message .message-content {
    background-color: #f4f4f5;
    color: var(--text-main);
    border-radius: 20px 20px 20px 4px;
}

.message-avatar {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 15px;
    box-shadow: 0 6px 15px rgba(79, 70, 229, 0.25);
    margin-top: auto;
}

.user-message .message-avatar {
    display: none;
    /* Hide user avatar for cleaner look, entirely optional */
}

.message-content {
    padding: 16px 22px;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-width: 0;
}

.message-content p {
    margin: 0 0 8px;
}

.message-content p:last-child { margin-bottom: 0; }

.message-content ul {
    margin: 8px 0;
    padding-left: 20px;
}

.message-content li {
    margin-bottom: 6px;
}

.message-content strong {
    font-weight: 600;
}

.chat-input-wrapper {
    padding: 8px 150px 12px;
}

.chat-input-area {
    background-color: #fcfdfe;
    border: 1px solid #E5E7EB;
    border-radius: 24px;
    position: relative;
}

#LLM_user-input {
    padding: 12px 50px 12px 75px;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    height: 48px;
    width: 100%;
    outline: none;
    transition: all 0.3s ease;
    background: transparent;
    resize: none;
}

.send-btn {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    -webkit-appearance: none;
    border: none;
    cursor: pointer;
    background: transparent;
}

.send-btn:active {
    transform: translateY(-50%) scale(0.9);
}

/* --- Responsive Adjustments --- */
@media (max-width: 1200px) {
    .chat-header { padding: 10px 60px; }
    .chat-messages { padding: 16px 60px; }
    .chat-input-wrapper { padding: 8px 60px 12px; }
}

@media (max-width: 768px) {
    .container {
        padding: 0;
    }

    .login-panel {
        height: 100vh;
        padding: 20px;
        align-items: center;
    }

    .login-box {
        padding: 40px 25px;
        border-radius: 20px;
    }

    .chat-window {
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        border: none;
    }

    .chat-header {
        padding: 10px 16px;
    }

    .chat-messages {
        padding: 12px 16px;
    }

    .chat-input-wrapper {
        padding: 8px 16px 12px;
    }

    .shape-1,
    .shape-2,
    .shape-3 {
        display: none;
    }
}


/* --- Flight Cards --- */
.fc-list {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 8px 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.fc-list::-webkit-scrollbar { height: 4px; }
.fc-list::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 4px; }

.fc-card {
    flex: 0 0 340px;
    background: var(--white);
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    padding: 20px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: box-shadow 0.2s ease;
}

.fc-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.08); }

.fc-co2e {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #16A34A;
    background: #F0FDF4;
    border-radius: 6px;
    padding: 4px 12px;
    align-self: center;
}

/* Header: airline + supplier */
.fc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fc-airline-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fc-airline-logo {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fc-airline-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.fc-supplier {
    font-size: 12px;
    color: #9CA3AF;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    padding: 2px 8px;
    font-weight: 500;
}

/* Route section */
.fc-route {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.fc-endpoint {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 60px;
}

.fc-endpoint-right { align-items: flex-end; }

.fc-airport {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
}

.fc-time {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 4px;
}

.fc-date {
    font-size: 11px;
    color: #9CA3AF;
    margin-top: 2px;
}

.fc-path {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding-top: 4px;
}

.fc-duration {
    font-size: 11px;
    font-weight: 600;
    color: #6B7280;
}

.fc-path-line {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 0;
}

.fc-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary-color);
    flex-shrink: 0;
}

.fc-line {
    flex: 1;
    height: 2px;
    background: var(--primary-color);
}

.fc-stops-label {
    font-size: 10px;
    color: #9CA3AF;
    font-weight: 500;
}

/* Tags row */
.fc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.fc-tag {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #F3F4F6;
    color: #4B5563;
}

.fc-tag-refund { background: #ECFDF5; color: #065F46; }
.fc-tag-change { background: #FFFBEB; color: #92400E; }

/* Footer: price + badges */
.fc-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding-top: 4px;
    border-top: 1px solid #F3F4F6;
}

.fc-price-block { display: flex; flex-direction: column; }

.fc-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary-color);
}

.fc-per-person {
    font-size: 11px;
    color: #9CA3AF;
}

.fc-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.fc-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 5px;
    background: #F3F4F6;
    color: #6B7280;
    text-transform: capitalize;
}

.fc-badge-stops {
    background: #FEF9C3;
    color: #854D0E;
}

.fc-badge.policy-in {
    background: #ECFDF5;
    color: #065F46;
}

.fc-badge.policy-out {
    background: #FEF2F2;
    color: #991B1B;
}

.fc-badge.policy-unknown {
    background: #F3F4F6;
    color: #9CA3AF;
}

/* Segments expandable section */
.fc-segments-section {
    border-top: 1px solid #F3F4F6;
}

.fc-segments-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0 4px;
    cursor: pointer;
    user-select: none;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6B7280;
}

.fc-chevron {
    font-size: 9px;
    transition: transform 0.2s ease;
    display: inline-block;
}

.fc-segments-section.open .fc-chevron {
    transform: rotate(90deg);
}

.fc-segments-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.fc-segments-section.open .fc-segments-body {
    max-height: 600px;
}

.fc-seg {
    padding: 10px 12px;
    border-left: 3px solid var(--primary-color);
    margin: 8px 0;
    background: #FAFAFA;
    border-radius: 0 8px 8px 0;
}

.fc-seg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.fc-seg-carrier {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
}

.fc-seg-fn {
    font-size: 12px;
    color: #9CA3AF;
    font-weight: 500;
}

.fc-seg-route {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.fc-seg-apt {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-color);
}

.fc-seg-arrow {
    font-size: 11px;
    color: #9CA3AF;
}

.fc-seg-detail {
    font-size: 11px;
    color: #6B7280;
}

.fc-seg-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2px;
}

.fc-seg-aircraft {
    font-size: 11px;
    color: #9CA3AF;
    font-style: italic;
}

.fc-seg-co2e {
    font-size: 10px;
    font-weight: 600;
    color: #16A34A;
    background: #F0FDF4;
    border-radius: 4px;
    padding: 2px 8px;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .fc-card { flex: 0 0 290px; padding: 16px; }
    .fc-airport { font-size: 18px; }
    .fc-price { font-size: 16px; }
}

/* --- Thinking Process --- */
.thinking-container {
    padding: 4px 0;
    position: relative;
    min-height: 24px;
}

.message.thinking-message {
    margin-bottom: -16px;
}

.thinking-step {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #6B7280;
    padding: 6px 0;
}

.thinking-step.fade-in {
    animation: thinkFadeIn 0.4s ease forwards;
}

.thinking-step.fade-out {
    animation: thinkFadeOut 0.3s ease forwards;
    position: absolute;
    pointer-events: none;
}

@keyframes thinkFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes thinkFadeOut {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-8px); display: none; }
}

.thinking-text {
    font-weight: 500;
}

/* Animated 3-dot loading */
.thinking-dots span {
    animation: dotBounce 1.4s infinite ease-in-out both;
    font-weight: 700;
    font-size: 16px;
    color: #9CA3AF;
}

.thinking-dots span:nth-child(1) { animation-delay: 0s; }
.thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
    0%, 80%, 100% { opacity: 0.2; }
    40% { opacity: 1; }
}

/* Collapsed state */
.thinking-collapsed {
    padding: 4px 0;
}

.thinking-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #9CA3AF;
    cursor: pointer;
    user-select: none;
    padding: 4px 0;
    transition: color 0.2s ease;
}

.thinking-toggle:hover {
    color: #6B7280;
}

.thinking-toggle-icon {
    font-size: 9px;
    transition: transform 0.2s ease;
    display: inline-block;
    width: 12px;
}

.thinking-steps-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 0 0 20px;
}

.thinking-steps-list.expanded {
    max-height: 300px;
    padding: 6px 0 6px 20px;
}

.thinking-step-item {
    font-size: 12px;
    color: #9CA3AF;
    padding: 3px 0;
    position: relative;
}

.thinking-step-item::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #D1D5DB;
    margin-right: 8px;
    vertical-align: middle;
}

/* --- Offer Price Card --- */
.op-card {
    background: #f8fafc;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.op-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.op-header-left { display: flex; flex-direction: column; gap: 2px; }

.op-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
}

.op-subtitle {
    font-size: 13px;
    color: #6B7280;
    display: flex;
    align-items: center;
    gap: 8px;
}

.op-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.op-badge.policy-in { background: #ECFDF5; color: #065F46; }
.op-badge.policy-out { background: #FEF2F2; color: #991B1B; }

.op-timer-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: 8px;
    padding: 6px 12px;
    min-width: 90px;
}

.op-timer-label {
    font-size: 9px;
    font-weight: 700;
    color: #92400E;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.op-timer {
    font-size: 18px;
    font-weight: 800;
    color: #92400E;
    font-variant-numeric: tabular-nums;
}

.op-timer.op-timer-urgent { color: #DC2626; }
.op-timer.op-timer-expired { color: #991B1B; font-size: 14px; }

.op-timer-badge:has(.op-timer-urgent) {
    background: #FEF2F2;
    border-color: #FECACA;
}

/* Segments */
.op-segments {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.op-segment {
    border-left: 3px solid var(--primary-color);
    border-radius: 0 12px 12px 0;
    padding: 16px;
    background: var(--white);
}

.op-seg-header {
    margin-bottom: 12px;
}

.op-seg-carrier-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.op-seg-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.op-seg-carrier {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.op-seg-flight {
    font-size: 11px;
    color: #9CA3AF;
}

.op-seg-route {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.op-seg-endpoint {
    display: flex;
    flex-direction: column;
    min-width: 50px;
}

.op-seg-endpoint-right { align-items: flex-end; }

.op-seg-airport {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
}

.op-seg-time {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 4px;
}

.op-seg-date {
    font-size: 10px;
    color: #9CA3AF;
    margin-top: 2px;
}

.op-seg-path {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding-top: 4px;
}

.op-seg-duration {
    font-size: 11px;
    font-weight: 600;
    color: #6B7280;
}

.op-seg-line {
    display: flex;
    align-items: center;
    width: 100%;
}

.op-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary-color);
    flex-shrink: 0;
}

.op-line {
    flex: 1;
    height: 2px;
    background: var(--primary-color);
}

/* Fare breakdown */
.op-fare {
    background: var(--white);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.op-fare-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #6B7280;
}

.op-fare-divider {
    height: 1px;
    background: #E5E7EB;
    margin: 4px 0;
}

.op-fare-total {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary-color);
}

/* Policy tags */
.op-policies {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.op-policy-tag {
    flex: 1;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    border-radius: 10px;
    font-size: 12px;
}

.op-policy-tag span:first-child { font-size: 16px; }
.op-policy-tag span:nth-child(2) { font-weight: 600; color: #374151; }

.op-policy-value {
    font-weight: 700;
    font-size: 13px !important;
}

.op-policy-change { background: #F0FDF4; }
.op-policy-change .op-policy-value { color: #16A34A; }

.op-policy-cancel { background: #FEF2F2; }
.op-policy-cancel .op-policy-value { color: #DC2626; }

.op-policy-baggage { background: #ECFDF5; }
.op-policy-baggage .op-policy-value { color: #059669; }

/* Action buttons */
.op-actions {
    display: flex;
    gap: 12px;
    padding-top: 4px;
}

.op-actions.disabled {
    pointer-events: none;
    opacity: 0.5;
}

.disabled {
     pointer-events: none;
     opacity: 0.5;
}

.op-btn-cancel,
.op-btn-proceed {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.op-btn-cancel {
    background: var(--white);
    color: var(--text-main);
    border: 1px solid #D1D5DB;
}

.op-btn-cancel:hover { background: #F3F4F6; }

.op-btn-proceed {
    background: var(--primary-color);
    color: var(--white);
    border: none;
}

.op-btn-proceed:hover { opacity: 0.9; }
.op-btn-proceed.disabled {
    background: #D1D5DB;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .op-card { padding: 16px; max-width: 100%; }
    .op-seg-airport { font-size: 16px; }
    .op-policies { flex-direction: column; }
    .op-policy-tag { min-width: unset; }
}

/* ===== SEAT MAP ===== */
/* ===== SEAT MAP CARD ===== */
.sm-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 10px; padding: 16px; width: 100%; }
/* ===== VISUAL SEAT MAP ===== */
.vsm-map { overflow-x: auto; padding-bottom: 8px; width: 100%; }
.vsm-cabin-header { font-size: 12px; color: #666; margin-bottom: 10px; font-weight: 600; padding-bottom: 8px; border-bottom: 1px solid #eee; letter-spacing: 0.3px; }
.vsm-row { display: flex; align-items: center; margin-bottom: 4px; position: relative; width: 100%; }
.vsm-col-header-row { margin-bottom: 4px; }
.vsm-row-num { width: 30px; min-width: 30px; flex-shrink: 0; font-size: 11px; color: #888; text-align: right; padding-right: 8px; font-weight: 600; }
.vsm-group { display: flex; flex: 1; gap: 4px; }
.vsm-aisle { flex-shrink: 0; width: 28px; min-width: 28px; }
.vsm-col-label { flex: 1; height: 20px; font-size: 11px; font-weight: 700; color: #555; text-align: center; display: flex; align-items: center; justify-content: center; }

/* Seat cells */
.vsm-seat, .vsm-seat-na, .vsm-seat-empty, .vsm-seat-blocked {
    flex: 1; min-width: 28px; max-width: 54px; height: 42px; border-radius: 7px 7px 4px 4px; position: relative; cursor: default; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; box-sizing: border-box;
}
.vsm-seat { cursor: pointer; border: 2px solid #3a7bd5; background: #fff; }
.vsm-seat:hover { background: #e8f0fe; }
.vsm-seat.vsm-seat-selected { background: #3ab54a; border-color: #2e8c3e; }
.vsm-seat.vsm-seat-selected .vsm-seat-icon { background: #2e8c3e; }
.vsm-seat.vsm-seat-selected .vsm-seat-label { color: #fff; }
.vsm-seat-na { border: 2px solid #ccc; background: #f5f5f5; opacity: 0.5; cursor: not-allowed; }
.vsm-seat-empty { background: transparent; border: none; }
.vsm-seat-blocked { background: #f0f0f0; border: 1px dashed #ccc; opacity: 0.4; }

/* Seat icon (seat back) */
.vsm-seat-icon { width: 70%; height: 16px; border-radius: 4px 4px 0 0; background: #3a7bd5; margin-bottom: 2px; }
.vsm-seat-na .vsm-seat-icon { background: #bbb; }
.vsm-seat-label { font-size: 9px; font-weight: 700; color: #3a7bd5; line-height: 1; margin-bottom: 3px; }
.vsm-seat-na .vsm-seat-label { color: #aaa; }

/* Exit row */
.vsm-exit-bar { display: flex; align-items: center; font-size: 11px; font-weight: 700; color: #3ab54a; margin-bottom: 2px; width: 100%; }
.vsm-exit-arrows { flex: 1; display: flex; justify-content: space-between; align-items: center; padding: 3px 0; }
.vsm-exit-left, .vsm-exit-right { color: #3ab54a; }
.vsm-exit-row .vsm-row-num { color: #3ab54a; }

/* Tooltip */
.vsm-tooltip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: #1a1a2e; color: #fff; border-radius: 8px; padding: 10px 12px; min-width: 180px; max-width: 220px; z-index: 999; font-size: 12px; line-height: 1.6; box-shadow: 0 4px 16px rgba(0,0,0,0.22); pointer-events: none; }
.vsm-tooltip::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: #1a1a2e; }
.vsm-tip-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; color: #e0e0ff; }
.vsm-tip-code { font-weight: 700; color: #aab4ff; margin-right: 2px; }
.vsm-tip-price { margin-top: 6px; font-weight: 600; color: #7effa1; border-top: 1px solid rgba(255,255,255,0.15); padding-top: 5px; }
.vsm-tip-na { color: #ff7070; font-weight: 700; }
.sm-seg-boxes { display: flex; gap: 8px; margin-bottom: 14px; }
.sm-seg-box { flex: 1; padding: 10px; text-align: center; border: 1.5px solid #ddd; border-radius: 8px; font-size: 13px; font-weight: 600; color: #aaa; background: #f9f9f9; }
.sm-seg-box.active { background: #1a1a2e; color: #fff; border-color: #1a1a2e; }
.sm-seg-box.done { background: #e8f5e9; color: #388e3c; border-color: #a5d6a7; }
.sm-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 12px; }
.sm-table th { text-align: left; padding: 7px 10px; background: #f4f4f4; color: #555; font-weight: 600; border-bottom: 2px solid #e0e0e0; }
.sm-table td { padding: 7px 10px; border-bottom: 1px solid #f0f0f0; color: #333; }
.sm-seat-row { cursor: pointer; }
.sm-seat-row:hover td { background: #f9f4ff; }
.sm-row-selected td { background: #f3e8ff; font-weight: 600; color: var(--primary-color); }
.sm-seat-occupied { cursor: not-allowed; opacity: 0.45; }
.sm-seat-occupied td { color: #999; text-decoration: line-through; }
.sm-empty { color: #999; font-size: 13px; padding: 10px 0; }
.sm-actions { display: flex; gap: 8px; margin-top: 4px; }
.sm-btn { padding: 8px 18px; border-radius: 6px; border: none; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.sm-btn-confirm { background: var(--primary-color); color: #fff; }
.sm-btn-confirm:disabled { background: #ccc; cursor: default; }
.sm-btn-skip { background: #f0f0f0; color: #555; }

/* ===== ANCILLARY OPTIONS ===== */
.anc-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 10px; padding: 16px; width: 100%; }
/* Segment (outer) tabs */
.anc-seg-tab-bar { display: flex; gap: 0; margin-bottom: 12px; border-bottom: 2px solid #f0f0f0; }
.anc-seg-tab-btn { flex: 1; padding: 9px 8px; background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px; font-size: 12px; font-weight: 700; color: #888; cursor: pointer; transition: all 0.2s; }
.anc-seg-tab-btn.active { color: var(--primary-color); border-bottom-color: var(--primary-color); background: #faf4ff; }
.anc-seg-pane { display: none; }
.anc-seg-pane.active { display: block; }
/* Category (inner) tabs */
.anc-tab-bar { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 2px solid #f0f0f0; }
.anc-tab-btn { flex: 1; padding: 8px 6px; background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px; font-size: 12px; font-weight: 600; color: #888; cursor: pointer; transition: all 0.2s; }
.anc-tab-btn.active { color: var(--primary-color); border-bottom-color: var(--primary-color); }
.anc-tab-pane { display: none; }
.anc-tab-pane.active { display: block; }
.anc-grid { display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow-y: auto; }
.anc-item { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1.5px solid #e8e8e8; border-radius: 8px; transition: border-color 0.2s; }
.anc-item-selected { border-color: var(--primary-color); background: #faf4ff; }
.anc-item-disabled { opacity: 0.45; pointer-events: none; }
.anc-item-img { width: 36px; height: 36px; object-fit: contain; border-radius: 4px; }
.anc-item-img-placeholder { width: 36px; height: 36px; background: #f0f0f0; border-radius: 4px; flex-shrink: 0; }
.anc-item-name { flex: 1; font-size: 13px; font-weight: 600; color: #222; }
.anc-item-code { font-size: 11px; color: #999; margin-right: 4px; }
.anc-item-price { font-size: 12px; color: #555; white-space: nowrap; margin-right: 6px; }
.anc-toggle-btn { padding: 5px 14px; border-radius: 6px; border: 1.5px solid var(--primary-color); background: #fff; color: var(--primary-color); font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.anc-item-selected .anc-toggle-btn { background: var(--primary-color); color: #fff; }
.anc-empty { font-size: 13px; color: #aaa; padding: 12px 0; }
.anc-actions { display: flex; gap: 8px; margin-top: 14px; }
.anc-confirm-btn { flex: 1; padding: 10px; border-radius: 8px; border: none; background: var(--primary-color); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; transition: opacity 0.2s; }
.anc-confirm-btn:hover { opacity: 0.9; }
.anc-confirm-btn:disabled { background: #ccc; cursor: default; opacity: 1; }
.anc-skip-btn { flex: 1; padding: 10px; border-radius: 8px; border: 1px solid #ddd; background: #f7f7f7; color: #555; font-size: 13px; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.anc-skip-btn:hover { background: #efefef; }
.anc-skip-btn:disabled { opacity: 0.5; cursor: default; }
.sm-btn-skip:disabled { opacity: 0.5; cursor: default; }

/* ===== ORDER DETAILS CARD ===== */
.od-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 12px; overflow: hidden; width: 100%; font-size: 13px; }

/* Top bar */
.od-top-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: #fafafa; border-bottom: 1px solid #eeeeee; }
.od-top-right { display: flex; gap: 8px; align-items: center; }
.od-policy-badge { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 6px; }
.od-policy-in { background: #d0f5ec; color: #0a6b4e; }
.od-policy-out { background: #ffe0e0; color: #c62828; }
.od-supplier-badge { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 6px; background: #222; color: #fff; }
.od-trip-type-badge { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 6px; background: var(--primary-color); color: #fff; }

/* Journey block */
.od-journeys { padding: 0; }
.od-journey { padding: 14px 16px; border-bottom: 1px solid #f0f0f0; }
.od-journey-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.od-carrier-logo { width: 36px; height: 36px; border-radius: 50%; background: #f3e8ff; color: var(--primary-color); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; border: 1px solid #e0cff5; }
.od-flight-info { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.od-flight-nums { font-size: 13px; font-weight: 700; color: #222; }
.od-aircraft { font-size: 12px; color: #666; }
.od-fare-type { font-size: 11px; color: #888; }

/* Journey row: left time | path | right time */
.od-journey-row { display: grid; grid-template-columns: 1fr 1.4fr 1fr; align-items: center; gap: 8px; }
.od-endpoint { display: flex; flex-direction: column; }
.od-endpoint-right { align-items: flex-end; text-align: right; }
.od-time { font-size: 22px; font-weight: 800; color: #111; line-height: 1.1; display: flex; align-items: center; gap: 4px; }
.od-plus-day { font-size: 12px; font-weight: 700; color: #e53935; margin-left: 2px; }
.od-ep-date { font-size: 11px; color: #777; margin-top: 2px; }
.od-ep-name { font-size: 11px; color: #aaa; margin-top: 2px; max-width: 140px; line-height: 1.3; }

/* Path middle column */
.od-path { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.od-path-top { display: flex; align-items: center; gap: 4px; width: 100%; }
.od-dep-icon, .od-arr-icon { font-size: 14px; color: #999; flex-shrink: 0; }
.od-path-line { display: flex; align-items: center; flex: 1; }
.od-dot { width: 7px; height: 7px; border-radius: 50%; background: #555; flex-shrink: 0; }
.od-dot-mid { background: #fff; border: 2px solid #555; }
.od-line-inner { flex: 1; height: 1.5px; background: #bbb; }
.od-duration { font-size: 12px; color: #555; font-weight: 600; }
.od-via { display: flex; gap: 5px; align-items: center; font-size: 11px; color: #888; }
.od-via-code { font-weight: 700; color: #444; }
.od-stops-label { color: #888; }
.od-codes-row { display: flex; justify-content: space-between; width: 100%; margin-top: 2px; }
.od-apt-code { font-size: 12px; font-weight: 700; color: #333; }

/* Bottom bar */
.od-bottom-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-top: 1px solid #f0f0f0; background: #fafafa; flex-wrap: wrap; gap: 8px; }
.od-bottom-left { display: flex; align-items: center; gap: 8px; }
.od-status-badge { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 6px; }
.od-status-hold { background: #ff9800; color: #fff; }
.od-status-confirmed { background: #4caf50; color: #fff; }
.od-status-other { background: #e0e0e0; color: #555; }
.od-flight-type-label { font-size: 12px; color: #666; font-weight: 600; }
.od-bottom-actions { display: flex; gap: 8px; }
.od-btn { padding: 8px 14px; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; transition: opacity 0.2s; white-space: nowrap; }
.od-btn:disabled { opacity: 0.45; cursor: default; }
.od-btn-seat { background: #fff; color: var(--primary-color); border: 1.5px solid var(--primary-color); }
.od-btn-ancillary { background: #fff; color: var(--primary-color); border: 1.5px solid var(--primary-color); }
.od-btn-cancel { background: #fff; color: #c62828; border: 1.5px solid #ef9a9a; }
.od-btn-cancel:hover { background: #fff0f0; }
.od-btn-seat:hover, .od-btn-ancillary:hover { background: #f3e8ff; }

/* Confirmation */
.od-confirmation { text-align: center; padding: 10px 16px; font-size: 12px; color: #666; border-top: 1px solid #f0f0f0; }

/* ===== UPCOMING TRIPS GRID ===== */
.ut-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; width: 100%; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.ut-card { background: #fff; border: 1.5px solid #e8e8e8; border-radius: 10px; padding: 14px 16px; cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s; }
.ut-card:hover { border-color: var(--primary-color); box-shadow: 0 2px 10px rgba(0,0,0,0.08); }
.ut-dates { font-size: 11px; color: #888; margin-bottom: 4px; }
.ut-name { font-size: 14px; font-weight: 700; color: #222; margin-bottom: 8px; line-height: 1.3; }
.ut-orders { display: flex; gap: 6px; }
.ut-order-icon { font-size: 16px; }
.ut-empty { font-size: 13px; color: #aaa; padding: 12px 0; }

/* ── Reprice / Cancellation Confirmation Card ── */
.rp-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 12px; padding: 20px 24px; width: 100%; box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.rp-title { font-size: 16px; font-weight: 700; color: #222; margin-bottom: 14px; }
.rp-header-row { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: #555; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.04em; }
.rp-divider { border: none; border-top: 1px solid #e8e8e8; margin: 8px 0; }
.rp-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #333; padding: 5px 0; }
.rp-total { font-weight: 700; font-size: 14px; color: #222; margin-top: 4px; }
.rp-total-amount { font-size: 18px; font-weight: 800; color: var(--primary-color); }
.rp-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.rp-btn { padding: 9px 22px; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; transition: opacity 0.2s; }
.rp-btn:disabled { opacity: 0.45; cursor: default; }
.rp-btn-cancel { background: #fff; color: var(--primary-color); border: 1.5px solid var(--primary-color); }
.rp-btn-cancel:hover { background: #f3e8ff; }
.rp-btn-confirm { background: var(--primary-color); color: #fff; border: none; }
.rp-btn-confirm:hover { opacity: 0.88; }
.od-btn-invoice { background: var(--primary-color); color: #fff; border: none; }
.od-btn-invoice:hover { opacity: 0.88; }
.od-btn-hold-cancel { background: #fff; color: #c62828; border: 1.5px solid #ef9a9a; }
.od-btn-hold-cancel:hover { background: #fff0f0; }
.od-btn-ticket { background: var(--primary-color); color: #fff; border: none; }
.od-btn-ticket:hover { opacity: 0.88; }

/* ── Payment Options Card ── */
.pay-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 12px; padding: 18px 20px; width: 100%; box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.pay-title { font-size: 14px; font-weight: 700; color: #222; margin-bottom: 14px; }
.pay-list { display: flex; flex-direction: column; gap: 8px; }
.pay-option-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 16px; border-radius: 10px; border: 1.5px solid #e0e0e0; background: #fff; cursor: pointer; transition: border-color 0.2s, background 0.2s; text-align: left; width: 100%; }
.pay-option-btn:hover { border-color: var(--primary-color); background: #f9f3ff; }
.pay-option-btn.selected { border-color: var(--primary-color); background: #f3e8ff; }
.pay-opt-name { font-size: 13px; font-weight: 700; color: #222; }
.pay-opt-desc { font-size: 11px; color: #777; }

/* ── Travel Requests List ── */
.tr-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 12px; padding: 16px; width: 100%; box-shadow: 0 2px 12px rgba(0,0,0,0.08); position: relative; }
.tr-close-btn { position: absolute; top: 10px; right: 12px; background: none; border: none; font-size: 20px; color: #888; cursor: pointer; line-height: 1; }
.tr-close-btn:hover { color: #333; }
.tr-empty { font-size: 13px; color: #888; padding: 12px 0; text-align: center; }
.tr-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.tr-table thead tr { background: #f5f5f5; }
.tr-table th { padding: 10px 12px; text-align: left; font-weight: 600; color: #555; font-size: 12px; border-bottom: 1px solid #e0e0e0; white-space: nowrap; }
.tr-table td { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; color: #333; vertical-align: middle; }
.tr-table tbody tr:last-child td { border-bottom: none; }
.tr-table tbody tr:hover { background: #fafafa; }
.tr-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.tr-badge-pending { background: #fff3e0; color: #e65100; }
.tr-badge-approved { background: #e8f5e9; color: #2e7d32; }
.tr-badge-rejected { background: #ffebee; color: #c62828; }
.tr-view-btn { padding: 5px 14px; border-radius: 6px; border: 1.5px solid #ccc; background: #fff; font-size: 12px; cursor: pointer; font-weight: 500; color: #444; }
.tr-view-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }

/* ── Travel Request Detail Card ── */
.trd-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 12px; width: 100%; box-shadow: 0 2px 16px rgba(0,0,0,0.10); overflow: hidden; }

.trd-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid #f0f0f0; }
.trd-profile { display: flex; align-items: center; gap: 12px; }
.trd-avatar { width: 40px; height: 40px; border-radius: 50%; background: #bdbdbd; color: #fff; font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.trd-profile-name { font-size: 14px; font-weight: 700; color: #222; }
.trd-profile-ids { font-size: 11px; color: #777; margin-top: 2px; }
.trd-close-btn { background: none; border: none; font-size: 22px; color: #888; cursor: pointer; line-height: 1; padding: 0 4px; }
.trd-close-btn:hover { color: #333; }

.trd-meta-row { display: flex; padding: 10px 16px; gap: 0; border-bottom: 1px solid #f0f0f0; font-size: 12px; }
.trd-meta-col { flex: 1; }
.trd-meta-right { text-align: right; }
.trd-meta-label { color: #777; font-size: 11px; font-weight: 500; margin-bottom: 2px; }
.trd-meta-value { color: #222; font-weight: 600; font-size: 12px; }

.trd-flight-section { padding: 12px 16px; border-bottom: 1px solid #f0f0f0; background: #fff; }
.trd-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.trd-route-type { font-size: 13px; font-weight: 700; color: #333; }
.trd-travel-date-label { font-size: 12px; color: #777; }

.trd-route { margin-bottom: 8px; padding: 10px; border: 1px solid #e8e8f0; border-radius: 8px; background: #fafafa; }
.trd-carrier { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.trd-carrier-logo { width: 36px; height: 36px; border-radius: 6px; background: #b71c1c; color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.trd-carrier-name { font-size: 12px; color: #555; font-weight: 500; }

.trd-route-row { display: flex; align-items: center; gap: 8px; }
.trd-apt { flex: 1; }
.trd-apt-right { text-align: right; }
.trd-apt-code { font-size: 16px; font-weight: 800; color: #222; }
.trd-apt-name { font-size: 10px; color: #777; margin: 2px 0; line-height: 1.3; }
.trd-apt-time { font-size: 11px; color: #444; font-weight: 500; }
.trd-path { flex: 1.2; text-align: center; }
.trd-stops-label { font-size: 11px; color: #888; display: block; margin-bottom: 4px; }
.trd-path-line { display: flex; align-items: center; justify-content: center; gap: 4px; }
.trd-dot { width: 7px; height: 7px; border-radius: 50%; background: #aaa; display: inline-block; }
.trd-dot-mid { background: #ccc; border: 2px solid #aaa; }

.trd-total-price { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: #555; }
.trd-price-value { font-size: 18px; font-weight: 800; color: var(--primary-color); }

.trd-policy-wrap { padding: 8px 16px; border-bottom: 1px solid #f0f0f0; }
.trd-policy-badge { display: inline-block; padding: 4px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.trd-policy-in { background: #e0f2f1; color: #00695c; }
.trd-policy-out { background: #fce4ec; color: #b71c1c; }

.trd-info-section { border-bottom: 1px solid #f0f0f0; }
.trd-info-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 16px; background: #e8f4fb; border-bottom: 1px solid #dce8f0; font-size: 12px; }
.trd-info-row:last-child { border-bottom: none; }
.trd-info-label { font-weight: 600; color: #444; }
.trd-info-value { color: #555; }

.trd-action-section { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.trd-remarks-wrap { position: relative; }
.trd-remarks { width: 100%; min-height: 80px; border: 1px solid #ccc; border-radius: 6px; padding: 22px 10px 8px; font-size: 13px; color: #333; resize: vertical; font-family: inherit; background: #fafafa; outline: none; transition: border-color 0.2s; }
.trd-remarks:focus { border-color: var(--primary-color); background: #fff; }
.trd-remarks:disabled { background: #f5f5f5; color: #888; cursor: default; }
.trd-remarks.trd-remarks-error { border-color: #e53935; }
.trd-remarks-label { position: absolute; top: 6px; left: 10px; font-size: 11px; font-weight: 600; color: #888; pointer-events: none; }
.trd-remarks-error + .trd-remarks-label { color: #e53935; }

.trd-btn { padding: 12px 20px; border-radius: 8px; border: none; font-size: 14px; font-weight: 700; cursor: pointer; transition: opacity 0.2s; }
.trd-btn:disabled { opacity: 0.7; cursor: default; }
.trd-btn-full { width: 100%; }
.trd-btn-row { display: flex; gap: 10px; }
.trd-btn-row .trd-btn { flex: 1; }
.trd-btn-reject { background: #e53935; color: #fff; }
.trd-btn-reject:hover:not(:disabled) { opacity: 0.88; }
.trd-btn-approve { background: #43a047; color: #fff; }
.trd-btn-approve:hover:not(:disabled) { opacity: 0.88; }
.trd-btn-cancel { background: #e53935; color: #fff; }
.trd-btn-cancel:hover:not(:disabled) { opacity: 0.88; }
.trd-btn-approved-status { background: #43a047; color: #fff; }
.trd-btn-rejected-status { background: #e53935; color: #fff; }

.trd-status-bar { width: 100%; padding: 12px 16px; font-size: 13px; font-weight: 700; color: #fff; text-align: left; border-radius: 0 0 12px 12px; }
.trd-status-pending { background: #9e9e9e; }
.trd-status-approved { background: #43a047; }
.trd-status-rejected { background: #e53935; }
.trd-status-cancelled { background: #757575; }

/* ── Mic Button & Waveform ─────────────────────────────────────────────────── */
.mic-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #e8f0fe;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.1s;
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    z-index: 2;
}
.mic-btn:disabled { opacity: 0.45; cursor: default; }
.mic-btn.recording { background: #fde8e8; }
.mic-btn.processing { background: #f0f0f0; }
.mic-btn.playing { background: #e8f5e9; }

.waveform-bars {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 20px;
}
.waveform-bars span {
    display: block;
    width: 3px;
    border-radius: 2px;
    background: #4a90d9;
    height: 8px;
    transition: background 0.2s;
    animation: none;
}
.waveform-bars span:nth-child(1) { height: 6px; }
.waveform-bars span:nth-child(2) { height: 12px; }
.waveform-bars span:nth-child(3) { height: 16px; }
.waveform-bars span:nth-child(4) { height: 12px; }
.waveform-bars span:nth-child(5) { height: 6px; }
.mic-btn.recording .waveform-bars span { background: #e53935; animation: mic-wave 0.6s ease-in-out infinite alternate; }
.mic-btn.recording .waveform-bars span:nth-child(1) { animation-delay: 0s; }
.mic-btn.recording .waveform-bars span:nth-child(2) { animation-delay: 0.1s; }
.mic-btn.recording .waveform-bars span:nth-child(3) { animation-delay: 0.2s; }
.mic-btn.recording .waveform-bars span:nth-child(4) { animation-delay: 0.1s; }
.mic-btn.recording .waveform-bars span:nth-child(5) { animation-delay: 0s; }
.mic-btn.playing .waveform-bars span { background: #43a047; animation: mic-wave 0.5s ease-in-out infinite alternate; }
.mic-btn.playing .waveform-bars span:nth-child(1) { animation-delay: 0s; }
.mic-btn.playing .waveform-bars span:nth-child(2) { animation-delay: 0.12s; }
.mic-btn.playing .waveform-bars span:nth-child(3) { animation-delay: 0.24s; }
.mic-btn.playing .waveform-bars span:nth-child(4) { animation-delay: 0.12s; }
.mic-btn.playing .waveform-bars span:nth-child(5) { animation-delay: 0s; }
.mic-btn.processing .waveform-bars span { background: #9e9e9e; animation: mic-pulse 1s ease-in-out infinite; }

@keyframes mic-wave {
    from { height: 4px; }
    to   { height: 18px; }
}
@keyframes mic-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

/* ── Voice Overlay (full-width state bar) ─────────────────────────────────── */
.voice-overlay {
    display: none;
    align-items: center;
    position: absolute;
    inset: 0;
    padding: 0 52px 0 60px;
    gap: 10px;
    pointer-events: none;
    z-index: 1;
}

.chat-input-area.voice-active .voice-overlay { display: flex; }
.chat-input-area.voice-active #LLM_user-input { opacity: 0; pointer-events: none; }

.voice-state-label {
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
    white-space: nowrap;
    min-width: 82px;
    letter-spacing: 0.2px;
}

.voice-waveform-full {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 2px;
    height: 100%;
}

.voice-waveform-full span {
    flex: 1;
    border-radius: 2px;
    background: #9CA3AF;
    height: 4px;
    transition: background 0.2s;
}

/* recording — red wave */
.chat-input-area.recording .voice-state-label { color: #e53935; }
.chat-input-area.recording .voice-waveform-full span {
    background: #e53935;
    animation: vwave 0.65s ease-in-out infinite alternate;
}

/* processing — grey pulse */
.chat-input-area.processing .voice-state-label { color: #9CA3AF; }
.chat-input-area.processing .voice-waveform-full span {
    background: #9CA3AF;
    animation: vpulse 1s ease-in-out infinite;
}

/* playing — green wave */
.chat-input-area.playing .voice-state-label { color: #43a047; }
.chat-input-area.playing .voice-waveform-full span {
    background: #43a047;
    animation: vwave 0.5s ease-in-out infinite alternate;
}

/* 8-bar repeating delay cycle for wave ripple */
.voice-waveform-full span:nth-child(8n+1) { animation-delay: 0s; }
.voice-waveform-full span:nth-child(8n+2) { animation-delay: 0.08s; }
.voice-waveform-full span:nth-child(8n+3) { animation-delay: 0.16s; }
.voice-waveform-full span:nth-child(8n+4) { animation-delay: 0.24s; }
.voice-waveform-full span:nth-child(8n+5) { animation-delay: 0.32s; }
.voice-waveform-full span:nth-child(8n+6) { animation-delay: 0.24s; }
.voice-waveform-full span:nth-child(8n+7) { animation-delay: 0.16s; }
.voice-waveform-full span:nth-child(8n+8) { animation-delay: 0.08s; }

@keyframes vwave {
    from { height: 3px; }
    to   { height: 28px; }
}
@keyframes vpulse {
    0%, 100% { height: 4px; opacity: 0.4; }
    50%       { height: 16px; opacity: 1; }
}
