/* Base Admin Template Styles */
.admin-container {
    display: flex;
    min-height: 100vh;
    background-color: #f8fafc;
}

/* Remove shadows from specific elements only */
.card, .bg-white, .bg-blue-50, .bg-green-50, .bg-yellow-50, .bg-red-50 {
    box-shadow: none !important;
}

.shadow-sm, .shadow, .shadow-md, .shadow-lg, .shadow-xl, .shadow-2xl {
    box-shadow: none !important;
}

/* Sidebar Styles */
.sidebar {
    width: 250px; /* Increased from 200px */
    background: linear-gradient(180deg, #064e3b 0%, #065f46 50%, #047857 100%);
    color: #ffffff;
    transition: all 0.3s ease;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar-header {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.sidebar-logo img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.sidebar-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Navigation Styles */
.sidebar-nav {
    padding: 1rem 0;
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.7);
    padding: 0 1rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.nav-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    position: relative;
    margin: 0.25rem 0.5rem;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    border-left: 4px solid #ffffff;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.nav-item i {
    width: 20px;
    margin-right: 0.75rem;
    text-align: center;
    font-size: 1.1rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.nav-item-text {
    transition: opacity 0.3s;
}

.sidebar.collapsed .nav-item-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .nav-item {
    padding: 0.75rem;
    text-align: center;
}

.sidebar.collapsed .nav-item i {
    margin-right: 0;
}

/* Submenu Styles */
.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(5px);
    opacity: 0;
    border-radius: 0.5rem;
    margin: 0.25rem 0.5rem 0.5rem 0.5rem;
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.1);
    padding: 0;
    visibility: hidden;
}

.submenu.open {
    max-height: 1000px;
    opacity: 1;
    padding: 0.5rem 0;
    margin-top: 0.25rem;
    visibility: visible;
}

.submenu-item {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.75rem 0.6rem 2.5rem;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    margin: 0.15rem 0.5rem;
    border-radius: 0.375rem;
    position: relative;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    font-weight: 500;
}

/* Visual indicator untuk nested submenu - garis vertikal */
.submenu-item::before {
    content: '';
    position: absolute;
    left: 1.25rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1px;
}

.submenu-item:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-left-color: rgba(255, 255, 255, 0.7);
    transform: translateX(3px);
}

.submenu-item.active {
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    border-left-color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(255, 255, 255, 0.25);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.submenu-item i {
    width: 16px;
    margin-right: 0.5rem;
    text-align: center;
    font-size: 0.875rem;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

.sidebar.collapsed .submenu {
    display: none;
}

/* Submenu Toggle Button */
.submenu-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.submenu-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 0.5rem;
    transform: translateX(3px);
}

.submenu-toggle.active {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
}

.submenu-toggle .submenu-icon {
    transition: transform 0.3s ease;
    font-size: 0.75rem;
}

.submenu-toggle[aria-expanded="true"] .submenu-icon {
    transform: rotate(180deg);
}

/* Active submenu parent */
.nav-item.active {
    background-color: rgba(4, 120, 87, 0.3);
    color: #ffffff;
    border-right: 3px solid #10b981;
}

.nav-item.active .submenu-icon {
    color: #ffffff;
}

/* Fix double active state - only child should be active when parent is active */
.nav-item.active + .submenu .submenu-item.active {
    background-color: rgba(4, 120, 87, 0.25);
    color: #ffffff;
    border-left-color: #10b981;
}

/* Submenu Group Styling */
.submenu-group {
    margin-bottom: 1rem;
}

.submenu-group:last-child {
    margin-bottom: 0;
}

.submenu-group-title {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 0.375rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.user-profile {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.user-avatar {
    margin-right: 0.75rem;
    color: #10b981;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    color: white;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.user-role {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.datetime-info {
    text-align: center;
    padding: 0.5rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
}

.current-time {
    font-size: 1.1rem;
    font-weight: 600;
    color: #10b981;
    margin-bottom: 0.25rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.current-date {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 250px; /* Updated to match new sidebar width */
    transition: margin-left 0.3s ease;
    min-height: 100vh;
}

.sidebar.collapsed + .main-content {
    margin-left: 70px;
}

/* Top Header */
.top-header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: none;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
}

.mobile-menu-btn:hover {
    background-color: #f1f5f9;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.875rem;
}

.breadcrumb a {
    color: #047857;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* User menu styles removed */

/* Content Area */
.content {
    padding: 2rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 250px; /* Updated to match new sidebar width */
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .content {
        padding: 1rem;
    }
    
    .top-header {
        padding: 1rem;
    }
    
    .breadcrumb {
        display: none;
    }
    
    .nav-item {
        padding: 0.5rem 0.75rem;
    }
    
    .submenu-item {
        padding: 0.4rem 0.75rem 0.4rem 2.5rem;
    }
    
    .sidebar-footer {
        padding: 0.75rem;
    }
    
    .user-profile {
        padding: 0.5rem;
    }
    
    .datetime-info {
        padding: 0.4rem;
    }
}

@media (max-width: 640px) {
    .content {
        padding: 0.75rem;
    }
    
    .top-header {
        padding: 0.75rem;
    }
}

/* Overlay for mobile */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.sidebar-overlay.show {
    display: block;
}

/* Utility Classes */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Status Indicators */
.status-online {
    color: #10b981;
}

.status-offline {
    color: #ef4444;
}

.status-busy {
    color: #f59e0b;
}
