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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #050816;
    color: #e2e8f0;
    min-height: 100vh;
    line-height: 1.6;
}

#panelBg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.auth-container {
    position: relative;
    z-index: 1;
}

.dashboard {
    position: relative;
    z-index: 1;
}

/* Auth pages (login/register) */
.auth-container {
    display: flex;
    min-height: 100vh;
}

.auth-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background: rgba(12, 18, 40, 0.5);
}

.auth-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background: radial-gradient(ellipse at center, rgba(96, 165, 250, 0.08) 0%, transparent 70%);
    position: relative;
    overflow: hidden;
}

.auth-right::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.15) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

.auth-form-wrapper {
    width: 100%;
    max-width: 400px;
}

.auth-form-wrapper h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #60a5fa, #3b82f6, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-form-wrapper p {
    color: #94a3b8;
    margin-bottom: 32px;
    font-size: 15px;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #cbd5e1;
    margin-bottom: 6px;
}

/* Password strength & validation */
.password-strength-bar {
  height: 4px;
  background: rgba(148, 163, 184, 0.1);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}
.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width 0.3s ease, background 0.3s ease;
}
.strength-fill.weak { background: #ef4444; width: 20% !important; }
.strength-fill.fair { background: #f59e0b; }
.strength-fill.good { background: #22c55e; }
.strength-fill.strong { background: #06b6d4; }

.password-requirements {
  list-style: none;
  margin-top: 6px;
  font-size: 12px;
  color: rgba(148, 163, 184, 0.6);
  line-height: 1.8;
}
.password-requirements li {
  transition: color 0.2s;
}
.password-requirements li::before {
  content: '○ ';
}
.password-requirements li.met {
  color: #22c55e;
}
.password-requirements li.met::before {
  content: '● ';
}

.password-match {
  font-size: 12px;
  margin-top: 4px;
  display: none;
}
.password-match.match { display: block; color: #22c55e; }
.password-match.nomatch { display: block; color: #ef4444; }

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.password-wrapper input {
  width: 100%;
  padding-right: 40px;
}
.toggle-password {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(148, 163, 184, 0.6);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.toggle-password:hover {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.08);
}
.toggle-password.active {
  color: #60a5fa;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(12, 18, 40, 0.85);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 10px;
    color: #e2e8f0;
    font-size: 15px;
    transition: all 0.3s;
    outline: none;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.15);
}

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

.form-group select {
    cursor: pointer;
}

.form-group select option {
    background: #0c0c28;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    display: inline-block;
    padding: 10px 24px;
    background: transparent;
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    text-decoration: none;
}

.btn-secondary:hover {
    background: rgba(96, 165, 250, 0.1);
    border-color: #60a5fa;
}

.btn-danger {
    padding: 10px 24px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
}

.btn-success {
    padding: 10px 24px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.3);
}

.btn-small {
    padding: 6px 14px;
    font-size: 13px;
}

.auth-link {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #94a3b8;
}

.auth-link a {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
}

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

.auth-brand {
    text-align: center;
    position: relative;
    z-index: 1;
}

.auth-brand .logo {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #60a5fa, #3b82f6, #818cf8, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    margin-bottom: 16px;
}

.auth-brand .tagline {
    font-size: 16px;
    color: #94a3b8;
    line-height: 1.6;
}

.auth-brand .tagline span {
    color: #60a5fa;
}

/* Dashboard layout */
.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: rgba(12, 18, 40, 0.9);
    border-right: 1px solid rgba(96, 165, 250, 0.1);
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
}

.sidebar-logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 0 24px 24px;
    border-bottom: 1px solid rgba(96, 165, 250, 0.1);
    margin-bottom: 16px;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    flex: 1;
    padding: 0 12px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    margin-bottom: 4px;
}

.sidebar-nav a:hover {
    background: rgba(96, 165, 250, 0.1);
    color: #e2e8f0;
}

.sidebar-nav a.active {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
}

.sidebar-nav a .icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(96, 165, 250, 0.1);
}

.sidebar-footer .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.sidebar-footer .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.sidebar-footer .user-name {
    font-size: 14px;
    font-weight: 500;
    color: #e2e8f0;
}

.sidebar-footer .user-role {
    font-size: 12px;
    color: #60a5fa;
}

.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 32px;
    min-height: 100vh;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header p {
    color: #94a3b8;
    font-size: 15px;
}

/* Cards */
.card {
    background: rgba(12, 18, 40, 0.85);
    border: 1px solid rgba(96, 165, 250, 0.1);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(10px);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: rgba(12, 18, 40, 0.85);
    border: 1px solid rgba(96, 165, 250, 0.1);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.stat-card:hover {
    border-color: rgba(96, 165, 250, 0.3);
    transform: translateY(-4px);
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #60a5fa;
    margin-bottom: 4px;
}

.stat-card .stat-label {
    font-size: 14px;
    color: #94a3b8;
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table thead th {
    text-align: left;
    padding: 12px 16px;
    color: #94a3b8;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(96, 165, 250, 0.1);
}

table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(96, 165, 250, 0.05);
}

table tbody tr:hover {
    background: rgba(96, 165, 250, 0.03);
}

table tbody tr {
    cursor: pointer;
    transition: background 0.2s;
}

/* Status badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-open {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.badge-in_progress {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
}

.badge-resolved {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.badge-closed {
    background: rgba(100, 116, 139, 0.15);
    color: #64748b;
}

.badge-pending {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
}

.badge-approved {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.badge-rejected {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.badge-seller {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
}

.badge-support {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
}

.badge-moderator {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

.badge-admin {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Messages */
.message {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 14px;
}

.message-info {
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid #60a5fa;
    color: #93c5fd;
}

.message-success {
    background: rgba(34, 197, 94, 0.1);
    border-left: 3px solid #22c55e;
    color: #86efac;
}

.message-error {
    background: rgba(239, 68, 68, 0.1);
    border-left: 3px solid #ef4444;
    color: #fca5a5;
}

/* Profile section */
.profile-section {
    max-width: 500px;
}

.profile-section .info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(96, 165, 250, 0.1);
    font-size: 14px;
}

.profile-section .info-row:last-child {
    border-bottom: none;
}

.profile-section .info-label {
    color: #94a3b8;
}

.profile-section .info-value {
    color: #e2e8f0;
    font-weight: 500;
}

/* Ticket messages */
.ticket-messages {
    margin-top: 24px;
}

.ticket-message {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.ticket-message.support {
    flex-direction: row-reverse;
}

.ticket-message .msg-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
}

.ticket-message.support .msg-avatar {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.ticket-message .msg-body {
    flex: 1;
    max-width: 70%;
}

.ticket-message .msg-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.ticket-message .msg-author {
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
}

.ticket-message .msg-time {
    font-size: 12px;
    color: #64748b;
}

.ticket-message .msg-text {
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(12, 18, 40, 0.85);
    border: 1px solid rgba(96, 165, 250, 0.1);
    font-size: 14px;
    line-height: 1.6;
}

.ticket-message.support .msg-text {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.2);
}

/* Filters */
.filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.filters select {
    padding: 8px 12px;
    background: rgba(12, 18, 40, 0.85);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 13px;
    outline: none;
    cursor: pointer;
    font-family: inherit;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: rgba(12, 18, 40, 0.95);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 16px;
    padding: 32px;
    width: 90%;
    max-width: 500px;
    backdrop-filter: blur(20px);
}

.modal h2 {
    font-size: 22px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal p {
    color: #94a3b8;
    margin-bottom: 24px;
    font-size: 14px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: #e2e8f0;
    border-radius: 2px;
    transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Responsive */
@media (max-width: 768px) {
    .auth-container {
        flex-direction: column-reverse;
    }

    .auth-right {
        padding: 60px 40px;
        min-height: 200px;
    }

    .auth-left {
        padding: 40px 20px;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    .hamburger {
        display: flex;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        margin-bottom: 20px;
    }

    .ticket-message .msg-body {
        max-width: 85%;
    }

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

@media (max-width: 480px) {
    .auth-right {
        padding: 40px 20px;
        min-height: 150px;
    }

    .auth-right .logo {
        font-size: 32px;
    }

    .main-content {
        padding: 16px;
    }

    .card {
        padding: 16px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-card .stat-value {
        font-size: 24px;
    }
}
