:root {
    --primary-color: #f39c12;
    /* Orange accent */
    --primary-hover: #e67e22;
    --sidebar-bg: #2c3e50;
    /* Navy Blue */
    --sidebar-text: #ecf0f1;
    --bg-color: #f4f6f9;
    /* Light Gray Background */
    --card-bg: #ffffff;
    --text-color: #34495e;
    --text-muted: #7f8c8d;
    --border-color: #dfe6e9;
    --success-color: #27ae60;
    --danger-color: #c0392b;
    --warning-color: #f39c12;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    height: 100vh;
    overflow: hidden;
}

/* Login Screen */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: var(--sidebar-bg);
}

.login-box {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.logo-large {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--sidebar-bg);
    margin-bottom: 1.5rem;
}

.logo-icon-large {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 1.25rem;
}

.login-title {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    color: var(--text-color);
}

/* App Layout */
.app-container {
    display: flex;
    height: 100vh;
}

.hidden {
    display: none !important;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header {
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 700;
    font-size: 1.125rem;
    gap: 0.75rem;
}

.logo-icon {
    background: var(--primary-color);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.875rem;
}

.user-profile {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-info {
    font-size: 0.875rem;
}

.user-name {
    font-weight: 600;
}

.user-role {
    font-size: 0.75rem;
    opacity: 0.7;
}

.nav-links {
    padding: 1.5rem 0;
    flex: 1;
}

.nav-category {
    padding: 0 1.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.5;
    margin-bottom: 0.75rem;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-item.active {
    border-left-color: var(--primary-color);
}

.nav-icon {
    width: 18px;
    height: 18px;
    margin-right: 0.75rem;
}

/* Main Content */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.top-actions {
    display: flex;
    gap: 1rem;
}

.search-box {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.search-box input {
    padding: 0.5rem 1rem 0.5rem 2.25rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    width: 300px;
    font-size: 0.875rem;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    align-items: center;
}

.stat-item {
    flex: 1;
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--sidebar-bg);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-color);
}

/* Content Card (Table) */
.content-card {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    padding: 0 1rem;
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.table-responsive {
    overflow-x: auto;
}

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

th {
    background: #f8f9fa;
    padding: 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-block;
}

.status-available {
    background: #e8f8f5;
    color: #27ae60;
}

.status-assigned {
    background: #eaf2f8;
    color: #3498db;
}

.status-maintenance {
    background: #fef9e7;
    color: #f39c12;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    transition: all 0.2s;
}

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

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

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

.btn-outline:hover {
    background: #f8f9fa;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-icon {
    width: 16px;
    height: 16px;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.875rem;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.error-msg {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: none;
}

/* Submenu */
.submenu {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem 0;
}

.submenu-item {
    display: block;
    padding: 0.5rem 1.5rem 0.5rem 3.5rem;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.submenu-item:hover {
    color: white;
}

/* Groups Grid */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.group-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border-color);
}

.group-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.group-icon {
    width: 40px;
    height: 40px;
    background: #eaf2f8;
    color: var(--sidebar-bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.group-name {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.group-count {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 1000;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background: white;
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-md);
}

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

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    border-radius: 0 0 8px 8px;
}