/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    background: #F8FAFC;
    position: relative;
    overflow-x: hidden;
    width: 100%;
}

.dashboard-sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid #E2E8F0;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1000;
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.02);
}

.dashboard-main {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: calc(100% - 260px);
}

.dashboard-content {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
    background: #F8FAFC;
}

/* Sidebar */
.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #E2E8F0;
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.sidebar-header .logo-image {
    width: 120px;
    height: 90px;
    object-fit: contain;
}

.sidebar-user {
    padding: 20px;
    border-bottom: 1px solid #E2E8F0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    background: #2563EB;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 15px;
    font-weight: 600;
    color: #1E293B;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 12px;
    color: #64748B;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-nav {
    flex: 1;
    padding: 15px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #64748B;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    border-left: 3px solid transparent;
    font-size: 14px;
}

.nav-item:hover {
    background: #F8FAFC;
    color: #2563EB;
    border-left-color: #2563EB;
}

.nav-item.active {
    background: #EFF6FF;
    color: #2563EB;
    border-left-color: #2563EB;
    font-weight: 500;
}

.nav-item i {
    width: 20px;
    font-size: 16px;
}

.nav-item span {
    flex: 1;
}

.nav-item .badge {
    background: #F59E0B;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 20px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 15px 0;
    border-top: 1px solid #E2E8F0;
}

.logout-btn {
    color: #EF4444 !important;
    width: 100%;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: 14px;
}

.logout-btn:hover {
    background: #FEF2F2 !important;
    color: #DC2626 !important;
}

/* Dashboard Header */
.dashboard-header {
    background: white;
    padding: 15px 25px;
    border-bottom: 1px solid #E2E8F0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 99;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: #1E293B;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
}

.sidebar-toggle:hover {
    background: #F1F5F9;
}

.page-title {
    font-size: 20px;
    color: #1E293B;
    font-weight: 600;
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-icon {
    background: none;
    border: none;
    font-size: 18px;
    color: #64748B;
    cursor: pointer;
    padding: 8px;
    position: relative;
    border-radius: 8px;
}

.header-icon:hover {
    background: #F1F5F9;
    color: #2563EB;
}

.header-icon .badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #EF4444;
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 20px;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-dropdown {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid #E2E8F0;
    border-radius: 30px;
    padding: 6px 12px 6px 6px;
    cursor: pointer;
    color: #1E293B;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.user-menu-btn:hover {
    background: #F8FAFC;
    border-color: #2563EB;
}

.avatar-small {
    width: 32px;
    height: 32px;
    background: #2563EB;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    overflow: hidden;
    flex-shrink: 0;
}

.avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    min-width: 200px;
    display: none;
    z-index: 1000;
}

.dropdown-menu.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #1E293B;
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.dropdown-item:hover {
    background: #F8FAFC;
}

.dropdown-item i {
    width: 16px;
    color: #64748B;
    font-size: 14px;
}

.dropdown-divider {
    height: 1px;
    background: #E2E8F0;
    margin: 8px 0;
}

/* Dashboard Content */
.welcome-banner {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    color: white;
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.welcome-content h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: white;
}

.welcome-content p {
    color: rgba(255,255,255,0.9);
    margin: 0;
    font-size: 15px;
}

.welcome-actions {
    display: flex;
    gap: 12px;
}

.btn-outline-light {
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-outline-light:hover {
    background: white;
    color: #2563EB;
    transform: translateY(-2px);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    border: 1px solid #E2E8F0;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(37,99,235,0.1);
    border-color: #2563EB;
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: #EFF6FF;
    color: #2563EB;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-info {
    flex: 1;
    min-width: 0;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #1E293B;
    margin-bottom: 4px;
    line-height: 1.2;
}

.stat-label {
    color: #64748B;
    font-size: 13px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Stats Breakdown */
.stats-breakdown {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid #E2E8F0;
}

.breakdown-title {
    font-size: 16px;
    font-weight: 600;
    color: #1E293B;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.breakdown-title i {
    color: #2563EB;
}

.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.breakdown-item {
    text-align: center;
    padding: 12px;
    background: #F8FAFC;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.breakdown-item:hover {
    background: #EFF6FF;
    transform: translateY(-2px);
}

.breakdown-value {
    font-size: 22px;
    font-weight: 700;
    color: #2563EB;
    margin-bottom: 4px;
}

.breakdown-label {
    color: #64748B;
    font-size: 12px;
}

/* Quick Actions Grid */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.quick-action-card {
    background: white;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: #1E293B;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.quick-action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(37,99,235,0.1);
    border-color: #2563EB;
}

.quick-action-card i {
    font-size: 28px;
    color: #2563EB;
    margin-bottom: 12px;
    background: #EFF6FF;
    width: 60px;
    height: 60px;
    line-height: 60px;
    border-radius: 30px;
    display: inline-block;
    transition: all 0.3s ease;
}

.quick-action-card:hover i {
    background: #2563EB;
    color: white;
    transform: scale(1.05);
}

.quick-action-card h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1E293B;
}

.quick-action-card p {
    color: #64748B;
    font-size: 12px;
    margin: 0;
}

/* Recent Section */
.recent-section {
    background: white;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #E2E8F0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1E293B;
    margin: 0;
}

.view-all-link {
    color: #2563EB;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.view-all-link:hover {
    gap: 8px;
}

.recent-list {
    display: flex;
    flex-direction: column;
}

.recent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #F1F5F9;
    transition: background 0.2s ease;
    flex-wrap: wrap;
    gap: 15px;
}

