/* APEX-029-25: Support Ticket System Styles */

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

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

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

/* Navigation */
.navbar {
    background: #2c3e50;
    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;
}

.navbar .brand {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
}

.navbar .nav-link {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    margin-left: 1.5rem;
    transition: color 0.3s;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: white;
}

.navbar-admin {
    background: #1a252f;
}

.navbar .nav-links {
    display: flex;
    align-items: center;
}

.navbar .nav-user {
    color: rgba(255,255,255,0.6);
    margin-left: 1.5rem;
    font-size: 0.9rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.hero p {
    color: #666;
    font-size: 1.1rem;
}

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

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Forms */
.ticket-form-container,
.login-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto 2rem;
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-outline {
    background: transparent;
    border: 2px solid #3498db;
    color: #3498db;
}

.btn-outline:hover {
    background: #3498db;
    color: white;
}

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

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* Info Section */
.info-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.info-section h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.info-section ol {
    margin-left: 1.5rem;
    color: #666;
}

.info-section li {
    margin-bottom: 0.5rem;
}

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

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

.stat-card h3 {
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

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

.quick-actions {
    margin-top: 2rem;
}

.quick-actions h2 {
    margin-bottom: 1rem;
}

/* Tickets Table */
.tickets-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-collapse: collapse;
    margin-top: 1rem;
}

.tickets-table th,
.tickets-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.tickets-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.tickets-table tr:hover {
    background: #f8f9fa;
}

.tickets-table tr.unread {
    background: #fff8e1;
}

.tickets-table tr.unread:hover {
    background: #ffecb3;
}

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

.badge-open {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-in-progress {
    background: #fff3e0;
    color: #f57c00;
}

.badge-closed {
    background: #e8f5e9;
    color: #388e3c;
}

/* Ticket Detail */
.ticket-detail {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 2rem;
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.ticket-header h1 {
    font-size: 1.5rem;
    color: #2c3e50;
}

.ticket-meta {
    color: #666;
    margin-bottom: 1.5rem;
}

.ticket-meta p {
    margin-bottom: 0.25rem;
}

.ticket-message-container {
    margin-bottom: 2rem;
}

.ticket-message-container h3 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.ticket-message {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 5px;
    border-left: 4px solid #3498db;
}

.ticket-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.status-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.status-form label {
    font-weight: 500;
}

.status-form select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Login */
.login-container {
    margin-top: 5rem;
}

.login-container h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.back-link {
    text-align: center;
    margin-top: 1.5rem;
}

.back-link a {
    color: #3498db;
    text-decoration: none;
}

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

/* Error Page */
.error-container {
    text-align: center;
    padding: 5rem 0;
}

.error-container h1 {
    font-size: 3rem;
    color: #e74c3c;
    margin-bottom: 1rem;
}

.error-message {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    color: #666;
    margin-top: 2rem;
}

/* No tickets message */
.no-tickets {
    text-align: center;
    padding: 3rem;
    color: #666;
    background: white;
    border-radius: 8px;
    margin-top: 1rem;
}

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

    .hero h1 {
        font-size: 1.8rem;
    }

    .ticket-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .tickets-table {
        font-size: 0.9rem;
    }
}
