/* Professional CSS for KUCH CAFE SHOP */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f5dc 0%, #fff8dc 100%);
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Admin pages layout */
.admin-layout {
    padding-left: 250px;
    padding-top: 80px;
}

.admin-layout .main-content {
    margin-left: 0;
    margin-top: 0;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: linear-gradient(135deg, #1a365d 0%, #2d3748 50%, #4a5568 100%);
    color: white;
    padding: 12px 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: fixed;
    top: 0;
    left: 250px;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #ffd700;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: left 0.3s ease;
}

header.sidebar-collapsed {
    left: 0;
}

.sidebar-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    min-width: 44px;
    min-height: 44px;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffd700;
    transform: scale(1.05);
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-backdrop.show {
    display: block;
    opacity: 1;
}

.header-left {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.header-center {
    flex: 1;
    text-align: center;
    margin: 0 20px;
}

.header-center h1 {
    font-size: 22px;
    font-weight: 600;
    margin: 0;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
    letter-spacing: 0.5px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 0 0 auto;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.welcome-text {
    color: #e2e8f0;
}

.welcome-icon {
    animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(20deg); }
    75% { transform: rotate(-10deg); }
}

.header-actions {
    display: flex;
    gap: 10px;
}

.header-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.logout-btn:hover {
    background: #dc3545;
    border-color: #dc3545;
}

header h1 {
    font-size: 24px;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    background: #2c3e50;
    color: white;
    padding-top: 80px;
    padding-bottom: 20px;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    overflow-y: auto;
    z-index: 999;
}

.sidebar.hidden {
    transform: translateX(-100%);
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.sidebar-backdrop.visible {
    display: block;
}

.sidebar-branding {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #34495e;
    margin-bottom: 20px;
}

.sidebar-branding img {
    display: block;
    margin: 0 auto 10px auto;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    border-bottom: 1px solid #34495e;
}

.sidebar ul li a {
    display: block;
    padding: 15px 20px;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar ul li a:hover {
    background: #34495e;
    color: #f39c12;
    transform: translateX(5px);
}

.main-content {
    margin-left: 250px;
    margin-top: 80px;
    padding: 20px;
    min-height: calc(100vh - 80px);
    box-sizing: border-box;
    position: relative;
    transition: margin-left 0.3s ease;
}

.main-content.sidebar-collapsed {
    margin-left: 0;
}

main {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    animation: fadeIn 0.5s ease-in;
    width: 100%;
    box-sizing: border-box;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

h1, h2, h3 {
    color: #8b4513;
    margin-bottom: 20px;
    font-weight: 700;
}

h2 {
    border-bottom: 3px solid #daa520;
    padding-bottom: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

table th, table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

table th {
    background: #8b4513;
    color: white;
    font-weight: 500;
}

table tr:hover {
    background: #f9f9f9;
}

form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

input, select, textarea, button {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #daa520;
    box-shadow: 0 0 5px rgba(218, 165, 32, 0.5);
}

button {
    background: linear-gradient(135deg, #8b4513 0%, #daa520 100%);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

footer {
    text-align: center;
    padding: 20px;
    background: #2c3e50;
    color: white;
    margin-top: 40px;
}

.alert {
    padding: 15px;
    margin: 20px 0;
    border-radius: 5px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: #daa520;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: flex !important;
    }

    header {
        left: 0;
        padding: 10px 15px;
    }

    .header-center {
        margin: 0 10px;
    }

    .header-center h1 {
        font-size: 18px;
    }

    .header-right {
        gap: 15px;
    }

    .user-info {
        font-size: 12px;
    }

    .header-actions {
        gap: 8px;
    }

    .header-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .admin-layout {
        padding-left: 0;
        padding-top: 120px;
    }
}

/* Additional animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Order Management Styles */
.table-container {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    background: white;
    width: 100%;
    box-sizing: border-box;
}

.form-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    box-sizing: border-box;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-group input[type="file"] {
    padding: 8px;
    border: 2px dashed #ddd;
    border-radius: 5px;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-group input[type="file"]:hover {
    border-color: #daa520;
    background: #fff8dc;
}

.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.order-items {
    margin: 20px 0;
}

.order-items h4 {
    margin-bottom: 15px;
    color: #8b4513;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
}

.order-item select {
    flex: 2;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.order-item input[type="number"] {
    flex: 0.5;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 80px;
}

.item-price {
    flex: 0.5;
    font-weight: bold;
    color: #8b4513;
    text-align: right;
}

.remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    background: #c82333;
}

.add-item-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.add-item-btn:hover {
    background: #218838;
}

.order-total {
    text-align: right;
    font-size: 18px;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
}

.submit-btn {
    background: linear-gradient(135deg, #8b4513 0%, #daa520 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-small {
    background: #007bff;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-small:hover {
    background: #0056b3;
}

.location-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.location-link:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 10px;
    }

    .form-section {
        padding: 15px;
        margin: 15px 0;
    }

    .order-item {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .order-item select,
    .order-item input[type="number"] {
        width: 100%;
    }

    .item-price {
        text-align: left;
    }

    .admin-layout {
        padding-left: 0;
        padding-top: 120px;
    }

    .admin-layout.sidebar-open {
        padding-left: 250px;
    }

    .admin-layout.sidebar-collapsed {
        padding-left: 0;
    }
}

/* Mobile Stats Summary */
.mobile-stats-summary {
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid rgba(255,255,255,0.8);
}

.mobile-stat {
    text-align: center;
    padding: 10px;
    background: rgba(255,255,255,0.5);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.mobile-stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 2px;
}

.mobile-stat-label {
    font-size: 0.75rem;
    color: #7f8c8d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dashboard-header h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
    background: linear-gradient(135deg, #8b4513, #daa520);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.dashboard-subtitle {
    color: #7f8c8d;
    font-size: 1.1rem;
    margin: 0;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}

.dashboard-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.refresh-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.refresh-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.last-updated {
    font-size: 0.8rem;
    color: #7f8c8d;
    font-weight: 500;
}

.last-updated span {
    color: #2c3e50;
    font-weight: 600;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-spinner {
    text-align: center;
    color: #2c3e50;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #daa520;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
}

/* Enhanced Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #daa520, #8b4513);
    border-radius: 16px 16px 0 0;
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.stat-icon {
    font-size: 2.5rem;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    color: white;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    position: relative;
    z-index: 1;
}

.stat-content h3 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
    font-family: 'Roboto', sans-serif;
}

.stat-content p {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-change {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-block;
    backdrop-filter: blur(10px);
}

.stat-change.positive {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    box-shadow: 0 4px 12px rgba(21, 87, 36, 0.2);
}

.stat-change.warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
    box-shadow: 0 4px 12px rgba(133, 100, 4, 0.2);
}

/* Enhanced Charts Section */
.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.chart-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.8);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.chart-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #daa520, #8b4513);
    border-radius: 16px 16px 0 0;
}

.chart-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.15);
}

.chart-container h2 {
    color: #2c3e50;
    font-size: 1.4rem;
    margin-bottom: 25px;
    font-weight: 600;
    text-align: center;
    position: relative;
}

.chart-container h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #daa520, #8b4513);
    border-radius: 1px;
}

.chart-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: #dc3545;
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border: 2px dashed #dc3545;
    border-radius: 12px;
    padding: 20px;
}

/* Enhanced Dashboard Widgets */
.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.widget {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.8);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #daa520, #8b4513);
    border-radius: 16px 16px 0 0;
}

.widget:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.widget-header {
    padding: 20px 25px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
}

.widget-header h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    position: relative;
}

.view-all {
    color: #007bff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.view-all:hover {
    color: #0056b3;
    text-decoration: underline;
    transform: translateX(3px);
}

.widget-content {
    padding: 0;
    max-height: 350px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #daa520 #f1f1f1;
}

.widget-content::-webkit-scrollbar {
    width: 6px;
}

.widget-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.widget-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #daa520, #8b4513);
    border-radius: 3px;
}

.widget-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #8b4513, #daa520);
}

