/* ============================================
   TICKET SYSTEM STYLES
   ============================================ */
:root {
    --primary: #0a58ca;
    --primary-dark: #003d82;
    --primary-light: #e8f0fe;
    --gray-50: #f8fafc;
    --gray-100: #f1f4f9;
    --gray-200: #e9edf2;
    --gray-300: #d0d7de;
    --gray-400: #b0bec5;
    --gray-500: #8b9aae;
    --gray-600: #6b7a8f;
    --gray-700: #4a5a6e;
    --gray-800: #1e2a3a;
    --gray-900: #0d1824;
    --white: #ffffff;
    --radius: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: 100px 0 60px;
}

/* HEADER */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 10px 0;
}

    #header .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
    }

.logo {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--gray-900);
    text-decoration: none;
}

    .logo span {
        color: var(--primary);
    }

    .logo .consulting {
        font-weight: 400;
        color: var(--gray-500);
        font-size: 0.85rem;
    }

.navbar ul {
    display: flex;
    list-style: none;
    gap: 4px;
    align-items: center;
}

    .navbar ul li a {
        display: block;
        padding: 8px 18px;
        font-size: 0.9rem;
        font-weight: 500;
        color: var(--gray-600);
        border-radius: 40px;
        text-decoration: none;
        transition: var(--transition);
    }

        .navbar ul li a:hover {
            color: var(--primary);
            background: var(--primary-light);
        }

.btn-nav-cta {
    background: var(--primary) !important;
    color: white !important;
    padding: 8px 24px !important;
    border-radius: 40px !important;
    font-weight: 600 !important;
}

    .btn-nav-cta:hover {
        background: var(--primary-dark) !important;
        transform: translateY(-2px);
    }

.mobile-nav-toggle {
    display: none;
    font-size: 1.8rem;
    background: none;
    border: none;
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: block;
    }

    .navbar ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        padding: 20px;
        box-shadow: var(--shadow-md);
    }

        .navbar ul.open {
            display: flex;
        }

    .logo {
        font-size: 1.1rem;
    }
}

/* DASHBOARD */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

    .dashboard-header h1 {
        font-size: 1.8rem;
        font-weight: 700;
        color: var(--gray-900);
    }

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    padding: 20px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary);
}

    .stat-card .number {
        font-size: 2rem;
        font-weight: 800;
        color: var(--gray-900);
    }

    .stat-card .label {
        font-size: 0.85rem;
        color: var(--gray-500);
    }

