/**
 * DataOcean - Professional Data Selling Platform
 * Main Stylesheet with Orange/Blue Theme
 */

/* Minimal Preloader Styles */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #FF6600;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.preloader-message {
    margin-top: 1rem;
    color: #666;
    font-size: 0.9rem;
    text-align: center;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.preloader.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Enhanced Filter Controls */
.transaction-filters {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    align-items: center;
}

.transaction-filters .form-control {
    padding: 0.65rem 0.9rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    min-width: 160px;
}

.transaction-filters .form-control:focus {
    border-color: #FF6600;
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
    outline: none;
}

.transaction-filters select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    grid-column: 1 / -1;
}

.transaction-filters input[type="date"] {
    cursor: pointer;
}

.transaction-filters input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    color: #FF6600;
}

/* Desktop layout: put filters on one row */
@media (min-width: 992px) {
    .transaction-filters {
        grid-template-columns: repeat(3, minmax(220px, 1fr));
        gap: 1rem;
        align-items: center;
    }
}

/* Empty State Styling */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    margin: 0;
    font-size: 1.1rem;
}

/* Transaction Item Styling */
.transaction-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s ease;
}

.transaction-item:hover {
    background-color: #f8f9fa;
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    width: 40px;
    text-align: center;
}

.transaction-details {
    flex: 1;
}