/* Enhanced Orders List */
.orders-list {
    max-height: 300px;
    overflow-y: auto;
}

.order-item {
    padding: 18px 25px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    position: relative;
}

.order-item:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transform: translateX(4px);
}

.order-item:last-child {
    border-bottom: none;
}

.order-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.order-id {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.order-customer {
    color: #7f8c8d;
    font-size: 0.85rem;
    font-style: italic;
}

.order-amount {
    font-weight: 700;
    color: #28a745;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(40, 167, 69, 0.2);
}

.order-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.order-time {
    color: #7f8c8d;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Enhanced Stock List */
.stock-list {
    max-height: 300px;
    overflow-y: auto;
}

.stock-item {
    padding: 18px 25px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.stock-item:hover {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    transform: translateX(4px);
}

.stock-item:last-child {
    border-bottom: none;
}

.stock-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.item-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.stock-quantity {
    color: #dc3545;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.stock-quantity::before {
    content: '⚠️';
    font-size: 0.8rem;
}

/* Enhanced Popular Items */
.popular-list {
    max-height: 300px;
    overflow-y: auto;
}

.popular-item {
    padding: 18px 25px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.popular-item:hover {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    transform: translateX(4px);
}

.popular-item:last-child {
    border-bottom: none;
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.item-category {
    color: #7f8c8d;
    font-size: 0.8rem;
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    padding: 3px 10px;
    border-radius: 12px;
    display: inline-block;
    width: fit-content;
    font-weight: 500;
    text-transform: capitalize;
}

.item-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.item-stats .stat {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.item-stats .revenue {
    color: #28a745;
    font-weight: 700;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(40, 167, 69, 0.2);
}

/* Enhanced Quick Actions */
.quick-actions {
    padding: 25px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 15px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    text-decoration: none;
    color: #495057;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(218, 165, 32, 0.1), transparent);
    transition: left 0.5s ease;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:hover {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 32px rgba(0,123,255,0.3);
    border-color: #007bff;
}

.action-icon {
    font-size: 1.8rem;
    transition: transform 0.3s ease;
}

.action-btn:hover .action-icon {
    transform: scale(1.2) rotate(5deg);
}

.action-btn span:last-child {
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

/* Enhanced Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.summary-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.8);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #daa520, #8b4513);
    border-radius: 16px 16px 0 0;
}

.summary-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.summary-card h4 {
    color: #7f8c8d;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    position: relative;
}

.summary-card h4::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 1px;
    background: linear-gradient(90deg, #daa520, #8b4513);
}

.summary-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
    font-family: 'Roboto', sans-serif;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.summary-period {
    color: #adb5bd;
    font-size: 0.85rem;
    margin: 0;
    font-weight: 500;
    text-transform: lowercase;
}

/* Enhanced Badges */
.badge {
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.badge:hover {
    transform: scale(1.05);
}

.badge-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 1px solid rgba(21, 87, 36, 0.2);
}

.badge-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
    border: 1px solid rgba(133, 100, 4, 0.2);
}

.badge-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border: 1px solid rgba(114, 28, 36, 0.2);
}

.badge-secondary {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.2);
}

/* Enhanced No Data State */
.no-data {
    padding: 50px 25px;
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    font-size: 1rem;
    position: relative;
}

.no-data::before {
    content: '📊';
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Advanced Responsive Design */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 18px;
    }

    .charts-section {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .dashboard-widgets {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .dashboard-header h1 {
        font-size: 2.2rem;
    }

    .stat-card {
        padding: 22px;
        gap: 18px;
    }

    .stat-icon {
        width: 60px;
        height: 60px;
        font-size: 2.2rem;
    }

    .stat-content h3 {
        font-size: 1.9rem;
    }

    .chart-container {
        padding: 25px;
    }

    .widget-header {
        padding: 18px 22px;
    }

    .summary-cards {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        margin-bottom: 25px;
    }

    .dashboard-header h1 {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }

    .dashboard-subtitle {
        font-size: 1rem;
    }

    .dashboard-actions {
        flex-direction: column;
        gap: 10px;
    }

    .mobile-stats-summary {
        display: grid;
    }

    .stats-grid,
    .charts-section,
    .dashboard-widgets,
    .summary-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .stat-card {
        padding: 20px;
        flex-direction: column;
        text-align: center;
        gap: 15px;
        max-width: 100%;
    }

    .stat-icon {
        width: 55px;
        height: 55px;
        font-size: 2rem;
        align-self: center;
    }

    .stat-content h3 {
        font-size: 1.7rem;
    }

    .chart-container {
        padding: 20px;
        margin: 0 10px;
    }

    .chart-container h2 {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }

    .widget {
        margin: 0 10px;
    }

    .widget-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .widget-header h3 {
        font-size: 1.1rem;
    }

    .view-all {
        font-size: 0.85rem;
    }

    .order-item,
    .stock-item,
    .popular-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 15px 20px;
    }

    .order-meta,
    .stock-alert,
    .item-stats {
        align-items: flex-start;
        width: 100%;
    }

    .order-amount,
    .stock-quantity,
    .item-stats .revenue {
        font-size: 1rem;
        text-align: left;
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
        padding: 20px;
        gap: 12px;
    }

    .action-btn {
        padding: 18px 12px;
        gap: 10px;
    }

    .action-icon {
        font-size: 1.5rem;
    }

    .action-btn span:last-child {
        font-size: 0.8rem;
    }

    .summary-card {
        padding: 25px 20px;
        margin: 0 10px;
    }

    .summary-value {
        font-size: 2rem;
    }

    .badge {
        font-size: 0.7rem;
        padding: 5px 10px;
    }
}

@media (max-width: 480px) {
    .dashboard-header h1 {
        font-size: 1.6rem;
    }

    .dashboard-subtitle {
        font-size: 0.95rem;
    }

    .stat-card {
        padding: 18px;
        gap: 12px;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
    }

    .stat-content h3 {
        font-size: 1.5rem;
    }

    .stat-content p {
        font-size: 0.85rem;
    }

    .chart-container {
        padding: 15px;
        margin: 0 5px;
    }

    .widget {
        margin: 0 5px;
    }

    .quick-actions {
        grid-template-columns: 1fr;
        padding: 15px;
        gap: 10px;
    }

    .action-btn {
        padding: 16px 10px;
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
    }

    .action-icon {
        font-size: 1.3rem;
        margin-right: 10px;
    }

    .action-btn span:last-child {
        font-size: 0.9rem;
        flex: 1;
    }

    .summary-card {
        padding: 20px 15px;
        margin: 0 5px;
    }

    .summary-value {
        font-size: 1.8rem;
    }

    .summary-card h4 {
        font-size: 0.9rem;
    }
}

/* Touch-friendly enhancements for mobile */
@media (hover: none) and (pointer: coarse) {
    .stat-card,
    .widget,
    .summary-card,
    .action-btn {
        transition: none;
    }

    .stat-card:hover,
    .widget:hover,
    .summary-card:hover,
    .action-btn:hover {
        transform: none;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

    .action-btn:active {
        transform: scale(0.98);
        background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
        color: white;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .stat-card,
    .widget,
    .summary-card,
    .chart-container {
        border: 2px solid #000;
        background: #fff;
    }

    .stat-change,
    .badge {
        border: 1px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .stat-card,
    .widget,
    .summary-card,
    .chart-container,
    .action-btn,
    .order-item,
    .stock-item,
    .popular-item {
        transition: none;
    }

    .stat-card:hover,
    .widget:hover,
    .summary-card:hover,
    .chart-container:hover,
    .action-btn:hover,
    .order-item:hover,
    .stock-item:hover,
    .popular-item:hover {
        transform: none;
    }
}

/* Notification System */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
    border: 1px solid rgba(255,255,255,0.2);
}

.notification-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border-color: rgba(21, 87, 36, 0.2);
}

.notification-error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border-color: rgba(114, 28, 36, 0.2);
}

.notification-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
    border-color: rgba(12, 84, 96, 0.2);
}

.notification button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification button:hover {
    opacity: 1;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile notification adjustments */
@media (max-width: 480px) {
    .notification {
        left: 10px;
        right: 10px;
        max-width: none;
        top: 80px;
    }
}