:root {
    --primary: #667eea;
    --primary-dark: #5a6fd8;
    --secondary: #764ba2;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --dark: #1f2937;
    --light: #f8fafc;
    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;
    --top-nav-height: 70px;
}

/* Base Styles */
.admin-body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fb;
    color: #374151 !important;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.gradient-bg {
    background: #8883e6;
    background: radial-gradient(circle, rgba(136, 131, 230, 0.46) 0%, rgba(148, 187, 233, 0.52) 100%);
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.sidebar-logo i {
    font-size: 2rem;
}

.logo-text {
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .logo-text {
    opacity: 0;
    width: 0;
}

.sidebar-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    border-radius: 8px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar-nav {
    list-style: none;
    padding: 1rem 0;
    margin: 0;
}

.nav-item {
    margin: 0.25rem 0.75rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(5px);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-link i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

.badge-notification {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

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

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
}

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

.sidebar.collapsed .user-details,
.sidebar.collapsed .logout-btn span {
    opacity: 0;
    width: 0;
    height: 0;
    overflow: hidden;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Main Content */
.main-content {
    min-height: 100vh;
    transition: all 0.3s ease;
}

.main-content.with-sidebar {
    margin-left: var(--sidebar-width);
}

.sidebar.collapsed ~ .main-content.with-sidebar {
    margin-left: var(--sidebar-collapsed);
}

/* Top Navigation */
.top-nav {
    height: var(--top-nav-height);
    background: white;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.nav-left .page-title {
    margin: 0;
    font-weight: 600;
    color: var(--dark);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-refresh {
    border-radius: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Content Wrapper */
.content-wrapper {
    padding: 2rem;
}

/* Cards */
.admin-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Card Headers */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-color: white;
}

.card-title {
    margin: 0;
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
}

.menu-btn {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.menu-btn .btn {
    background: #F0F0FF;
    border: 2px solid #f1f5f9;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: #374151;
    text-decoration: none;
    text-align: left;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.menu-btn .btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.menu-btn .btn:active {
    transform: translateY(0);
}

/* Icon animation on hover */
.menu-btn .btn i {
    transition: all 0.3s ease;
}

.menu-btn .btn:hover i {
    transform: scale(1.2);
    color: white;
}

.menu-btn .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.menu-btn .btn:hover::before {
    left: 100%;
}

/* Alternative color variations */
.menu-btn .btn.btn-success:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.menu-btn .btn.btn-warning:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: #f59e0b;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
}

.menu-btn .btn.btn-info:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-color: #3b82f6;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}
.card-body {
    padding: 1.5rem;
}

/* Dashboard Styles */
.flex-container {
    display: flex;
    justify-content: center;
}

.dashboard {
    width: 95%;
}
/* Stat Cards */
.stat-card {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    border-left: 4px solid var(--primary);
}

.stat-card.bg-success { border-left-color: var(--success); }
.stat-card.bg-warning { border-left-color: var(--warning); }
.stat-card.bg-info { border-left-color: var(--info); }

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

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: var(--dark);
}

.stat-label {
    color: #6b7280;
    margin: 0;
    font-size: 0.9rem;
}

.stat-trend {
    text-align: right;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Tables */
.table {
    margin: 0;
}

.table th {
    border-bottom: 2px solid #e5e7eb;
    font-weight: 600;
    color: #374151;
    padding: 1rem 0.75rem;
    background: #f8fafc;
}

.table td {
    padding: 1rem 0.75rem;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: #f8fafc;
}

/* User Avatar Small */
.user-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Equipment Info */
.equipment-info .fw-semibold {
    font-size: 0.9rem;
}

.equipment-info small {
    font-size: 0.8rem;
}

/* System Status */
.system-status {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-badge {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    background: #f1f5f9;
    color: #64748b;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Form Controls */
.form-control {
    border-radius: 10px;
    padding: 12px 20px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Alerts */
.floating-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    background-color: #f8f9fa; border-left: 4px solid #0d6efd; border-radius: 4px; color: #333; font-size: 14px;
    animation: slideInRight 0.5s ease;
}

.category-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.empty-state {
    padding: 2rem;
}

.table td {
    vertical-align: middle;
}

.required::after {
    content: " *";
    color: #ef4444;
}

.form-label {
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-text {
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.equipment-note {
    background-color: lemonchiffon;
    border-radius: 8px;
    padding: 0.7em;
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #ef4444;
}

.was-validated .form-control:invalid ~ .invalid-feedback {
    display: block;
}

.was-validated .form-control:invalid {
    border-color: #ef4444;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23ef4444'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 3.6.4.4.4-.4'/%3e%3cpath d='M6 7v1'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:valid {
    border-color: #10b981;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2310b981' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.required::after {
    content: " *";
    color: #ef4444;
}

.form-label {
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-text {
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #ef4444;
}

.was-validated .form-control:invalid ~ .invalid-feedback {
    display: block;
}

.was-validated .form-control:invalid {
    border-color: #ef4444;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23ef4444'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 3.6.4.4.4-.4'/%3e%3cpath d='M6 7v1'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:valid {
    border-color: #10b981;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2310b981' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
}

.bg-light {
    background-color: #f8f9fa !important;
}

/* Animations */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
.rm_btn {
    color: #374151;
    background-color: #f4a3b2;
}

.edit_btn {
    color: #374151;
    background-color: #949ed3;
}

.container {
    margin: 0 auto;
}
/* Responsive */
@media (max-width: 768px) {
    .content-wrapper {
        padding: 1rem;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .stat-icon {
        margin-right: 0;
        margin-bottom: 0.75rem;
    }
    
    .stat-trend {
        text-align: center;
        margin-top: 0.5rem;
    }
    
    .top-nav {
        padding: 0 1rem;
    }
    
    .card-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}