/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

/* Header Styles */
.header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo h2 {
    color: #2563eb;
    font-size: 1.5rem;
}

.logo-img {
    max-height: 50px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #2563eb;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

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

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

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

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-danger {
    background: #dc2626;
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

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

/* Home Page Styles */
.home-page {
    min-height: calc(100vh - 200px);
}

.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.search-container {
    max-width: 600px;
    margin: 0 auto 2rem;
}

.search-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.search-input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
}

.search-button {
    padding: 1rem 2rem;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.search-button:hover {
    transform: scale(1.05);
}

.create-ticket-section {
    margin-top: 2rem;
}

/* Knowledge Base Section */
.knowledge-base-section {
    padding: 4rem 0;
    background: white;
}

.knowledge-base-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: #333;
}

.knowledge-base-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.knowledge-base-card {
    background: #f9fafb;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: transform 0.3s, box-shadow 0.3s;
}

.knowledge-base-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.knowledge-base-card h3 {
    color: #2563eb;
    margin-bottom: 1rem;
}

.knowledge-base-card p {
    color: #6b7280;
    margin-bottom: 1rem;
}

.read-more {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.read-more:hover {
    text-decoration: underline;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
}

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

/* Auth Pages */
.auth-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

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

.auth-container h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

.auth-link {
    text-align: center;
    margin-top: 1rem;
    color: #6b7280;
}

.auth-link a {
    color: #2563eb;
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Dashboard */
.dashboard-page {
    padding: 2rem 0;
}

.dashboard-actions {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

/* Tickets */
.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.ticket-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s;
}

.ticket-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.ticket-header h3 {
    margin: 0;
}

.ticket-header h3 a {
    color: #333;
    text-decoration: none;
}

.ticket-header h3 a:hover {
    color: #2563eb;
}

.ticket-description {
    color: #6b7280;
    margin-bottom: 1rem;
}

.ticket-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: #9ca3af;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-open {
    background: #dbeafe;
    color: #1e40af;
}

.badge-in_progress {
    background: #fef3c7;
    color: #92400e;
}

.badge-closed {
    background: #d1fae5;
    color: #065f46;
}

.badge-priority-low {
    background: #e5e7eb;
    color: #374151;
}

.badge-priority-medium {
    background: #fef3c7;
    color: #92400e;
}

.badge-priority-high {
    background: #fee2e2;
    color: #991b1b;
}

/* Ticket Show Page */
.ticket-show-page {
    padding: 2rem 0;
}

.ticket-header-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.ticket-meta-info {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.ticket-main {
    display: grid;
    gap: 2rem;
}

.ticket-description,
.ticket-replies,
.reply-form-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
}

.reply-card {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #2563eb;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.reply-message {
    color: #333;
    line-height: 1.8;
}

.attachments {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.attachments ul {
    list-style: none;
    margin-top: 0.5rem;
}

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

.attachments a {
    color: #2563eb;
    text-decoration: none;
}

.attachments a:hover {
    text-decoration: underline;
}

/* Admin Styles */
.admin-dashboard {
    padding: 2rem 0;
}

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

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

.stat-card h3 {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2563eb;
}

.admin-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.settings-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
}

.settings-section {
    margin-bottom: 3rem;
}

.settings-section h2 {
    margin-bottom: 1.5rem;
    color: #333;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.current-logo {
    margin-bottom: 1rem;
}

/* Knowledge Base Page */
.knowledge-base-page {
    padding: 2rem 0;
}

.search-section {
    margin-bottom: 2rem;
}

.knowledge-base-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.knowledge-base-item {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.knowledge-base-item h2 {
    color: #2563eb;
    margin-bottom: 1rem;
}

.category-badge {
    display: inline-block;
    background: #e5e7eb;
    color: #374151;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.knowledge-content {
    color: #4b5563;
    line-height: 1.8;
}

.admin-knowledge-base {
    padding: 2rem 0;
}

.knowledge-base-form-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 3rem;
}

.knowledge-base-list-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

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

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

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert ul {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .auth-buttons {
        flex-direction: column;
        width: 100%;
    }

    .auth-buttons .btn {
        width: 100%;
    }

    .knowledge-base-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .ticket-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .ticket-meta-info {
        flex-direction: column;
        gap: 0.5rem;
    }
}

