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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    min-height: 100vh;
}

/* Login page */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    background: linear-gradient(135deg, #0f172a 0%, #1a2332 100%);
}

.login-wrap {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.login-brand {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #334155;
}

.login-brand h1 {
    font-size: 24px;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.login-brand span {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

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

.form-group label {
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.form-group input, .form-group select {
    padding: 10px 14px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #f8fafc;
    font-size: 14px;
    transition: border-color 0.15s;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #3b82f6;
}

.btn-primary {
    padding: 12px 20px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-primary:disabled {
    background: #475569;
    cursor: not-allowed;
}

.btn-full {
    width: 100%;
    margin-top: 8px;
}

.login-error {
    padding: 10px 14px;
    background: #450a0a;
    border: 1px solid #7f1d1d;
    border-radius: 8px;
    color: #f87171;
    font-size: 13px;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #334155;
    font-size: 12px;
    color: #64748b;
}

/* User info in sidebar */
.user-block {
    margin-top: auto;
    padding: 16px 24px;
    border-top: 1px solid #334155;
}

.user-info {
    margin-bottom: 12px;
}

.user-name {
    font-size: 14px;
    color: #f8fafc;
    font-weight: 600;
    margin-bottom: 2px;
}

.user-meta {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-logout {
    width: 100%;
    padding: 8px;
    background: #334155;
    color: #cbd5e1;
    border: 1px solid #475569;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-logout:hover {
    background: #475569;
    color: #f8fafc;
}

/* Users (Team) page */
.users-table-wrapper {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    overflow: hidden;
}

.role-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-manager {
    background: #1e3a8a;
    color: #93c5fd;
}

.role-agent {
    background: #064e3b;
    color: #34d399;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    background: #1e293b;
    border-right: 1px solid #334155;
    padding: 24px 0;
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    padding: 0 24px 24px;
    border-bottom: 1px solid #334155;
    margin-bottom: 16px;
}

.sidebar-logo h1 {
    font-size: 18px;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.5px;
}

.sidebar-logo span {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
    display: block;
}

.sidebar-nav {
    padding: 0 12px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #94a3b8;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s;
}

.nav-item:hover, .nav-item.active {
    background: #334155;
    color: #f8fafc;
}

.nav-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Main content */
.main {
    margin-left: 260px;
    padding: 32px;
    min-height: 100vh;
}

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

.page-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #f8fafc;
}

/* Insights page */
.page-subtitle {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
}

.insights-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: linear-gradient(135deg, #1e293b 0%, #1a2332 100%);
    border: 1px solid #334155;
    border-radius: 14px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.kpi-card.kpi-clickable {
    cursor: pointer;
}

.kpi-card.kpi-clickable:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.2);
}

.kpi-link-hint {
    font-size: 10px;
    font-weight: 600;
    color: #3b82f6;
    margin-left: 6px;
    letter-spacing: 0.5px;
    text-transform: none;
    opacity: 0;
    transition: opacity 0.15s;
}

.kpi-card.kpi-clickable .kpi-link-hint {
    opacity: 1;
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.kpi-icon.icon-blue { background: rgba(59, 130, 246, 0.15); }
.kpi-icon.icon-purple { background: rgba(167, 139, 250, 0.15); }
.kpi-icon.icon-green { background: rgba(52, 211, 153, 0.15); }
.kpi-icon.icon-red { background: rgba(239, 68, 68, 0.15); }

.kpi-body {
    flex: 1;
    min-width: 0;
}

.kpi-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.kpi-value {
    font-size: 26px;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1;
    margin-bottom: 4px;
}

.kpi-sub {
    font-size: 11px;
    color: #64748b;
}

.insights-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 16px;
}

.insights-card-header {
    font-size: 14px;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.insights-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

/* Sentiment bar */
.sentiment-bar {
    display: flex;
    height: 32px;
    border-radius: 8px;
    overflow: hidden;
    background: #0f172a;
    margin-bottom: 12px;
}

.sent-segment {
    height: 100%;
    transition: width 0.3s;
}

.sent-segment.sent-positive { background: #34d399; }
.sent-segment.sent-neutral { background: #94a3b8; }
.sent-segment.sent-negative { background: #ef4444; }

.sentiment-legend {
    display: flex;
    gap: 20px;
    font-size: 12px;
    color: #94a3b8;
    align-items: center;
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.legend-dot.dot-pos { background: #34d399; }
.legend-dot.dot-neu { background: #94a3b8; }
.legend-dot.dot-neg { background: #ef4444; }

/* Call type distribution */
.type-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.type-row {
    display: grid;
    grid-template-columns: 130px 1fr 90px;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.type-label {
    color: #cbd5e1;
}

.type-bar-wrap {
    background: #0f172a;
    border-radius: 6px;
    height: 8px;
    overflow: hidden;
}

.type-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    transition: width 0.3s;
}

.type-count {
    color: #64748b;
    font-size: 12px;
    text-align: right;
}

/* Insight lists */
.insight-list-pro {
    list-style: none;
    padding: 0;
    margin: 0;
}

.insight-list-pro li {
    padding: 10px 14px;
    margin-bottom: 8px;
    background: #0f172a;
    border-left: 3px solid #475569;
    border-radius: 6px;
    font-size: 13px;
    color: #cbd5e1;
    line-height: 1.5;
}

.insight-list-pro li:last-child {
    margin-bottom: 0;
}

.insight-list-pro li.empty-mini {
    border-left: none;
    text-align: center;
    color: #64748b;
    font-style: italic;
    background: transparent;
}

.empty-mini {
    color: #64748b;
    font-size: 13px;
    font-style: italic;
    text-align: center;
    padding: 16px;
}

/* Coaching card */
.coaching-card {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #1e293b 0%, #1e2942 100%);
}

.btn-generate {
    padding: 8px 16px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-generate:hover {
    background: #2563eb;
}

.btn-generate:disabled {
    background: #475569;
    cursor: not-allowed;
}

.coaching-content {
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.6;
}

.coaching-summary {
    padding: 14px 16px;
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid #3b82f6;
    border-radius: 8px;
    margin-bottom: 16px;
    font-style: italic;
}

.coaching-section {
    margin-top: 16px;
}

.coaching-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 10px;
}

.coaching-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.coaching-list li {
    padding: 10px 14px;
    margin-bottom: 8px;
    background: #0f172a;
    border-left: 3px solid #3b82f6;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
}

.coaching-meta {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #334155;
    font-size: 11px;
    color: #64748b;
    text-align: right;
    font-style: italic;
}

/* Manager tabs (Hotel / Team) */
.insights-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    padding: 4px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 10px;
    width: fit-content;
}

.insights-tab {
    padding: 8px 18px;
    background: transparent;
    color: #94a3b8;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.insights-tab:hover {
    color: #f8fafc;
}

.insights-tab.active {
    background: #3b82f6;
    color: white;
}

.btn-back-team {
    padding: 8px 16px;
    background: #334155;
    color: #cbd5e1;
    border: 1px solid #475569;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-back-team:hover {
    background: #475569;
    color: #f8fafc;
}

/* Team table */
.team-table {
    width: 100%;
    border-collapse: collapse;
}

.team-table thead th {
    padding: 10px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #334155;
    cursor: pointer;
    user-select: none;
    transition: color 0.15s;
}

.team-table thead th:hover {
    color: #cbd5e1;
}

.team-table thead th.num {
    text-align: right;
}

.team-table thead th.sort-asc::after,
.team-table thead th.sort-desc::after {
    content: " ▾";
    color: #3b82f6;
    font-size: 10px;
    margin-left: 4px;
}

.team-table thead th.sort-asc::after {
    content: " ▴";
}

.team-table tbody tr {
    cursor: pointer;
    transition: background 0.1s;
}

.team-table tbody tr:hover {
    background: #253348;
}

.team-table tbody td {
    padding: 12px 16px;
    font-size: 13px;
    color: #cbd5e1;
    border-bottom: 1px solid #1e293b;
}

.team-table tbody td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.pct-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    min-width: 48px;
    text-align: center;
}

.pct-pill.pct-ok { background: #064e3b; color: #34d399; }
.pct-pill.pct-mid { background: #3f3f46; color: #d4d4d8; }
.pct-pill.pct-bad { background: #450a0a; color: #f87171; }

/* Comparative chart */
.chart-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.chart-tab {
    padding: 6px 12px;
    background: #0f172a;
    color: #94a3b8;
    border: 1px solid #334155;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.chart-tab:hover {
    color: #f8fafc;
    border-color: #475569;
}

.chart-tab.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.team-chart {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chart-row {
    display: grid;
    grid-template-columns: 160px 1fr 60px;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.chart-label {
    color: #cbd5e1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chart-bar-wrap {
    background: #0f172a;
    border-radius: 6px;
    height: 10px;
    overflow: hidden;
}

.chart-bar {
    height: 100%;
    border-radius: 6px;
    transition: width 0.3s ease;
}

.chart-value {
    color: #94a3b8;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-size: 12px;
}

@media (max-width: 1024px) {
    .insights-kpis { grid-template-columns: repeat(2, 1fr); }
    .insights-two-col { grid-template-columns: 1fr; }
}

/* Stats cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 20px;
}

.stat-card .label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-card .value {
    font-size: 28px;
    font-weight: 700;
    color: #f8fafc;
}

.stat-card .sub {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

/* Upload button */
.btn-upload {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-upload:hover {
    background: #2563eb;
}

.btn-upload svg {
    width: 18px;
    height: 18px;
}

/* Filter bar */
.filter-bar {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-search {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-search svg {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: #64748b;
    pointer-events: none;
}

.filter-search input {
    width: 100%;
    padding: 11px 40px 11px 42px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #f8fafc;
    font-size: 14px;
    transition: border-color 0.15s;
}

.filter-search input:focus {
    outline: none;
    border-color: #3b82f6;
}

.filter-search input::placeholder {
    color: #64748b;
}

.filter-clear-search {
    position: absolute;
    right: 8px;
    width: 28px;
    height: 28px;
    background: #334155;
    color: #cbd5e1;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.filter-clear-search:hover {
    background: #475569;
    color: #f8fafc;
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-group label {
    font-size: 10px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.filter-group input,
.filter-group select {
    padding: 7px 10px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 6px;
    color: #f8fafc;
    font-size: 13px;
    min-width: 130px;
    transition: border-color 0.15s;
    cursor: pointer;
}

.filter-group select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3e%3cpath d='M1 1l4 4 4-4' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #3b82f6;
}

.filter-group input[type="date"] {
    color-scheme: dark;
    min-width: 140px;
}

.btn-filter-reset {
    padding: 7px 14px;
    background: transparent;
    color: #94a3b8;
    border: 1px solid #334155;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
    height: 33px;
    align-self: flex-end;
}

.btn-filter-reset:hover {
    background: #334155;
    color: #f8fafc;
    border-color: #475569;
}

.calls-count {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

/* Calls table */
.calls-table-wrapper {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    overflow: hidden;
}

.calls-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #334155;
}

.calls-table-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #f8fafc;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    padding: 12px 20px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #334155;
    background: #1e293b;
}

tbody tr {
    cursor: pointer;
    transition: background 0.1s;
}

tbody tr:hover {
    background: #253348;
}

tbody td {
    padding: 14px 20px;
    font-size: 14px;
    border-bottom: 1px solid #1e293b;
}

/* Status badges */
.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.status-completed {
    background: #064e3b;
    color: #34d399;
}

.status-processing {
    background: #1e3a5f;
    color: #60a5fa;
}

.status-queued {
    background: #3f3f46;
    color: #a1a1aa;
}

.status-failed {
    background: #450a0a;
    color: #f87171;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-processing .status-dot {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Call detail view */
.call-detail {
    display: none;
}

.call-detail.active {
    display: block;
}

.calls-list.hidden {
    display: none;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #94a3b8;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 20px;
    padding: 6px 0;
    border: none;
    background: none;
    transition: color 0.15s;
}

.back-btn:hover {
    color: #f8fafc;
}

.call-info-bar {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.call-info-bar .filename {
    font-size: 18px;
    font-weight: 700;
    color: #f8fafc;
}

.call-info-bar .meta {
    font-size: 13px;
    color: #64748b;
}

/* Audio player */
.audio-player {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.audio-player audio {
    width: 100%;
    height: 40px;
}

/* Transcript */
.transcript-box {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    overflow: hidden;
}

.transcript-header {
    padding: 16px 20px;
    border-bottom: 1px solid #334155;
    font-size: 16px;
    font-weight: 600;
    color: #f8fafc;
}

.transcript-segments {
    padding: 12px 20px;
    max-height: 500px;
    overflow-y: auto;
}

.segment {
    padding: 12px 0;
    border-bottom: 1px solid #1e293b;
}

.segment:last-child {
    border-bottom: none;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #334155;
    color: #cbd5e1;
}

.badge-type {
    background: #1e3a5f;
    color: #93c5fd;
}

.sent-positive {
    background: #064e3b;
    color: #34d399;
}

.sent-neutral {
    background: #3f3f46;
    color: #d4d4d8;
}

.sent-negative {
    background: #450a0a;
    color: #f87171;
}

.urgency-low {
    background: #1e3a8a;
    color: #93c5fd;
}

.urgency-medium {
    background: #78350f;
    color: #fbbf24;
}

.urgency-high {
    background: #7f1d1d;
    color: #fca5a5;
    animation: pulse 1.5s infinite;
}

/* Analytics panel */
.analytics-row {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.analytics-tile {
    flex: 1;
    min-width: 140px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 14px 16px;
}

.tile-label {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.tile-value {
    font-size: 14px;
}

.analytics-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #334155;
}

.analytics-section:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.analytics-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 10px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    display: inline-block;
    padding: 4px 10px;
    background: #334155;
    color: #cbd5e1;
    border-radius: 6px;
    font-size: 12px;
}

.insight-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.insight-list li {
    padding: 8px 12px;
    margin-bottom: 6px;
    background: #0f172a;
    border-left: 3px solid #475569;
    border-radius: 4px;
    font-size: 13px;
    color: #cbd5e1;
}

/* Summary */
.summary-box {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 20px;
}

.summary-header {
    padding: 16px 20px;
    border-bottom: 1px solid #334155;
    font-size: 16px;
    font-weight: 600;
    color: #f8fafc;
}

.summary-text {
    padding: 20px;
    font-size: 14px;
    line-height: 1.7;
    color: #94a3b8;
}

.segment-speaker {
    font-size: 12px;
    font-weight: 700;
    color: #3b82f6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.segment-speaker.speaker-agent { color: #3b82f6; }
.segment-speaker.speaker-guest { color: #ef4444; }
.segment-speaker.speaker-unknown { color: #94a3b8; }

.segment-time {
    font-size: 11px;
    color: #64748b;
    margin-left: 8px;
    font-weight: 400;
}

.segment-text {
    font-size: 14px;
    line-height: 1.6;
    color: #cbd5e1;
}

/* Upload modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 32px;
    width: 480px;
    max-width: 90vw;
}

.modal h3 {
    font-size: 18px;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 8px;
}

.modal p {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 24px;
}

.drop-zone {
    border: 2px dashed #334155;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.drop-zone svg {
    width: 40px;
    height: 40px;
    color: #64748b;
    margin-bottom: 12px;
}

.drop-zone .label {
    font-size: 14px;
    color: #94a3b8;
}

.drop-zone .sublabel {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.btn-cancel {
    padding: 8px 16px;
    background: #334155;
    color: #94a3b8;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

.btn-cancel:hover {
    background: #475569;
    color: #f8fafc;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 14px;
    margin-bottom: 4px;
}

/* Delete button */
.btn-delete {
    padding: 6px 14px;
    background: #450a0a;
    color: #f87171;
    border: 1px solid #7f1d1d;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    margin-left: auto;
}

.btn-delete:hover {
    background: #7f1d1d;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}

/* Responsive */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
