:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-color: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --info-light: #eff6ff;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
    box-sizing: border-box;
}

/* Glassmorphism Card */
.card {
    background: var(--card-bg);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

/* Typography */
h1,
h2,
h3 {
    margin-top: 0;
    font-weight: 700;
}

h1 {
    font-size: 2.25rem;
    letter-spacing: -0.025em;
}

h2 {
    font-size: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

input,
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    background-color: #fff;
    font-size: 1rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Login/Register Page Specifics */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    margin: 0;
    padding: 1rem;
    box-sizing: border-box;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    padding: 2.5rem;
}

.links {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.links a:hover {
    text-decoration: underline;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    font-weight: 500;
}

.alert-success {
    background-color: #ecfdf5;
    color: #065f46;
    border-color: #d1fae5;
}

.alert-danger, .alert-error {
    background-color: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border-color: #bfdbfe;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-block;
}

.status-open {
    background: #fee2e2;
    color: #991b1b;
}

.status-answered {
    background: #dbeafe;
    color: #1e40af;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-closed {
    background: #d1fae5;
    color: #065f46;
}

.status-waiting_third_party {
    background: #f3e8ff;
    color: #6b21a8;
}

.status-info {
    background: var(--info-light);
    color: var(--info-color);
}

/* Responsive Utilities */
.grid-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.grid-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 1rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.grid-2-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .grid-2-1 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .grid-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header .btn-group {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .card {
        padding: 1.5rem;
    }

    .chat-entry-details {
        text-align: left !important;
        margin-top: 0.5rem;
    }

    .chat-preview {
        max-width: 100% !important;
    }

    .admin-chat-entry {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .flex-mobile-stack {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center;
    }

    .flex-mobile-stack>div {
        width: 100% !important;
    }
}