/* Premium Glassmorphism Theme - SupportApp AI 2026 */
:root {
    /* Light Theme Variables */
    --bg-color: #f0f2f5;
    --text-color: #333333;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --accent-color: #4CAF50;
    --accent-hover: #45a049;
    --danger-color: #f44336;
    --link-color: #2196F3;
    --border-radius: 16px;
    --input-bg: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] {
    /* Dark Theme Variables */
    --bg-color: #0f172a;
    --text-color: #e2e8f0;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --danger-color: #ef4444;
    --link-color: #60a5fa;
    --input-bg: rgba(15, 23, 42, 0.8);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
    position: relative;
    overflow-x: hidden;
}

/* Dynamic Background */
.app-background {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.15), transparent 60%),
                radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.1), transparent 50%);
    z-index: -1;
    animation: bgShift 30s ease-in-out infinite alternate;
}

[data-theme="light"] .app-background {
    background: radial-gradient(circle at 50% 50%, rgba(76, 175, 80, 0.15), transparent 60%),
                radial-gradient(circle at 80% 20%, rgba(33, 150, 243, 0.1), transparent 50%);
}

@keyframes bgShift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-10%, -10%) scale(1.1); }
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-height: 100vh;
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

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

.header-logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
    background: linear-gradient(to right, var(--accent-color), #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-status {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    font-weight: 600;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
}

.btn-logout {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-logout:hover {
    background: var(--danger-color);
    color: white;
}

.btn-icon {
    background: transparent;
    color: var(--text-color);
    padding: 0.5rem;
    border-radius: 50%;
}

.btn-icon:hover {
    background: rgba(128, 128, 128, 0.1);
}

/* Select */
.glass-select {
    appearance: none;
    background: var(--input-bg);
    color: var(--text-color);
    border: 1px solid var(--glass-border);
    padding: 0.5rem 2rem 0.5rem 1rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
}

.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: "▼";
    font-size: 0.7rem;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Layout */
.app-body {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    flex-grow: 1;
}



/* Sidebar Menu */
.sidebar ul {
    list-style: none;
}

.sidebar li {
    margin-bottom: 0.5rem;
}

.sidebar a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.sidebar a:hover {
    background: rgba(128, 128, 128, 0.1);
    transform: translateX(4px);
}

/* Content Area */
.content-area {
    min-height: 400px;
}

/* Forms and Inputs */
input[type="text"], input[type="password"] {
    background: var(--input-bg);
    color: var(--text-color);
    border: 1px solid var(--glass-border);
    padding: 0.75rem;
    border-radius: 8px;
    width: 100%;
    margin-bottom: 1rem;
    outline: none;
    transition: border-color 0.2s ease;
}

input[type="text"]:focus, input[type="password"]:focus {
    border-color: var(--accent-color);
}

.button {
    background: var(--accent-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.1s ease;
}

.button:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.button:active {
    transform: translateY(1px);
}

/* Tables */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

tr:hover td {
    background: rgba(128, 128, 128, 0.05);
}

/* Login Screen specific */
.login-box {
    max-width: 400px;
    margin: 4rem auto;
    text-align: center;
}

.login-box h2 {
    margin-bottom: 1.5rem;
}

/* Error/Warning Messages */
.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    margin-bottom: 1rem;
}

/* Footer */
.main-footer {
    text-align: center;
    opacity: 0.6;
    font-size: 0.8rem;
    margin-top: 2rem;
}

a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Overwrite old tsview styles */
.channel {
    background: rgba(128, 128, 128, 0.05);
    border-radius: 4px;
    padding: 4px;
    margin-bottom: 2px;
}
.client {
    padding-left: 20px;
    opacity: 0.9;
}
