:root {
    /* Light Mode Colors */
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #7209b7;
    --success: #4cc9f0;
    --danger: #f72585;
    --warning: #f8961e;
    --info: #4895ef;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --text-color: #333333;
    --border-color: #e0e0e0;
    --sidebar-bg: linear-gradient(135deg,
            var(--primary) 0%,
            var(--secondary) 100%);
    --header-bg: #ffffff;
    --table-header-bg: #f8f9fa;
    --table-hover: rgba(67, 97, 238, 0.03);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.1);

    /* Layout */
    --sidebar-width: 250px;
    --header-height: 70px;
}

[data-theme="dark"] {
    /* Dark Mode Colors */
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --border-color: #333333;
    --sidebar-bg: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    --header-bg: #1e1e1e;
    --table-header-bg: #2d3748;
    --table-hover: rgba(255, 255, 255, 0.05);
    --light: #2d3748;
    --light-gray: #4a5568;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease,
        border-color 0.3s ease;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
}

/* Logo Styles */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.logo-image {
    height: 56px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background: var(--dark);
    color: white;
    height: 100vh;
    position: fixed;
    overflow-y: auto;
    transition: all 0.3s;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
}

.sidebar-logo .logo-text {
    background: none;
    -webkit-text-fill-color: white;
    color: white;
    font-size: 1.4rem;
}

.sidebar-logo .logo-image {
    height: 35px;
    filter: brightness(0) invert(1);
}

.sidebar-menu {
    padding: 20px 0;
}

.menu-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.menu-item:hover,
.menu-item.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: var(--success);
}

.menu-item i {
    width: 20px;
    text-align: center;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: all 0.3s;
}

.header {
    height: var(--header-height);
    background-color: var(--header-bg);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-left h1 {
    font-size: 1.8rem;
    color: var(--text-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.content {
    padding: 30px;
}

/* Stats Cards */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-info h3 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    color: var(--text-color);
}

.stat-info p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Main Card */
.card {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.card-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 1.5rem;
    color: var(--text-color);
}

.card-body {
    padding: 30px;
}

/* Search & Actions */
.search-container {
    display: flex;
    margin-bottom: 20px;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    background-color: var(--card-bg);
    color: var(--text-color);
}

.search-input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-warning {
    background-color: var(--warning);
    color: white;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 14px;
}

th {
    background-color: var(--table-header-bg);
    font-weight: 500;
    font-size: 14px;
}

tr:hover {
    background-color: var(--table-hover);
}

.action-buttons {
    display: flex;
    gap: 5px;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 0.70rem;
}

/* Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.status-pending {
    background-color: rgba(248, 150, 30, 0.1);
    color: var(--warning);
}

.status-in-progress {
    background-color: rgba(76, 201, 240, 0.1);
    color: var(--success);
}

.status-completed {
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary);
}

.status-cancelled {
    background-color: rgba(247, 37, 133, 0.1);
    color: var(--danger);
}

.status-waiting-factory-delivery {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ff9800;
}

.status-sent-to-factory {
    background-color: rgba(33, 150, 243, 0.1);
    color: #2196f3;
}

.status-factory-received {
    background-color: rgba(76, 175, 80, 0.1);
    color: #4caf50;
}

.status-repaired {
    background-color: rgba(139, 195, 74, 0.1);
    color: #8bc34a;
}

.status-waiting-factory-return {
    background-color: rgba(255, 152, 0, 0.1);
    color: #ff5722;
}

.status-received-from-factory {
    background-color: rgba(103, 58, 183, 0.1);
    color: #673ab7;
}

.status-sent-to-customer {
    background-color: rgba(0, 150, 136, 0.1);
    color: #009688;
}

/* No Data Message */
.no-data {
    text-align: center;
    padding: 40px;
    color: var(--gray);
}

.no-data i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--light-gray);
}

/* Mobile Menu Button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .stats-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0 15px;
    }

    .content {
        padding: 15px;
    }

    .card-body {
        padding: 20px;
    }

    .stats-container {
        grid-template-columns: 1fr;
    }

    .search-container {
        flex-direction: column;
    }

    th,
    td {
        padding: 10px;
        
    }

    .action-buttons {
        flex-direction: column;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .logo-image {
        height: 35px;
    }
}

@media (max-width: 576px) {
    .header-left h1 {
        font-size: 1.4rem;
    }

    .card-header {
        padding: 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    table {
        font-size: 0.9rem;
    }

    th:nth-child(4),
    td:nth-child(4),
    th:nth-child(5),
    td:nth-child(5),
    th:nth-child(9),
    td:nth-child(9) {
        display: none;
    }

    .logo-text {
        display: none;
    }
}

/* Overlay for mobile menu */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.overlay.active {
    display: block;
}

/* Form Styles */
.form-container {
    max-width: 800px;
    margin: 0 auto;
}

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

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

input,
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    background-color: var(--card-bg);
    color: var(--text-color);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.form-col {
    flex: 1;
    padding: 0 10px;
    min-width: 200px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 30px;
}

/* Alert Messages */
.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: rgba(76, 201, 240, 0.1);
    color: var(--success);
    border: 1px solid rgba(76, 201, 240, 0.2);
}

.alert-danger {
    background-color: rgba(247, 37, 133, 0.1);
    color: var(--danger);
    border: 1px solid rgba(247, 37, 133, 0.2);
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color 0.3s;
}

.theme-toggle:hover {
    background-color: var(--light-gray);
}

.theme-toggle .fa-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .fa-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .fa-sun {
    display: inline-block;
}