/* TICKET LIST */
.ticket-list {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

    .ticket-list table {
        width: 100%;
        border-collapse: collapse;
    }

    .ticket-list th {
        background: var(--gray-50);
        padding: 14px 18px;
        text-align: left;
        font-weight: 600;
        font-size: 0.85rem;
        color: var(--gray-600);
        text-transform: uppercase;
        letter-spacing: 0.3px;
        border-bottom: 1px solid var(--gray-200);
    }

    .ticket-list td {
        padding: 14px 18px;
        border-bottom: 1px solid var(--gray-100);
        vertical-align: middle;
    }

    .ticket-list tr:hover {
        background: var(--gray-50);
    }

    .ticket-list .ticket-subject {
        font-weight: 500;
        color: var(--gray-900);
    }

        .ticket-list .ticket-subject a {
            color: var(--gray-900);
            text-decoration: none;
        }

            .ticket-list .ticket-subject a:hover {
                color: var(--primary);
            }

/* BADGES */
.badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 40px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-status-open {
    background: #d4edda;
    color: #155724;
}

.badge-status-progress {
    background: #fff3cd;
    color: #856404;
}

.badge-status-closed {
    background: #f8d7da;
    color: #721c24;
}

.badge-priority-low {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-priority-medium {
    background: #fff3cd;
    color: #856404;
}

.badge-priority-high {
    background: #f8d7da;
    color: #721c24;
}

/* TICKET VIEW */
.ticket-view {
    max-width: 900px;
    margin: 0 auto;
}

.ticket-header {
    margin-bottom: 24px;
}

    .ticket-header h1 {
        font-size: 1.6rem;
        font-weight: 700;
        color: var(--gray-900);
        margin-bottom: 8px;
    }

.ticket-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    color: var(--gray-500);
    font-size: 0.9rem;
}

.message {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

    .message.admin-reply {
        background: var(--primary-light);
        border-left: 4px solid var(--primary);
    }

.message-header {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

    .message-header .date {
        color: var(--gray-500);
        font-size: 0.8rem;
        margin-left: auto;
    }

.message-body {
    color: var(--gray-700);
    line-height: 1.8;
}

/* REPLY FORM */
.reply-form {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    margin-top: 32px;
}

    .reply-form h3 {
        font-size: 1.1rem;
        font-weight: 600;
        margin-bottom: 16px;
        color: var(--gray-900);
    }

    .reply-form textarea {
        width: 100%;
        min-height: 180px;
        padding: 16px 20px;
        border: 2px solid var(--gray-200);
        border-radius: var(--radius);
        font-size: 1rem;
        font-family: inherit;
        background: var(--gray-50);
        transition: var(--transition);
        resize: vertical;
        line-height: 1.8;
    }

        .reply-form textarea:focus {
            outline: none;
            border-color: var(--primary);
            background: var(--white);
            box-shadow: 0 0 0 4px rgba(10,88,202,0.08);
        }

/* BUTTONS */
.btn-primary {
    display: inline-block;
    padding: 12px 32px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

    .btn-primary:hover {
        background: var(--primary-dark);
        transform: translateY(-2px);
        box-shadow: 0 4px 16px rgba(10,88,202,0.25);
    }

.btn-small {
    display: inline-block;
    padding: 6px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

    .btn-small:hover {
        background: var(--primary-dark);
    }

.btn-outline {
    display: inline-block;
    padding: 12px 32px;
    background: transparent;
    color: var(--gray-800);
    border: 2px solid var(--gray-300);
    border-radius: 40px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition);
}

    .btn-outline:hover {
        border-color: var(--primary);
        color: var(--primary);
    }

/* FORMS */
.ticket-form .form-group {
    margin-bottom: 20px;
}

.ticket-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--gray-800);
}

.ticket-form input, .ticket-form textarea, .ticket-form select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    background: var(--gray-50);
    transition: var(--transition);
}

    .ticket-form input:focus, .ticket-form textarea:focus, .ticket-form select:focus {
        outline: none;
        border-color: var(--primary);
        background: var(--white);
        box-shadow: 0 0 0 4px rgba(10,88,202,0.08);
    }

/* ALERTS */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* EMPTY STATE */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

    .empty-state i {
        font-size: 4rem;
        color: var(--gray-300);
    }

    .empty-state h3 {
        font-size: 1.4rem;
        margin: 16px 0 8px;
        color: var(--gray-800);
    }

    .empty-state p {
        color: var(--gray-500);
        margin-bottom: 20px;
    }

/* AUTH */
.auth-container {
    max-width: 440px;
    margin: 40px auto;
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.12);
}

    .auth-container h1 {
        font-size: 1.8rem;
        font-weight: 700;
        margin-bottom: 8px;
        color: var(--gray-900);
    }

    .auth-container p {
        color: var(--gray-600);
        margin-bottom: 24px;
    }

.auth-form .form-group {
    margin-bottom: 16px;
}

.auth-form input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    background: var(--gray-50);
    transition: var(--transition);
}

    .auth-form input:focus {
        outline: none;
        border-color: var(--primary);
        background: var(--white);
        box-shadow: 0 0 0 4px rgba(10,88,202,0.08);
    }

.auth-link {
    text-align: center;
    margin-top: 16px;
    color: var(--gray-600);
}

    .auth-link a {
        color: var(--primary);
        font-weight: 500;
    }

/* ADMIN ACTIONS */
.admin-actions {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-top: 24px;
}

    .admin-actions h3 {
        font-size: 1rem;
        font-weight: 600;
        margin-bottom: 12px;
        color: var(--gray-800);
    }

/* FOOTER */
#footer {
    background: var(--gray-900);
    color: rgba(255,255,255,0.7);
    padding: 30px 0 20px;
    margin-top: 60px;
}

    #footer .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 16px;
    }

    #footer .copyright {
        font-size: 0.9rem;
    }

        #footer .copyright strong {
            color: white;
        }

    #footer .footer-links {
        display: flex;
        gap: 24px;
        list-style: none;
    }

        #footer .footer-links a {
            color: rgba(255,255,255,0.6);
            text-decoration: none;
            transition: var(--transition);
        }

            #footer .footer-links a:hover {
                color: white;
            }

@media (max-width: 768px) {
    .ticket-list table {
        font-size: 0.85rem;
    }

    .ticket-list th, .ticket-list td {
        padding: 10px 12px;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-container {
        padding: 24px;
        margin: 20px;
    }

    .reply-form {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .section-padding {
        padding: 80px 0 40px;
    }

    .dashboard-stats {
        grid-template-columns: 1fr 1fr;
    }

    .ticket-list {
        overflow-x: auto;
    }

        .ticket-list table {
            min-width: 600px;
        }
}