.transaction-type {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.transaction-date {
    font-size: 0.9rem;
    color: #6c757d;
}

.transaction-amount {
    font-weight: 600;
    font-size: 1.1rem;
}

.transaction-amount.positive {
    color: #28a745;
}

.transaction-amount.negative {
    color: #dc3545;
}

/* Transaction Type Styling */
.transaction-type.type-credit {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.transaction-type.type-debit {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Status Badge Styling */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-badge.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.status-failed {
    background: #f8d7da;
    color: #721c24;
}

/* Loading Row Styling */
.loading-row {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #FF6600;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 0.5rem;
}

/* Report Item Styling */
.report-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.report-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.report-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #2c3e50;
    flex: 1;
    margin-right: 1rem;
}

.report-status {
    flex-shrink: 0;
}

.report-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.report-type {
    font-weight: 500;
    color: #FF6600;
}

.report-date {
    color: #6c757d;
}

.report-description {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    color: #495057;
    line-height: 1.5;
}

.admin-response {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid #FF6600;
    color: #495057;
    line-height: 1.5;
}

.admin-response strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Report Filters */
.report-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.report-filters .form-control {
    padding: 0.5rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    min-width: 120px;
}

.report-filters .form-control:focus {
    border-color: #FF6600;
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
    outline: none;
}

.report-filters select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Product Info Styling */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.product-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.product-network {
    font-size: 0.8rem;
    color: #6c757d;
    background: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

/* Reduce row height for orders and transactions tables */
.orders-table tr,
.orders-table td,
.transactions-table tr,
.transactions-table td {
    padding: 0.5rem 0.75rem;
    vertical-align: middle;
}

.orders-table tbody tr,
.transactions-table tbody tr {
    height: auto;
    min-height: 50px;
}

/* Pagination Styles */
.pagination-container {
    margin-top: 2rem;
    padding: 1rem 0;
    border-top: 1px solid #e9ecef;
}

.pagination-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.pagination-numbers {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.9rem;
    min-width: 40px;
    min-height: 40px;
    border: 1px solid #e9ecef;
    border-radius: 999px;
    background: #ffffff;
    color: #6c757d;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.pagination-number:hover {
    background: #f8f9fa;
    border-color: var(--primary-orange);
    color: var(--primary-orange);
    text-decoration: none;
}

.pagination-number.active {
    background: var(--primary-orange);
    border-color: var(--primary-orange);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(234,88,12,0.25);
}

.pagination-info {
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Compact table styling */
.orders-table .product-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.orders-table .product-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #2c3e50;
}

.orders-table .network-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
}

.orders-table .order-actions {
    display: flex;
    gap: 0.5rem;
}

.orders-table .btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
}

/* Order Details Modal */
.order-details {
    padding: 1rem 0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f3f4;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row strong {
    color: #2c3e50;
    font-weight: 600;
    min-width: 120px;
}

.detail-row .status-badge {
    margin-left: 1rem;
}

.text-danger {
    color: #dc3545;
}


/* Top Orange Bar */
.top-orange-bar {
    height: 4px;
    background: linear-gradient(135deg, #EA580C 0%, #F97316 100%);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1001;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    font-size: 1.2rem;
    color: #011236;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mobile-menu-toggle:hover {
    background-color: rgba(1, 18, 54, 0.1);
}

/* Admin Sidebar - Simple Styling */
.admin-sidebar {
    width: 280px;
    background: linear-gradient(180deg, #011236 0%, #001122 100%);
    color: white;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

.admin-sidebar::-webkit-scrollbar {
    width: 0; /* Chrome, Safari, Opera */
    height: 0;
}

/* Sidebar Header */
.admin-sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Sidebar close (cancel) button - global */
.sidebar-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: none; /* visible on mobile via media query */
    align-items: center;
    justify-content: center;
}

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

.admin-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-image {
    width: 40px;
    height: 40px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-orange);
}

/* User Profile Section */
.user-profile-section {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 50px;
    height: 50px;
    background: var(--primary-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: white;
}

.user-info {
    flex: 1;
}

.user-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.25rem;
}

.user-role {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Navigation Menu */
.admin-nav {
    list-style: none;
    padding: 1rem 0;
    margin: 0;
}

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

.nav-item.active {
    background: rgba(234, 88, 12, 0.18);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 8px;
}

.nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.nav-item.active .nav-link {
    color: white;
    font-weight: 600;
}

.nav-icon {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.nav-text {
    flex: 1;
}

.nav-badge {
    background: #ff6b35;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
    line-height: 1;
    margin-left: auto;
}

.nav-item.active .nav-badge {
    background: #ff8533;
}

/* Legacy Sidebar Support */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #011236 0%, #001122 100%);
    color: white;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

/* Ensure sidebar is visible when open - High specificity */
.dashboard-layout .sidebar.open,
.sidebar.open {
    transform: translateX(0) !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    left: 0 !important;
    top: 0 !important;
    position: fixed !important;
    z-index: 1000 !important;
}

/* Mobile Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Admin Sidebar Mobile Responsive */
@media (max-width: 768px) {
    .sidebar-close-btn { display: flex !important; }
    .mobile-menu-toggle {
        display: flex;
    }
    
    .admin-sidebar {
        transform: translateX(-100%);
        z-index: 1000;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 100%;
        max-width: 100vw;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    }
    
    .admin-sidebar.open {
        transform: translateX(0) !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        left: 0 !important;
        top: 0 !important;
    }
    
    /* Mobile Overlay for Admin Sidebar */
    .admin-mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: transparent; /* remove shade */
        z-index: 1; /* keep low so clicks pass through */
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        pointer-events: none; /* allow clicks */
    }
    
    .admin-mobile-overlay.show {
        opacity: 0; /* keep hidden */
        visibility: hidden;
        pointer-events: none;
    }
    
    /* Mobile Header Adjustments */
    .admin-header {
        padding-left: 1rem;
    }
    
    .admin-main {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    /* Mobile User Profile Adjustments */
    .user-profile {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .user-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .user-name {
        font-size: 1rem;
    }
    
    .user-role {
        font-size: 0.8rem;
    }
    
    /* Mobile Navigation Adjustments */
    .nav-item {
        margin: 0.2rem 0.75rem;
    }
    
    .nav-link {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }
    
    .nav-icon {
        font-size: 1.1rem;
        width: 18px;
    }
    
    /* Mobile Sidebar Overlay */
    .admin-sidebar::after {
        content: none; /* remove mobile sidebar shade */
    }
}


/* Legacy Mobile Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .sidebar {
        transform: translateX(-100%);
        z-index: 1000;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 100%;
        max-width: 100vw;
    }
    
    .sidebar.open {
        transform: translateX(0) !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        left: 0 !important;
        top: 0 !important;
    }
}

:root {
    --primary-orange: #EA580C; /* toned-down brand orange */
    --primary-blue: #0B153A;   /* slightly deeper blue */
    --white: #FFFFFF;
    --light-gray: #F8F9FA;
    --dark-gray: #6C757D;
    --success: #28A745;
    --danger: #DC3545;
    --warning: #FFC107;
    --info: #17A2B8;
    --border-color: #DEE2E6;
    --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--primary-blue);
    background-color: var(--light-gray);
    margin: 0;
    padding: 0;
}

/* Admin Dashboard Body */
body.admin-dashboard {
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-orange);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #e55a00;
    text-decoration: underline;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
.col-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

[class*="col-"] {
    padding: 0 15px;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #1a2a5e 100%);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-orange);
}

.nav {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav a {
    color: var(--white);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.nav a:hover, .nav a.active {
    background-color: var(--primary-orange);
    text-decoration: none;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.wallet-balance {
    background-color: var(--primary-orange);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: bold;
}

.dropdown {
    position: relative;
}

.dropdown-toggle {
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.dropdown-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--white);
    border-radius: 5px;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    display: none;
    z-index: 1001;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--primary-blue);
    border-bottom: 1px solid var(--border-color);
}

.dropdown-menu a:hover {
    background-color: var(--light-gray);
    text-decoration: none;
}

/* Admin Main Content */
.admin-main {
    margin-left: 280px;
    min-height: 100vh;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    width: calc(100% - 280px);
    box-sizing: border-box;
}

/* Desktop-specific admin main content to override mobile styles */
@media (min-width: 769px) {
    .admin-main {
        margin-left: 280px !important;
        width: calc(100% - 280px) !important;
    }
    
    .admin-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        transform: translateX(0) !important;
        z-index: 1000 !important;
    }
}

.admin-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.page-title h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 0.25rem 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.page-title p {
    color: #6c757d;
    font-size: 1rem;
    margin: 0;
    font-weight: 500;
}

.dashboard-content {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* User Dropdown in Header */
.user-dropdown {
    position: relative;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    color: #2c3e50;
    border: 1px solid #e9ecef;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.user-dropdown-toggle:hover {
    background: #f1f5f9;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.user-avatar-small {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 250px;
    display: none;
    z-index: 1001;
    border: 1px solid rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.user-dropdown-menu.show {
    display: block;
    animation: slideInFromTop 0.3s ease-out;
}

.dropdown-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dropdown-avatar {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.dropdown-info {
    flex: 1;
}

.dropdown-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.dropdown-role {
    font-size: 0.9rem;
    opacity: 0.9;
}

.dropdown-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, rgba(255, 102, 0, 0.1), rgba(255, 102, 0, 0.05));
    color: #FF6600;
    text-decoration: none;
    transform: translateX(5px);
}

.dropdown-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Cards */
.card {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #2c3e50;
    padding: 1rem 1.5rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background-color: var(--light-gray);
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.5;
}

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

.btn-primary:hover {
    background-color: #e55a00;
    color: var(--white);
    text-decoration: none;
}

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

.btn-secondary:hover {
    background-color: #1a2a5e;
    color: var(--white);
    text-decoration: none;
}

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

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

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

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

.btn-outline-primary {
    background-color: transparent;
    color: var(--primary-orange);
    border: 2px solid var(--primary-orange);
}

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-control {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 0.2rem rgba(234, 88, 12, 0.18);
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .form-control {
    border-radius: 5px 0 0 5px;
}

.input-group-text {
    background-color: var(--light-gray);
    border: 2px solid var(--border-color);
    border-left: none;
    padding: 0.75rem;
    border-radius: 0 5px 5px 0;
}

/* Button Group Styles */
.btn-group {
    display: inline-flex;
    vertical-align: middle;
}

.btn-group .btn {
    position: relative;
    flex: 1 1 auto;
    margin-right: -1px;
}

.btn-group .btn:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.btn-group .btn:last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.btn-group .btn:not(:first-child):not(:last-child) {
    border-radius: 0;
}

.btn-light {
    background-color: #f8f9fa;
    border-color: #f8f9fa;
    color: #212529;
}

.btn-light:hover {
    background-color: #e2e6ea;
    border-color: #dae0e5;
    color: #212529;
}

/* Card Subheader */
.card-subheader {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 0.75rem 1rem;
}

/* Top Orange Bar */
.top-orange-bar {
    height: 4px;
    background: linear-gradient(90deg, #FF6600 0%, #FF8533 100%);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background-color: var(--light-gray);
    font-weight: 600;
    color: var(--primary-blue);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.05);
}

.table-hover tbody tr:hover {
    background-color: rgba(255, 102, 0, 0.1);
}

/* Alerts */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
}

.badge-primary { background-color: var(--primary-orange); color: var(--white); }
.badge-secondary { background-color: var(--primary-blue); color: var(--white); }
.badge-success { background-color: var(--success); color: var(--white); }
.badge-danger { background-color: var(--danger); color: var(--white); }
.badge-warning { background-color: var(--warning); color: var(--primary-blue); }
.badge-info { background-color: var(--info); color: var(--white); }

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.product-card {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #1a2a5e 100%);
    color: var(--white);
    padding: 1rem;
    text-align: center;
}

.product-provider {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0;
}

.product-body {
    padding: 1.5rem;
}

.product-details {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.product-data {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-orange);
}

.product-validity {
    color: var(--dark-gray);
    font-size: 0.875rem;
}

.product-price {
    font-size: 1.75rem;
    font-weight: bold;
    color: var(--primary-blue);
    text-align: center;
    margin-bottom: 1rem;
}

.product-description {
    color: var(--dark-gray);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-orange) 0%, #ff8533 100%);
    color: var(--white);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* Loading Spinner */
.spinner {
    border: 4px solid var(--light-gray);
    border-top: 4px solid var(--primary-orange);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer */
.footer {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    color: var(--primary-orange);
    margin-bottom: 1rem;
}

.footer-section a {
    color: var(--white);
    display: block;
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: var(--primary-orange);
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .user-menu {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .row {
        flex-direction: column;
    }
    
    [class*="col-"] {
        max-width: 100%;
        flex: 0 0 100%;
    }
    
    .table-responsive {
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .product-body {
        padding: 1rem;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-primary { color: var(--primary-orange); }
.text-secondary { color: var(--primary-blue); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }
.text-muted { color: var(--dark-gray); }

.bg-primary { background-color: var(--primary-orange); }
.bg-secondary { background-color: var(--primary-blue); }
.bg-light { background-color: var(--light-gray); }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }
