:root {
    --bg-main: #050816;
    --bg-section: #0b1220;
    --card-bg: rgba(15, 23, 42, 0.85);
    --primary: #38bdf8;
    --primary-soft: rgba(56, 189, 248, 0.12);
    --accent: #22c55e;
    --text-main: #e5e7eb;
    --text-muted: #9ca3af;
    --radius: 0.75rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;
    background: radial-gradient(circle at top, #0f172a 0, #020617 50%, #000 100%);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
}

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

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-box {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--radius);
    border: 1px solid rgba(148, 163, 184, 0.35);
    /* box-shadow: 0 18px 40px rgba(15, 23, 42, 0.8); */
    /* backdrop-filter: blur(10px); */
}

@media (max-width: 768px) {
    .auth-box {
        max-width: 450px;
        padding: 30px;
    }
}

h2 {
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.8rem;
    color: var(--primary);
    /* background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text; */
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-main);
}

input,
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: var(--text-main);
    border-radius: 8px;
    font-family: inherit;
    /* transition: all 0.3s ease; */
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    /* box-shadow: 0 0 0 3px var(--primary-soft); */
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.6rem;
    background: #0ea5e9;
    /* Flat color */
    color: white !important;
    border: none;
    border-radius: 8px;
    /* Simple radius */
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
}

.btn-primary:hover {
    background: #0284c7;
    /* Simple hover state */
    opacity: 1;
}

.admin-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.hidden {
    display: none;
}

a:not(.btn-primary) {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:not(.btn-primary):hover {
    color: var(--accent);
}

/* Dashboard Styles */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.ticket-list {
    display: grid;
    gap: 20px;
}

.ticket-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: var(--radius);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.8);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ticket-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 45px rgba(56, 189, 248, 0.25);
}

.ticket-card h3 {
    color: var(--text-main);
    margin-bottom: 8px;
}

.ticket-card small {
    color: var(--text-muted);
}

/* Status Badges */
.status-open {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-in-process {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-closed {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Ticket Detail Styles */
.ticket-detail {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--radius);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.8);
    margin-bottom: 30px;
}

.ticket-messages {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.message {
    background: rgba(15, 23, 42, 0.6);
    padding: 20px;
    border-radius: var(--radius);
    max-width: 80%;
    border: 1px solid rgba(148, 163, 184, 0.25);
    transition: transform 0.2s;
}

.message:hover {
    transform: translateX(2px);
}

.message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(34, 197, 94, 0.2));
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.message.admin {
    align-self: flex-start;
    background: rgba(51, 65, 85, 0.4);
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.message-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
}

.reply-form {
    margin-top: 30px;
    background: var(--card-bg);
    padding: 25px;
    border-radius: var(--radius);
    border: 1px solid rgba(148, 163, 184, 0.35);
}

/* Modal Styles */
#new-ticket-modal {
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--radius);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .ticket-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .message {
        max-width: 95%;
    }
}