/*
 * IPHOXY Dashboard Styles
 * Modern Customer & Admin Dashboard Design
 */

/* ============================================
   Dashboard Layout
   ============================================ */
.dashboard-wrapper {
    min-height: 100vh;
    background: #f0f2f5;
}

.dashboard-header-bar {
    background: #1a1a2e;
    color: #fff;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.dashboard-header-bar .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header-bar .logo img {
    height: 40px;
    width: auto;
}

.dashboard-header-bar .nav {
    display: flex;
    gap: 25px;
}

.dashboard-header-bar .nav a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.dashboard-header-bar .nav a:hover,
.dashboard-header-bar .nav a.active {
    color: #fff;
}

.dashboard-header-bar .user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

/* Dashboard Section */
.dashboard-section {
    padding: 40px 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

/* Sidebar */
.dashboard-sidebar {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: fit-content;
    position: sticky;
    top: 90px;
}

.user-card {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 20px;
}

.user-card .avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #E82028, #c41a21);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin: 0 auto 15px;
}

.user-card .user-name {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 5px;
}

.user-card .company {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 10px;
}

.user-card .status {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.user-card .status.approved {
    background: #d1fae5;
    color: #059669;
}

.user-card .status.pending {
    background: #fef3c7;
    color: #d97706;
}

.dashboard-sidebar .menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dashboard-sidebar .menu li {
    margin-bottom: 5px;
}

.dashboard-sidebar .menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 10px;
    color: #4b5563;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.dashboard-sidebar .menu a:hover {
    background: #f3f4f6;
    color: #1a1a2e;
}

.dashboard-sidebar .menu a.active {
    background: #fee2e2;
    color: #E82028;
}

.dashboard-sidebar .menu svg {
    width: 20px;
    height: 20px;
}

/* Main Content */
.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Welcome Banner */
.welcome-banner {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 16px;
    padding: 35px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.welcome-banner h1 {
    font-size: 26px;
    margin-bottom: 8px;
}

.welcome-banner p {
    opacity: 0.9;
    font-size: 15px;
}

/* Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.stat-card .stat-icon.red {
    background: #fee2e2;
    color: #E82028;
}

.stat-card .stat-icon.green {
    background: #d1fae5;
    color: #059669;
}

.stat-card .stat-icon.blue {
    background: #dbeafe;
    color: #2563eb;
}

.stat-card .stat-icon.yellow {
    background: #fef3c7;
    color: #d97706;
}

.stat-card .stat-label {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 5px;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 800;
    color: #1a1a2e;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.action-card {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
}

.action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.action-card .action-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.action-card .action-icon.red {
    background: linear-gradient(135deg, #E82028, #c41a21);
}

.action-card .action-icon.blue {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.action-card .action-icon.green {
    background: linear-gradient(135deg, #059669, #047857);
}

.action-card .action-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 5px;
}

.action-card .action-desc {
    font-size: 13px;
    color: #6b7280;
}

/* Card Component */
.card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.card-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}

.card-body {
    padding: 0;
}

/* Orders Table */
.orders-table {
    width: 100%;
    border-collapse: collapse;
}

