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

/* Material Symbols */
.material-symbols-outlined {
    font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 24;
    vertical-align: middle;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --border-color: #e2e8f0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--dark-color);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.nav-logo {
    height: 40px;
    width: auto;
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    min-width: 150px;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s, transform 0.2s;
}

.nav-dropdown-menu.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.nav-dropdown-menu a {
    color: var(--dark-color);
    display: block;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.nav-dropdown-menu a:last-child {
    border-bottom: none;
}

.nav-dropdown-menu a:hover {
    background: var(--light-color);
    color: var(--primary-color);
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 180px);
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0;
    background: white;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.hero h1 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
}

.search-box form {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-card h3 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: var(--secondary-color);
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.category-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    color: var(--primary-color);
    font-variation-settings:
    'FILL' 0,
    'wght' 300,
    'GRAD' 0,
    'opsz' 48;
}

.category-card h3 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.category-card p {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Sections */
.section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.section h2 {
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

/* Articles Grid */
.articles-grid {
    display: grid;
    gap: 1rem;
}

.article-card {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: background 0.2s;
}

.article-card:hover {
    background: var(--light-color);
}

.article-card h3 {
    margin-bottom: 0.5rem;
}

.article-card h3 a {
    color: var(--dark-color);
    text-decoration: none;
}

.article-card h3 a:hover {
    color: var(--primary-color);
}

.article-meta {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

/* CTA Box */
.cta-box {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-color), #1e40af);
    color: white;
    border-radius: 8px;
}

.cta-box h2 {
    color: white;
    margin-bottom: 1rem;
}

.cta-box p {
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-primary {
    background: #dbeafe;
    color: var(--primary-color);
}

.badge-secondary {
    background: #f1f5f9;
    color: var(--secondary-color);
}

.badge-success {
    background: #d1fae5;
    color: var(--success-color);
}

.badge-warning {
    background: #fef3c7;
    color: #d97706;
}

.badge-danger {
    background: #fee2e2;
    color: var(--danger-color);
}

.badge-info {
    background: #cffafe;
    color: var(--info-color);
}

/* Auth Container */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.auth-box {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 450px;
}

.auth-box h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.sso-section {
    margin-bottom: 1.5rem;
}

.btn-sso {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
}

.btn-sso:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--secondary-color);
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider span {
    padding: 0 1rem;
    font-size: 0.875rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--secondary-color);
}

.form-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid var(--danger-color);
}

.alert-info {
    background: #cffafe;
    color: #155e75;
    border: 1px solid var(--info-color);
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.page-header h1 {
    color: var(--dark-color);
    margin: 0;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

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

.table thead {
    background: var(--light-color);
}

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

.table th {
    font-weight: 600;
    color: var(--dark-color);
}

.table tr:hover {
    background: #fafafa;
}

/* Ticket Details */
.ticket-details {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ticket-meta {
    color: var(--secondary-color);
    margin: 0;
}

.ticket-subject h2 {
    margin: 1.5rem 0;
}

.message-box {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.message-box.admin-reply {
    background: #fef9e7;
    border-color: #f59e0b;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.message-time {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

.message-content {
    line-height: 1.6;
}

.reply-form, .replies-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.admin-actions {
    background: #fff3cd;
    padding: 1.5rem;
    border-radius: 4px;
    margin-bottom: 2rem;
}

.inline-form {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.inline-form .form-control {
    width: auto;
}

/* KB Styles */
.kb-search {
    margin-bottom: 2rem;
}

.kb-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.kb-filters {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.filter-section {
    margin-bottom: 1.5rem;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section h3 {
    font-size: 1rem;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.filter-section .kb-categories {
    margin-bottom: 0;
}

.category-pill {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    text-decoration: none;
    color: var(--dark-color);
    transition: all 0.2s;
}

.category-pill:hover, .category-pill.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.kb-articles-list {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.kb-article-item {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.kb-article-item:last-child {
    border-bottom: none;
}

.kb-article-item h3 {
    margin-bottom: 0.5rem;
}

.kb-article-item h3 a {
    color: var(--dark-color);
    text-decoration: none;
}

.kb-article-item h3 a:hover {
    color: var(--primary-color);
}

.kb-article {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.kb-breadcrumb {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.kb-breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.article-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.article-header h1 {
    margin-bottom: 1rem;
}

.article-content {
    line-height: 1.8;
    margin-bottom: 2rem;
}

.article-content h2, .article-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.article-footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.article-helpful {
    text-align: center;
    margin-bottom: 1.5rem;
}

.article-actions {
    text-align: center;
}

.related-articles {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.related-articles ul {
    list-style: none;
}

.related-articles li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.related-articles li:last-child {
    border-bottom: none;
}

.related-articles a {
    color: var(--dark-color);
    text-decoration: none;
}

.related-articles a:hover {
    color: var(--primary-color);
}

/* Misc */
.back-link {
    margin-top: 2rem;
}

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

.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: 1.5rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--secondary-color);
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.attachments-list {
    list-style: none;
    padding: 0;
}

.attachments-list li {
    padding: 0.5rem 0;
}

.attachments-list a {
    color: var(--primary-color);
    text-decoration: none;
}

.attachment-link {
    display: inline-block;
    margin: 0.25rem 0.5rem 0.25rem 0;
    padding: 0.25rem 0.75rem;
    background: var(--light-color);
    border-radius: 4px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .inline-form {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Admin Styles */
.admin-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.action-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: var(--dark-color);
    border: 2px solid var(--border-color);
    transition: all 0.3s;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: var(--primary-color);
}

.action-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    display: block;
    font-variation-settings:
    'FILL' 0,
    'wght' 300,
    'GRAD' 0,
    'opsz' 48;
}

.action-card h3 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.action-card p {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

.admin-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

/* Profile Page */
.profile-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.profile-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.profile-section h2 {
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

/* Settings Page */
.settings-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.settings-nav {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1rem;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--dark-color);
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    transition: all 0.2s;
}

.settings-nav-item:hover {
    background: var(--light-color);
}

.settings-nav-item.active {
    background: var(--primary-color);
    color: white;
}

.settings-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 2rem;
}

.settings-tab {
    display: none;
}

.settings-tab.active {
    display: block;
}

.settings-form {
    max-width: 600px;
}

.settings-form h2 {
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

@media (max-width: 768px) {
    .settings-container {
        grid-template-columns: 1fr;
    }
    
    .settings-nav {
        display: flex;
        overflow-x: auto;
        padding: 0.5rem;
    }
    
    .settings-nav-item {
        white-space: nowrap;
        margin-right: 0.5rem;
        margin-bottom: 0;
    }
    
    .profile-container {
        grid-template-columns: 1fr;
    }
}

