:root {
    --bg-primary: #f4f6f9;
    --sidebar-bg: #1e293b;
    --sidebar-hover: #334155;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --accent-color: #4f46e5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
aside {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: var(--white);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-brand {
    padding: 24px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--sidebar-hover);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-brand span {
    color: #38bdf8;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 24px;
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.sidebar-menu li a:hover, .sidebar-menu li.active a {
    background-color: var(--sidebar-hover);
    color: var(--white);
    border-left: 4px solid #38bdf8;
}

/* Main Workspace Panel */
main {
    margin-left: 260px;
    width: calc(100% - 260px);
    padding: 30px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.header-title h1 {
    font-size: 26px;
    font-weight: 700;
}

.header-title p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--white);
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
}

.user-profile img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info span {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

/* Analytics Matrix Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

.stat-card {
    background-color: var(--white);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.stat-details h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-details p {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    font-size: 20px;
}

/* Repair Jobs Data Window */
.data-table-container {
    background-color: var(--white);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.table-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.btn-new-ticket {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s;
}

.btn-new-ticket:hover {
    opacity: 0.9;
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 800px;
}

th {
    background-color: #f8fafc;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px 24px;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 16px 24px;
    font-size: 14px;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
}

tr:last-child td {
    border-bottom: none;
}

.device-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.device-badge i {
    color: var(--text-muted);
}

.status-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-pending { background-color: #fef3c7; color: #d97706; }
.status-progress { background-color: #e0f2fe; color: #0284c7; }
.status-completed { background-color: #dcfce7; color: #16a34a; }

.action-btn {
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-size: 12px;
    transition: all 0.2s;
}

.action-btn:hover {
    color: var(--white);
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

/* Responsiveness adjustments */
@media (max-width: 992px) {
    aside { width: 70px; }
    aside .sidebar-brand span, aside .sidebar-menu span { display: none; }
    main { margin-left: 70px; width: calc(100% - 70px); }
}