.orders-table th {
    text-align: left;
    padding: 15px 25px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.orders-table td {
    padding: 15px 25px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    color: #374151;
}

.orders-table tr:last-child td {
    border-bottom: none;
}

.order-ref {
    font-weight: 600;
    color: #1a1a2e;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-pending {
    background: #fef3c7;
    color: #d97706;
}

.badge-submitted {
    background: #e0e7ff;
    color: #4f46e5;
}

.badge-processing {
    background: #dbeafe;
    color: #2563eb;
}

.badge-completed {
    background: #d1fae5;
    color: #059669;
}

.badge-default {
    background: #f3f4f6;
    color: #6b7280;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #6b7280;
}

.empty-state svg {
    margin-bottom: 15px;
    color: #d1d5db;
}

.empty-state h4 {
    font-size: 18px;
    color: #374151;
    margin-bottom: 8px;
}

.empty-state p {
    margin-bottom: 20px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-white {
    background: #fff;
    color: #1a1a2e;
}

.btn-white:hover {
    background: #f3f4f6;
}

.btn-primary {
    background: #E82028;
    color: #fff;
}

.btn-primary:hover {
    background: #c41a21;
}

.btn-outline {
    background: transparent;
    border: 2px solid #e5e7eb;
    color: #374151;
}

.btn-outline:hover {
    border-color: #E82028;
    color: #E82028;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: #fff;
    transition: all 0.3s;
}

/* ============================================
   Admin Dashboard Specific Styles
   ============================================ */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.admin-sidebar .sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-sidebar .sidebar-logo {
    width: 40px;
    height: 40px;
    background: #E82028;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
}

.admin-sidebar .sidebar-logo img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.admin-sidebar .sidebar-title {
    font-size: 16px;
    font-weight: 700;
}

.admin-sidebar .sidebar-subtitle {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
}

.admin-sidebar .sidebar-menu {
    padding: 15px 0;
}

.admin-sidebar .menu-section {
    padding: 10px 20px 5px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.4);
}

.admin-sidebar .menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.admin-sidebar .menu-item:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.admin-sidebar .menu-item.active {
    background: rgba(232, 32, 40, 0.2);
    color: #fff;
    border-left: 3px solid #E82028;
}

.admin-sidebar .menu-item svg {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.admin-sidebar .menu-item.active svg {
    opacity: 1;
}

.admin-sidebar .menu-badge {
    margin-left: auto;
    background: #E82028;
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

/* Admin Main Content */
.admin-main {
    flex: 1;
    margin-left: 260px;
}

.admin-header {
    background: #fff;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-header .header-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
}

.admin-content {
    padding: 30px;
}

/* Admin Stats Grid */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.admin-stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.admin-stat-card.highlight {
    background: linear-gradient(135deg, #E82028 0%, #c41a21 100%);
    color: #fff;
}

.admin-stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    background: #f3f4f6;
}

.admin-stat-card.highlight .stat-icon {
    background: rgba(255,255,255,0.2);
}

.admin-stat-card .stat-label {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 5px;
}

.admin-stat-card.highlight .stat-label {
    color: rgba(255,255,255,0.8);
}

.admin-stat-card .stat-value {
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
}

.admin-stat-card .stat-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    margin-top: 10px;
    padding: 4px 8px;
    border-radius: 20px;
    background: #d1fae5;
    color: #059669;
}

.admin-stat-card .stat-change.negative {
    background: #fee2e2;
    color: #dc2626;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

/* Quick Actions for Admin */
.admin-quick-actions {
    display: grid;
    gap: 10px;
}

.admin-quick-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    width: 100%;
    text-align: left;
    text-decoration: none;
    color: inherit;
}

.admin-quick-action:hover {
    background: #f3f4f6;
}

.admin-quick-action .quick-action-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #E82028;
    color: #fff;
}

.admin-quick-action .quick-action-title {
    font-weight: 600;
    font-size: 14px;
    color: #1a1a2e;
}

.admin-quick-action .quick-action-desc {
    font-size: 12px;
    color: #6b7280;
}

/* ============================================
   Mobile Responsive
   ============================================ */
@media (max-width: 1200px) {
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-sidebar {
        position: static;
    }
    
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
        z-index: 1000;
    }
    
    .admin-sidebar.active {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .dashboard-header-bar .nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    .dashboard-section {
        padding: 20px 0;
    }
    
    .welcome-banner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 25px;
    }
    
    .welcome-banner h1 {
        font-size: 22px;
    }
    
    .stats-cards {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-card .stat-value {
        font-size: 24px;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .action-card {
        padding: 20px;
    }
    
    .orders-table th,
    .orders-table td {
        padding: 12px 15px;
    }
    
    .admin-content {
        padding: 20px;
    }
    
    .admin-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .admin-stat-card {
        padding: 20px;
    }
    
    .admin-stat-card .stat-value {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .admin-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .user-card .avatar {
        width: 60px;
        height: 60px;
        font-size: 22px;
    }
    
    .card-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}
