:root {
    --bg-color: #0f0f13;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary-color: #6c5ce7;
    --accent-color: #a29bfe;
    --text-color: #ffffff;
    --text-muted: #b2bec3;
    --danger-color: #ff7675;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
}

body:has(.dashboard-container) {
    overflow: hidden;
    height: 100vh;
}

body:has(.screen) {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    height: 100vh;
}

.background-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.2) 0%, rgba(0, 0, 0, 0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    pointer-events: none;
}

.screen {
    display: none;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
}

.screen.active {
    display: flex;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Login Styles */
.login-panel {
    padding: 3rem;
    width: 400px;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

h1 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.3);
}

.glow-button {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.glow-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(108, 92, 231, 0.4);
}

.glow-button.small {
    padding: 0.6rem;
    font-size: 0.8rem;
}

.error-message {
    color: var(--danger-color);
    margin-top: 1rem;
    font-size: 0.9rem;
    min-height: 1.2em;
}

/* Chat Styles */
.chat-container {
    width: 90%;
    max-width: 1000px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    animation: scaleIn 0.4s ease-out;
}

.chat-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.2rem;
}

.admin-badge {
    background: rgba(108, 92, 231, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #00b894;
    border-radius: 50%;
    box-shadow: 0 0 10px #00b894;
}

.messages-area {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message-bubble {
    max-width: 70%;
    padding: 1rem;
    border-radius: 16px;
    position: relative;
    animation: slideIn 0.3s ease-out;
}

.message-bubble.admin {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-bottom-right-radius: 4px;
}

.message-bubble.user {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.1);
    border-bottom-left-radius: 4px;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
    opacity: 0.8;
}

.sender-name {
    font-weight: 600;
}

.delete-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
    margin-left: 10px;
}

.delete-btn:hover {
    background: rgba(255, 0, 0, 0.3);
    color: white;
}

.message-content {
    line-height: 1.5;
    word-wrap: break-word;
}

.input-area {
    padding: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

#message-form {
    display: flex;
    gap: 1rem;
}

.send-button {
    width: 50px;
    background: var(--primary-color);
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.send-button:hover {
    background: var(--accent-color);
    transform: scale(1.05);
}

.icon-button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.icon-button.small {
    width: 36px;
    height: 36px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    background: var(--bg-color);
    overflow: hidden;
    position: relative;
}

/* Sidebar */
.sidebar {
    width: 280px;
    min-width: 280px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    backdrop-filter: blur(20px);
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.search-box {
    position: relative;
    margin-bottom: 1rem;
}

.search-box input {
    padding: 0.6rem 0.8rem 0.6rem 2.2rem;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
}

.search-box i {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.user-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.user-item {
    padding: 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.user-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.user-item.active {
    background: rgba(108, 92, 231, 0.15);
    border-color: var(--primary-color);
}

.user-item .count-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.sidebar-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 10px;
}

/* Main Content */
.main-content {
    flex: 1;
    height: 100vh;
    padding: 2rem;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.top-bar h2 {
    font-size: 1.4rem;
}

.date-display {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding-bottom: 2rem;
    align-items: start;
}

/* Time Filter Buttons */
.filter-btn {
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
}

.filter-btn.active {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.time-filter {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 1rem;
    flex-wrap: wrap;
}

/* KPI Cards */
.kpi-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
}

.icon-box.purple {
    background: rgba(108, 92, 231, 0.2);
    color: #a29bfe;
}

.icon-box.green {
    background: rgba(0, 184, 148, 0.2);
    color: #00b894;
}

.icon-box.orange {
    background: rgba(253, 121, 168, 0.2);
    color: #fd79a8;
}

.icon-box.blue {
    background: rgba(9, 132, 227, 0.2);
    color: #74b9ff;
}

.kpi-info {
    display: flex;
    flex-direction: column;
}

.kpi-info .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.kpi-info h3 {
    font-size: 1.4rem;
    font-weight: 700;
}

/* Charts */
.chart-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 400px;
    position: relative;
}

.chart-container h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.chart-container canvas {
    width: 100% !important;
    height: 320px !important;
    max-height: 320px;
}

.chart-container.large {
    grid-column: span 3;
    min-height: 250px;
}

.chart-container.small {
    grid-column: span 1;
    min-height: 250px;
}

/* Table - Son Aktiviteler (BÜYÜTÜLDÜ) */
.table-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 600px;
    min-height: 400px;
}

.table-container h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-weight: 600;
}

.table-wrapper {
    overflow-y: auto;
    overflow-x: auto;
    flex: 1;
    border-radius: 8px;
    min-height: 0;
}

/* Base Glass Table Styles */
.glass-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

.glass-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.glass-table th {
    background: rgba(108, 92, 231, 0.15);
    color: var(--text-color);
    text-align: left;
    padding: 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--primary-color);
    white-space: nowrap;
}

.glass-table tbody tr {
    border-bottom: 1px solid var(--glass-border);
    transition: background 0.2s ease;
}

.glass-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.glass-table tbody tr:last-child {
    border-bottom: none;
}

.glass-table td {
    padding: 1rem;
    color: var(--text-color);
    font-size: 0.9rem;
    vertical-align: middle;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.glass-table td:first-child {
    font-weight: 500;
    color: var(--accent-color);
}

/* Compact Table Variant */
.glass-table.compact th,
.glass-table.compact td {
    padding: 0.8rem;
    font-size: 0.85rem;
}

.glass-table.compact th {
    background: rgba(108, 92, 231, 0.2);
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Specific Column Widths */
.glass-table td:nth-child(2),
.glass-table td:nth-child(3) {
    max-width: 250px;
}

.glass-table td:last-child {
    white-space: nowrap;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Empty State */
.glass-table tbody tr.empty-state td {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-style: italic;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

/* Statistics Box Styles */
.stat-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-box:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Type Badges for Timeline */
.type-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.type-badge.analytics {
    background: rgba(108, 92, 231, 0.2);
    color: #a29bfe;
}

.type-badge.message {
    background: rgba(0, 184, 148, 0.2);
    color: #00b894;
}

.type-badge.luther {
    background: linear-gradient(45deg, rgba(253, 121, 168, 0.3), rgba(255, 107, 107, 0.3));
    color: #ff6b6b;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
    }
}

/* Luther Message Row Highlight */
.glass-table tbody tr.luther-row {
    background: rgba(255, 107, 107, 0.05);
    border-left: 3px solid #ff6b6b;
}

.glass-table tbody tr.luther-row:hover {
    background: rgba(255, 107, 107, 0.1);
}

/* Question Filter Pills */
.question-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
}

.filter-pill {
    padding: 0.4rem 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    color: var(--text-color);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.filter-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.filter-pill.active {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
    color: white;
}

.question-filter::-webkit-scrollbar {
    height: 4px;
}

.question-filter::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.question-filter::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.question-filter::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}