:root {
    --bg-dark: #05080f;
    --sidebar-bg: #0b0e14;
    --card-bg: #111827;
    --border-color: #1f2937;
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --accent-blue: #3b82f6;
    --accent-blue-hover: #2563eb;
    --sidebar-width: 260px;
    --green-accent: #10b981;
    --red-accent: #ef4444;
    --yellow-accent: #f59e0b;
    --header-height: 70px;
    --transition-speed: 0.3s;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
}

/* Sidebar */
#sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 1050;
    transition: transform var(--transition-speed);
}

.sidebar-brand-area {
    padding: 30px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    display: block;
    opacity: 0.6;
}

.logo-box {
    background: #fff;
    padding: 8px 15px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.logo-text {
    color: #000;
    font-weight: 800;
    font-size: 1.3rem;
    font-style: italic;
    letter-spacing: -0.5px;
}

.logo-text span {
    color: #e11d48;
}

#sidebar ul.nav-links {
    list-style: none;
    padding: 25px 15px;
    margin: 0;
    flex-grow: 1;
}

#sidebar ul li {
    margin-bottom: 8px;
}

#sidebar ul li a {
    padding: 12px 18px;
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.2s ease;
}

#sidebar ul li a i {
    width: 28px;
    font-size: 1.1rem;
    margin-right: 12px;
    transition: transform 0.2s ease;
}

#sidebar ul li a:hover {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
}

#sidebar ul li a:hover i {
    transform: translateX(3px);
}

#sidebar ul li.active a {
    background-color: var(--accent-blue);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Header/Topnav */
header.top-nav {
    height: var(--header-height);
    background-color: rgba(5, 8, 15, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    margin-left: var(--sidebar-width);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.search-box {
    position: relative;
    max-width: 400px;
    width: 100%;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-box input {
    width: 100%;
    background-color: #1f2937;
    border: 1px solid var(--border-color);
    padding: 10px 15px 10px 45px;
    border-radius: 10px;
    color: white;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.nav-user-area {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Main Content */
#main-content {
    margin-left: var(--sidebar-width);
    padding: 40px;
    min-height: calc(100vh - var(--header-height));
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    margin-bottom: 25px;
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 20px 25px;
}

.card-body {
    padding: 25px;
}

/* Stats */
.stat-card {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.stat-icon.blue { background-color: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.stat-icon.grey { background-color: rgba(156, 163, 175, 0.15); color: var(--text-secondary); }
.stat-icon.green { background-color: rgba(16, 185, 129, 0.15); color: var(--green-accent); }

/* Table */
.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 15px 25px;
}

.table tbody td {
    border-bottom: 1px solid var(--border-color);
    padding: 18px 25px;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.01);
}

/* Badges */
.badge-status-pending { background-color: rgba(245, 158, 11, 0.15); color: var(--yellow-accent); }
.badge-status-resolved { background-color: rgba(16, 185, 129, 0.15); color: var(--green-accent); }
.badge-status-closed { background-color: rgba(156, 163, 175, 0.15); color: var(--text-secondary); }

/* Buttons */
.btn-primary {
    background-color: var(--accent-blue);
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary:hover {
    background-color: var(--accent-blue-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-outline-info {
    border: 1px solid var(--accent-blue);
    color: var(--accent-blue);
    border-radius: 8px;
    font-weight: 600;
}

/* Forms */
.form-control, .form-select {
    background-color: #1f2937;
    border: 1px solid var(--border-color);
    color: white;
    border-radius: 10px;
    padding: 12px 15px;
}

.form-control:focus, .form-select:focus {
    background-color: #1f2937;
    border-color: var(--accent-blue);
    color: white;
    box-shadow: none;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#main-content > * {
    animation: fadeIn 0.5s ease-out forwards;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
}

/* Mobile Toggle */
.sidebar-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
}

@media (max-width: 992px) {
    #sidebar {
        transform: translateX(-100%);
    }
    #sidebar.active {
        transform: translateX(0);
    }
    #main-content, header.top-nav {
        margin-left: 0;
    }
    .sidebar-toggle {
        display: block;
    }
    header.top-nav {
        padding: 0 20px;
    }
}
