@import 'variables.css';

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-dark);
    display: flex;
    min-height: 100vh;
}

/* Layout */
.wrapper {
    display: flex;
    width: 100%;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    border-right: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    z-index: 100;
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
    background: #ffffff;
    color: var(--text-dark);
}

.sidebar-brand {
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 10px;
    text-align: center;
}

.nav-links {
    list-style: none;
}

.nav-links li a {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition-fast);
    font-weight: 500;
}

.nav-links li a:hover,
.nav-links li a.active {
    background-color: var(--primary-light);
    color: var(--text-light);
}

.nav-links li a i {
    margin-right: 10px;
    width: 25px;
    text-align: center;
    font-size: 1.1rem;
}

/* Submenu Styling */
.has-submenu {
    position: relative;
}

.submenu {
    list-style: none;
    background: #f1f3f4;
    display: none !important;
    /* Hide by default */
    padding: 0;
}

.has-submenu:hover .submenu,
.has-submenu.open .submenu {
    display: block !important;
    /* Show on hover or if parent has .open class */
}

.submenu li a {
    padding: 0.6rem 1.5rem 0.6rem 3.2rem !important;
    font-size: 0.9rem;
    background: transparent !important;
    color: var(--text-dark) !important;
}

.submenu li a:hover,
.submenu li a.active-sub {
    color: var(--primary-color) !important;
    font-weight: 600;
}

.submenu-arrow {
    margin-left: auto;
    font-size: 0.7rem !important;
    transition: transform 0.3s;
}

.has-submenu:hover .submenu-arrow,
.has-submenu.open .submenu-arrow {
    transform: rotate(180deg);
}

/* Icon Colors */
.fa-gauge {
    color: #5c6bc0;
}

/* Indigo */
.fa-ring {
    color: #e91e63;
}

/* Pink */
.fa-users {
    color: #ef6c00;
}

/* Orange */
.fa-user-tie {
    color: #2e7d32;
}

/* Green */
.fa-truck {
    color: #00838f;
}

/* Cyan */
.fa-chart-line {
    color: #c62828;
}

/* Red */
.fa-file-invoice-dollar {
    color: #f9a825;
}

/* Yellow/Gold */

/* Top Header */
.top-header {
    height: var(--header-height);
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    box-shadow: var(--shadow-sm);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background-color: var(--primary-light);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Content Area */
.content-wrapper {
    padding: 2rem;
}

.card {
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition-fast);
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-light);
}

.btn-secondary {
    background-color: #f0f0f0;
    color: #333;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Login Page */
.login-body {
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.login-card {
    width: 400px;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 1rem;
}

.login-header h2 {
    color: var(--primary-color);
}