.recent-item:last-child {
    border-bottom: none;
}

.recent-item:hover {
    background: #F8FAFC;
}

.item-info {
    flex: 1;
    min-width: 250px;
}

.item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.item-title {
    font-size: 15px;
    font-weight: 600;
    color: #1E293B;
    margin: 0;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.urgent-badge {
    background: #FEF3C7;
    color: #D97706;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.item-meta {
    display: flex;
    gap: 15px;
    color: #64748B;
    font-size: 12px;
    flex-wrap: wrap;
}

.item-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.item-meta i {
    color: #2563EB;
    font-size: 12px;
}

.item-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 35px;
    height: 35px;
    background: #F1F5F9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748B;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: #2563EB;
    color: white;
    transform: translateY(-2px);
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    background: #F8FAFC;
    border-radius: 16px;
    border: 2px dashed #E2E8F0;
}

.empty-icon {
    width: 80px;
    height: 80px;
    background: #EFF6FF;
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    color: #2563EB;
}

.empty-state h3 {
    font-size: 18px;
    color: #1E293B;
    margin-bottom: 8px;
}

.empty-state p {
    color: #64748B;
    margin-bottom: 20px;
    font-size: 14px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.error-state {
    text-align: center;
    padding: 40px 20px;
    color: #EF4444;
}

.error-state i {
    font-size: 40px;
    margin-bottom: 15px;
}

.error-state p {
    margin-bottom: 20px;
    color: #64748B;
}

/* Notifications Panel */
.notifications-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 25px rgba(0,0,0,0.1);
    z-index: 1001;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.notifications-panel.active {
    right: 0;
}

.notifications-header {
    padding: 20px;
    border-bottom: 1px solid #E2E8F0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #2563EB;
    color: white;
}

.notifications-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.close-notifications {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-notifications:hover {
    background: rgba(255,255,255,0.3);
}

.notifications-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 10px;
    background: #F8FAFC;
    transition: all 0.2s ease;
}

.notification-item.unread {
    background: #EFF6FF;
    border-left: 3px solid #2563EB;
}

.notification-icon {
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563EB;
    font-size: 14px;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-content p {
    color: #1E293B;
    font-size: 13px;
    margin-bottom: 4px;
    line-height: 1.5;
}

.notification-time {
    color: #64748B;
    font-size: 11px;
}

.empty-notifications {
    text-align: center;
    padding: 40px 20px;
    color: #64748B;
}

.empty-notifications i {
    font-size: 40px;
    margin-bottom: 15px;
    color: #CBD5E1;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #1E293B;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-label i {
    color: #2563EB;
    width: 16px;
}

.form-label .required {
    color: #EF4444;
    margin-left: 4px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #E2E8F0;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-hint {
    font-size: 12px;
    color: #64748B;
    margin-top: 6px;
}

.form-error {
    color: #EF4444;
    font-size: 12px;
    margin-top: 6px;
    display: none;
}

.form-error.show {
    display: block;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Loading States */
.loading-spinner {
    text-align: center;
    padding: 40px;
    color: #2563EB;
}

.loading-spinner i {
    font-size: 40px;
    margin-bottom: 15px;
}

.loading-spinner p {
    color: #64748B;
    font-size: 14px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
    .stats-grid,
    .quick-actions-grid,
    .breakdown-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .dashboard-sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .dashboard-sidebar.active {
        transform: translateX(0);
    }
    
    .dashboard-main {
        margin-left: 0;
        width: 100%;
    }
    
    .sidebar-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    .dashboard-content {
        padding: 15px;
    }
    
    .dashboard-header {
        padding: 12px 15px;
    }
    
    .page-title {
        font-size: 18px;
    }
    
    .welcome-banner {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .welcome-content h2 {
        font-size: 20px;
    }
    
    .welcome-content p {
        font-size: 14px;
    }
    
    .welcome-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .welcome-actions .btn,
    .welcome-actions .btn-outline-light {
        width: 100%;
        justify-content: center;
    }
    
    .stats-grid,
    .quick-actions-grid,
    .breakdown-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .quick-action-card {
        padding: 15px;
    }
    
    .quick-action-card i {
        width: 50px;
        height: 50px;
        line-height: 50px;
        font-size: 22px;
    }
    
    .recent-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .item-info {
        width: 100%;
    }
    
    .item-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .header-right .btn-primary .btn-text {
        display: none;
    }
    
    .header-right .btn-primary i {
        margin: 0;
    }
    
    .notifications-panel {
        width: 100%;
        right: -100%;
    }
}

@media (max-width: 480px) {
    .dashboard-content {
        padding: 12px;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .item-meta {
        gap: 10px;
        font-size: 11px;
        flex-direction: column;
    }
    
    .dropdown-menu {
        min-width: 180px;
    }
    
    .user-menu-btn span {
        display: none;
    }
    
    .user-menu-btn {
        padding: 6px;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #F1F5F9;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}