/* Reset and Base Styles */
:root {
    --dark-bg: #2a2e35;
    --light-bg: #f5f6f5;
    --primary: #5c7cfa;
    --text-dark: #ffffff;
    --text-light: #d1d5db;
    --hover-dark: #4263eb;
    --body-gradient: linear-gradient(135deg, #2a2e35, #3b424a, #4b525a);
    --dark-gradient: linear-gradient(135deg, #2a2e35, #1f252b, #151a20);
}

body {
    font-family: 'Poppins', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--dark-gradient);
    color: var(--text-light);
    line-height: 1.6;
}

header {
    background: var(--dark-gradient);
    color: var(--text-dark);
    text-align: center;
    padding: 2.5rem 2rem;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

header h1 {
    font-size: 2.5rem;
    margin: 0;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

header h1:hover {
    color: var(--primary);
}

.tagline {
    font-style: italic;
    opacity: 0.9;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

nav {
    background: var(--dark-gradient);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

nav ul li {
    margin: 0;
}

nav ul li a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: color 0.3s ease, transform 0.3s ease;
}

nav ul li a:hover {
    color: var(--primary);
    transform: translateY(-2px);
    display: inline-block;
}

nav ul li a.active {
    color: var(--primary);
    font-weight: bold;
    border-bottom: 2px solid var(--primary);
}

nav ul li a:visited {
    color: #ffffff;
}

/* Hamburger Menu */
.nav-toggle {
    display: none;
    font-size: 24px;
    color: var(--text-dark);
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.nav-toggle:hover {
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
        margin: 1rem auto 0; /* Center under the site title and tagline */
        position: static; /* Remove absolute positioning */
    }

    nav ul {
        display: none;
        flex-direction: column;
        background: var(--dark-gradient);
        width: 100%;
        padding: 1rem 0;
        z-index: 1000;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }

    nav ul.active {
        display: flex;
    }

    nav ul li {
        margin: 0.5rem 0;
        text-align: center;
    }

    nav ul li a {
        padding: 1rem;
        font-size: 1.2rem;
    }
}

section {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    background: var(--body-gradient);
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

section a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

section a:hover {
    color: var(--hover-dark);
    transform: translateX(5px);
    text-decoration: underline;
}

section a:visited {
    color: #ffffff;
}

h2 {
    color: var(--text-dark);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    width: 50px;
    height: 3px;
    background: var(--primary);
    position: absolute;
    bottom: -5px;
    left: 0;
}

.welcome-message {
    text-align: center;
    margin: 1rem auto;
    font-size: 2rem;
    color: var(--text-dark);
    width: 100%;
    max-width: 1200px; /* Match section width */
}

.feature-grid, .pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card, .plan {
    background: var(--dark-gradient);
    color: var(--text-dark);
    padding: 1.5rem;
    border-radius: 12px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-card:hover, .plan:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background 0.3s ease, transform 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

button:hover {
    background: var(--hover-dark);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.overlay {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
}

.overlay.active {
    display: block;
}

.overlay-content {
    background: var(--dark-gradient);
    padding: 2rem;
    width: 100%;
    color: var(--text-dark);
    border-radius: 12px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    background: none;
    border: none;
    color: var(--text-dark);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.close-btn:hover {
    transform: rotate(90deg);
}

.price s {
    color: #ff6b6b;
    margin-right: 0.5rem;
}

.contact {
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    background: var(--dark-gradient);
    color: var(--text-dark);
    font-size: 1rem;
    transition: box-shadow 0.3s ease;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group input:focus,
.form-group textarea:focus {
    box-shadow: inset 0 0 5px rgba(92, 124, 250, 0.5), 0 0 5px rgba(92, 124, 250, 0.3);
    outline: none;
}

.form-group input[type="radio"] {
    width: auto;
    padding: 0;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.success {
    color: #2ecc71;
    background: rgba(46, 204, 113, 0.1);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid rgba(46, 204, 113, 0.2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.error {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid rgba(231, 76, 60, 0.2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

footer {
    text-align: center;
    padding: 1.5rem;
    background: var(--dark-gradient);
    color: var(--text-dark);
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer p {
    margin: 0.5rem 0;
}

footer a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

footer a:hover {
    color: var(--primary);
    transform: translateY(-2px);
    display: inline-block;
}

footer a:visited {
    color: #ffffff;
}

.checkout {
    padding: 0 2rem;
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

.plan-option {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 0.5rem 0;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
}

.plan-option input[type="radio"] {
    margin: 0;
    margin-right: 0.5rem;
    padding: 0;
}

.plan-option label {
    margin: 0;
    padding: 0;
    font-weight: normal;
    display: inline;
    color: var(--text-dark);
}

.checkout .form-group {
    margin-bottom: 1.5rem;
    padding: 0;
    text-align: left;
}

.checkout .form-group > label {
    margin-bottom: 0.25rem;
    display: block;
    text-align: left;
}

.checkout .form-group:has(.plan-option) > label {
    margin-bottom: 0.25rem;
}

.checkout .form-group p {
    margin-top: 1rem;
    font-style: italic;
}

.success-page {
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.register, .login {
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.setup {
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.tickets {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 2rem;
}

.ticket-sidebar {
    width: 200px;
    background: var(--dark-gradient);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ticket-sidebar h3 {
    margin: 0 0 0.5rem;
    color: var(--text-dark);
    font-size: 1.1rem;
    text-transform: uppercase;
}

.ticket-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.ticket-sidebar li {
    margin-bottom: 0.5rem;
}

.ticket-sidebar a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.ticket-sidebar a:hover, .ticket-sidebar a.active {
    color: var(--hover-dark);
    transform: translateX(5px);
    text-decoration: underline;
}

.ticket-sidebar a:visited {
    color: #ffffff;
}

.ticket-content {
    flex: 1;
    background: var(--dark-gradient);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

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

.ticket-actions input[type="text"],
.ticket-actions select,
.ticket-actions input[type="date"] {
    padding: 0.4rem;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    transition: box-shadow 0.3s ease;
    background: var(--dark-gradient);
    color: var(--text-dark);
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: auto;
    min-width: 100px;
    max-width: 150px;
}

.ticket-actions input[type="text"]:focus,
.ticket-actions select:focus,
.ticket-actions input[type="date"]:focus {
    box-shadow: inset 0 0 5px rgba(92, 124, 250, 0.5), 0 0 5px rgba(92, 124, 250, 0.3);
    outline: none;
}

.ticket-actions button {
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
}

/* Updated Mobile Styles for Filter Bar */
@media (max-width: 768px) {
    .ticket-actions .search {
        flex-direction: column; /* Stack vertically on mobile */
        align-items: stretch;
        gap: 0.3rem; /* Tighter spacing */
        margin-bottom: 0.5rem;
    }

    .ticket-actions input[type="text"],
    .ticket-actions select,
    .ticket-actions input[type="date"] {
        padding: 0.35rem; /* Slightly larger padding */
        font-size: 0.8rem; /* Larger font for readability */
        max-width: 100%; /* Full width */
        min-width: 0; /* Allow shrinking */
    }

    .ticket-actions button {
        padding: 0.35rem 0.8rem; /* Slightly larger button */
        font-size: 0.8rem;
        width: 100%;
    }
}

.ticket-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.ticket-table th, .ticket-table td {
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    text-align: left;
    font-size: 0.9rem; /* Base font size for desktop */
}

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

.ticket-table td a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

.ticket-table td a:hover {
    color: var(--hover-dark);
    transform: translateX(5px);
    text-decoration: underline;
}

.ticket-table td a:visited {
    color: #ffffff;
}

/* Mobile Styles for Ticket Table */
@media (max-width: 768px) {
    .ticket-table th, .ticket-table td {
        font-size: 0.7rem; /* Smaller font size for mobile */
        padding: 0.3rem; /* Reduced padding for mobile */
    }
}

.pagination {
    margin-top: 1rem;
    text-align: center;
}

.pagination a {
    color: var(--text-light);
    text-decoration: none;
    margin: 0 0.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.pagination a:hover {
    color: var(--hover-dark);
    transform: translateY(-2px);
    display: inline-block;
    text-decoration: underline;
}

.pagination a:visited {
    color: #ffffff;
}

.ticket-conversation {
    margin-top: 1rem;
}

.ticket-message {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
    display: flex;
    gap: 1rem;
}

.ticket-message:last-child {
    border-bottom: none;
}

.ticket-message .avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.ticket-message:hover .avatar {
    transform: scale(1.1);
}

.ticket-message .message-content {
    flex: 1;
}

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

.ticket-message .message-header .user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ticket-message .message-header .user-info .name {
    font-weight: bold;
    color: var(--text-dark);
}

.ticket-message .message-header .user-info .role {
    font-size: 0.8rem;
    color: var(--primary);
    background: rgba(92, 124, 250, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
}

.ticket-message .message-header .timestamp {
    font-size: 0.8rem;
    color: #9ca3af;
}

.ticket-message .message-body {
    color: var(--text-dark);
}

/* Admin Dashboard Layout */
.user-dashboard {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.dashboard-content {
    flex: 2;
    min-width: 0;
}

.dashboard-summary {
    flex: 1;
    min-width: 250px;
}

/* Smaller Tables for Admin Dashboard */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.admin-table th, .admin-table td {
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.3rem 0.5rem;
    text-align: left;
}

.admin-table th {
    background: var(--dark-gradient);
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.9rem;
}

.admin-table td a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

.admin-table td a:hover {
    color: var(--hover-dark);
    transform: translateX(5px);
    text-decoration: underline;
}

.admin-table td a:visited {
    color: #ffffff;
}

/* New Styles for Admin Dashboard */
.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

.tickets-section {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.ticket-content {
    flex: 1;
    min-width: 0;
}

.admin-table-wrapper {
    overflow-x: auto;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .tickets-section {
        flex-direction: column;
    }

    .ticket-sidebar {
        width: 100%;
    }

    .admin-table-wrapper {
        margin-bottom: 1rem;
    }

    .admin-table th, .admin-table td {
        font-size: 0.8rem;
        padding: 0.2rem 0.4rem;
    }
}

/* FAQ Section */
.faq {
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-question {
    width: 100%;
    text-align: left;
    background: var(--dark-gradient);
    color: var(--text-dark);
    padding: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease, transform 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-question:hover {
    background: var(--primary);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.faq-question::after {
    content: '▼';
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.faq-question.active::after {
    transform: rotate(180deg);
}

.faq-answer {
    display: none;
    padding: 1rem;
    background: var(--dark-gradient);
    border-radius: 8px;
    margin-top: 0.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-answer.active {
    display: block;
}

.faq-answer a {
    color: var(--text-dark);
    transition: color 0.3s ease, transform 0.3s ease;
}

.faq-answer a:hover {
    color: var(--hover-dark);
    transform: translateX(5px);
    text-decoration: underline;
}

.faq-answer a:visited {
    color: #ffffff;
}

/* Terms Section */
.terms h3 {
    font-weight: bold;
    color: var(--text-dark);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.terms p,
.terms ul,
.terms li {
    font-weight: normal; /* Ensure normal font weight for non-heading text */
    color: var(--text-light);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .tickets {
        flex-direction: column;
    }

    .ticket-sidebar {
        width: 100%;
    }

    .feature-grid, .pricing-grid {
        grid-template-columns: 1fr;
    }

    .overlay {
        top: 0;
        width: 100%;
        height: 100%;
    }

    .overlay-content {
        width: 90%;
        margin: 5% auto;
    }

    .user-dashboard {
        flex-direction: column;
    }

    .dashboard-content, .dashboard-summary {
        flex: 1;
        width: 100%;
    }

    .admin-table th, .admin-table td {
        font-size: 0.8rem;
        padding: 0.2rem 0.4rem;
    }

    .faq-question {
        font-size: 1rem;
        padding: 0.8rem;
    }

    .faq-answer {
        padding: 0.8rem;
    }

    header h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}