*, *::before, *::after { 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; }

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

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

/* Page header */
.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, #818cf8, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.page-header p { color: #94a3b8; font-size: 15px; }

/* Buttons */
.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;
}
.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 8px;
}

/* Form inputs (shared between auth and dashboard) */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 500; color: #cbd5e1; margin-bottom: 6px; }
.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; }

/* Basic card container (shared) */
.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);
}

/* 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;
}
table tbody tr.row-closed { opacity: 0.6; }
table tbody tr.row-closed:hover { opacity: 0.85; }

/* Tab navigation */
.tab-nav {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: rgba(12, 18, 40, 0.5);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid rgba(96, 165, 250, 0.1);
    width: fit-content;
}
.tab-btn {
    padding: 8px 20px;
    border: none;
    background: transparent;
    color: #94a3b8;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.2s;
}
.tab-btn:hover { color: #e2e8f0; }
.tab-btn.active {
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
}

/* Role tag */
.role-tag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-left: 6px;
    vertical-align: middle;
}
.role-tag.role-support { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.role-tag.role-moderator { background: rgba(250, 204, 21, 0.15); color: #eab308; }
.role-tag.role-admin { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

/* 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;
}

/* 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;
}
.filters select option { background: #0c0c28; }

/* 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;
}
.modal-content {
    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: 560px;
    backdrop-filter: blur(20px);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #64748b;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}
.modal-close:hover {
    color: #e2e8f0;
    background: rgba(148, 163, 184, 0.1);
}
.modal-title {
    font-size: 22px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding-right: 40px;
}

/* Loading spinner */
.loading-spinner { display: flex; align-items: center; justify-content: center; padding: 60px; }
.loading-spinner::after {
    content: '';
    width: 32px;
    height: 32px;
    border: 3px solid rgba(96,165,250,0.1);
    border-top: 3px solid #60a5fa;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 768px) {
    .dashboard { flex-direction: column; }
    .main-content { margin-left: 0; padding: 20px; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .modal-content { min-width: unset; width: 90%; }
}
@media (max-width: 480px) {
    .main-content { padding: 16px; }
}
