/* Admin Page Specific Styles */

.admin-header {
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--primary-200) 50%, var(--primary-100) 100%);
    padding: var(--space-16) 0 var(--space-10) 0;
    text-align: center;
    border-bottom: 1px solid rgba(235, 206, 178, 0.3);
    position: relative;
    overflow: hidden;
}

.admin-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 70%, rgba(235, 206, 178, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

.admin-title {
    font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
    margin-bottom: var(--space-4);
    background: linear-gradient(135deg, var(--secondary-600), var(--primary-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    letter-spacing: -0.03em;
    position: relative;
    z-index: 1;
}

.admin-subtitle {
    color: var(--neutral-600);
    font-size: clamp(var(--text-lg), 2.5vw, var(--text-xl));
    margin-bottom: 0;
    position: relative;
    z-index: 1;
    line-height: var(--leading-relaxed);
}

.admin-badge {
    background: linear-gradient(135deg, var(--secondary-600), var(--secondary-700));
    color: white;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 700;
    margin-right: var(--space-3);
    box-shadow: var(--shadow-md);
    letter-spacing: -0.01em;
}

/* Admin Navigation */
.admin-nav-section {
    background: white;
    border-bottom: 2px solid var(--neutral-100);
    padding: var(--space-6) 0;
    top: var(--header-height-desktop);
    z-index: var(--z-sticky);
    box-shadow: var(--shadow-sm);
}

.admin-nav {
    display: flex;
    gap: var(--space-3);
    overflow-x: auto;
    padding: var(--space-3) 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.admin-nav::-webkit-scrollbar {
    display: none;
}

.admin-nav-btn {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-6);
    background: linear-gradient(135deg, var(--neutral-50), var(--neutral-100));
    border: 2px solid var(--neutral-200);
    border-radius: var(--radius-2xl);
    color: var(--neutral-700);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
    min-height: 48px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.admin-nav-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-2xl);
    background: linear-gradient(135deg, var(--secondary-100), var(--primary-200));
    opacity: 0;
    transition: var(--transition-fast);
    z-index: -1;
}

.admin-nav-btn:hover {
    border-color: var(--secondary-300);
    color: var(--neutral-800);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.admin-nav-btn:hover::before {
    opacity: 1;
}

.admin-nav-btn.active {
    background: linear-gradient(135deg, var(--secondary-600), var(--secondary-700));
    border-color: var(--secondary-700);
    color: white;
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

.admin-nav-btn svg {
    transition: var(--transition-fast);
}

.admin-nav-btn.active svg {
    transform: scale(1.15);
}

/* Admin Content */
.admin-content {
    padding: var(--space-12) 0;
    min-height: calc(100vh - var(--header-height-desktop) - 200px);
    background: linear-gradient(135deg, var(--neutral-50) 0%, white 100%);
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-10);
    flex-wrap: wrap;
    gap: var(--space-6);
    padding-bottom: var(--space-6);
    border-bottom: 3px solid var(--neutral-100);
}

.section-header h2 {
    color: var(--neutral-900);
    margin-bottom: 0;
    font-size: clamp(var(--text-2xl), 4vw, var(--text-3xl));
    font-weight: 800;
    background: linear-gradient(135deg, var(--secondary-600), var(--primary-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Products Table */
.products-table-container {
    background: white;
    border-radius: var(--radius-3xl);
    box-shadow: var(--shadow-2xl);
    overflow: hidden;
    border: 1px solid rgba(235, 206, 178, 0.2);
    position: relative;
}

.products-table-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--secondary-600), var(--primary-600));
    border-radius: var(--radius-3xl) var(--radius-3xl) 0 0;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.admin-table th {
    background: linear-gradient(135deg, var(--neutral-50), var(--neutral-100));
    padding: var(--space-5);
    text-align: left;
    font-weight: 700;
    color: var(--neutral-800);
    border-bottom: 3px solid var(--neutral-200);
    white-space: nowrap;
    font-size: var(--text-sm);
    letter-spacing: -0.01em;
}

.admin-table td {
    padding: var(--space-5);
    border-bottom: 2px solid var(--neutral-100);
    vertical-align: middle;
    transition: var(--transition-fast);
}

.admin-table tr:hover {
    background: linear-gradient(135deg, var(--secondary-50), var(--primary-100));
}

.product-image-cell {
    width: 80px;
    height: 64px;
    border-radius: var(--radius-xl);
    object-fit: cover;
    box-shadow: var(--shadow-md);
    transition: var(--transition-fast);
}

.admin-table tr:hover .product-image-cell {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.product-actions {
    display: flex;
    gap: var(--space-3);
    align-items: center;
}

.action-btn {
    padding: var(--space-3);
    border: none;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
}

.action-btn.edit {
    background: linear-gradient(135deg, var(--secondary-50), var(--secondary-100));
    color: var(--secondary-600);
    border-color: var(--secondary-200);
}

.action-btn.edit:hover {
    background: linear-gradient(135deg, var(--secondary-100), var(--secondary-200));
    color: var(--secondary-700);
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary-300);
}

.action-btn.delete {
    background: linear-gradient(135deg, var(--burgundy-50), var(--burgundy-100));
    color: var(--burgundy-600);
    border-color: var(--burgundy-200);
}

.action-btn.delete:hover {
    background: linear-gradient(135deg, var(--burgundy-100), var(--burgundy-200));
    color: var(--burgundy-700);
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
    border-color: var(--burgundy-300);
}

/* Orders Grid */
.orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: var(--space-8);
}

.order-card {
    background: white;
    border-radius: var(--radius-3xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(235, 206, 178, 0.2);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.order-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-3xl);
    background: linear-gradient(135deg, var(--secondary-50), var(--primary-100));
    opacity: 0;
    transition: var(--transition-fast);
    z-index: -1;
}

.order-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.order-card:hover::before {
    opacity: 0.3;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 2px solid var(--neutral-100);
}

.order-id {
    font-weight: 700;
    color: var(--neutral-900);
    font-size: clamp(var(--text-lg), 2.5vw, var(--text-xl));
    font-family: var(--font-mono);
}

.order-status {
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
}

.order-status.pending {
    background: linear-gradient(135deg, var(--primary-100), var(--primary-200));
    color: var(--primary-700);
    border-color: var(--primary-300);
}

.order-status.confirmed {
    background: linear-gradient(135deg, var(--secondary-100), var(--secondary-200));
    color: var(--secondary-700);
    border-color: var(--secondary-300);
}

.order-status.shipped {
    background: linear-gradient(135deg, var(--neutral-100), var(--neutral-200));
    color: var(--neutral-700);
    border-color: var(--neutral-300);
}

.order-status.delivered {
    background: linear-gradient(135deg, var(--secondary-100), var(--secondary-200));
    color: var(--secondary-700);
    border-color: var(--secondary-300);
}

.order-info {
    margin-bottom: var(--space-6);
}

.order-info p {
    margin-bottom: var(--space-3);
    color: var(--neutral-600);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}

.order-total {
    font-size: clamp(var(--text-xl), 2.5vw, var(--text-2xl));
    font-weight: 800;
    color: var(--secondary-600);
    margin-bottom: var(--space-6);
    font-family: var(--font-display);
    text-align: center;
    padding: var(--space-3);
    background: linear-gradient(135deg, var(--secondary-50), var(--primary-100));
    border-radius: var(--radius-xl);
    border: 2px solid var(--secondary-200);
}

.order-actions {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    justify-content: center;
}

.order-actions .btn {
    flex: 1;
    min-width: 140px;
    font-size: var(--text-sm);
    padding: var(--space-3) var(--space-4);
    font-weight: 600;
}

/* Custom Orders Grid */
.custom-orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: var(--space-8);
}

.custom-order-card {
    background: white;
    border-radius: var(--radius-3xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(235, 206, 178, 0.2);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.custom-order-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-3xl);
    background: linear-gradient(135deg, var(--secondary-50), var(--primary-100));
    opacity: 0;
    transition: var(--transition-fast);
    z-index: -1;
}

.custom-order-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.custom-order-card:hover::before {
    opacity: 0.3;
}

.custom-order-header {
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 2px solid var(--neutral-100);
}

.custom-order-title {
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: var(--space-3);
    font-size: clamp(var(--text-lg), 2.5vw, var(--text-xl));
    line-height: var(--leading-tight);
}

.custom-order-date {
    color: var(--neutral-500);
    font-size: var(--text-sm);
    font-family: var(--font-mono);
}

.custom-order-details {
    margin-bottom: var(--space-6);
}

.custom-order-details p {
    margin-bottom: var(--space-3);
    color: var(--neutral-600);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}

.custom-order-description {
    background: linear-gradient(135deg, var(--neutral-50), var(--neutral-100));
    padding: var(--space-4);
    border-radius: var(--radius-xl);
    border-left: 4px solid var(--secondary-400);
    margin: var(--space-4) 0;
    font-style: italic;
    color: var(--neutral-700);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.custom-order-description::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 10px;
    font-size: var(--text-4xl);
    color: var(--secondary-400);
    font-family: var(--font-display);
    line-height: 1;
}

.admin-notes {
    background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
    padding: var(--space-4);
    border-radius: var(--radius-xl);
    border-left: 4px solid var(--primary-400);
    margin: var(--space-4) 0;
    color: var(--neutral-700);
    font-size: var(--text-sm);
    box-shadow: var(--shadow-sm);
}

.custom-order-actions {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-top: var(--space-6);
    justify-content: center;
}

.custom-order-actions .btn {
    flex: 1;
    min-width: 140px;
    font-size: var(--text-sm);
    padding: var(--space-3) var(--space-4);
    font-weight: 600;
}

.status-badge {
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-lg);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
}

.status-badge.pending {
    background: linear-gradient(135deg, var(--primary-100), var(--primary-200));
    color: var(--primary-700);
    border-color: var(--primary-300);
}

.status-badge.can_do_send_payment {
    background: linear-gradient(135deg, var(--secondary-100), var(--secondary-200));
    color: var(--secondary-700);
    border-color: var(--secondary-300);
}

.status-badge.payment_sent {
    background: linear-gradient(135deg, var(--neutral-100), var(--neutral-200));
    color: var(--neutral-700);
    border-color: var(--neutral-300);
}

.status-badge.started {
    background: linear-gradient(135deg, var(--secondary-100), var(--secondary-200));
    color: var(--secondary-700);
    border-color: var(--secondary-300);
}

.status-badge.completed {
    background: linear-gradient(135deg, var(--secondary-100), var(--secondary-200));
    color: var(--secondary-700);
    border-color: var(--secondary-300);
}

.status-badge.cancelled {
    background: linear-gradient(135deg, var(--burgundy-100), var(--burgundy-200));
    color: var(--burgundy-700);
    border-color: var(--burgundy-300);
}

.completed-badge {
    color: var(--secondary-600);
    font-weight: 700;
    font-size: var(--text-sm);
    padding: var(--space-2) var(--space-4);
    background: linear-gradient(135deg, var(--secondary-50), var(--secondary-100));
    border-radius: var(--radius-lg);
    border: 2px solid var(--secondary-200);
}

.cancelled-badge {
    color: var(--burgundy-600);
    font-weight: 700;
    font-size: var(--text-sm);
    padding: var(--space-2) var(--space-4);
    background: linear-gradient(135deg, var(--burgundy-50), var(--burgundy-100));
    border-radius: var(--radius-lg);
    border: 2px solid var(--burgundy-200);
}

/* Order Filters */
.order-filters {
    display: flex;
    gap: var(--space-4);
    align-items: center;
}

.order-filters select {
    padding: var(--space-3) var(--space-5);
    border: 2px solid var(--neutral-200);
    border-radius: var(--radius-xl);
    background: white;
    color: var(--neutral-700);
    font-size: var(--text-sm);
    min-height: 48px;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.order-filters select:focus {
    outline: none;
    border-color: var(--secondary-400);
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.1), var(--shadow-md);
}

/* Custom Order Stats */
.custom-order-stats {
    display: flex;
    gap: var(--space-6);
    align-items: center;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-4) var(--space-6);
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(235, 206, 178, 0.2);
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-2xl);
    background: linear-gradient(135deg, var(--secondary-50), var(--primary-100));
    opacity: 0;
    transition: var(--transition-fast);
    z-index: -1;
}

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

.stat-card:hover::before {
    opacity: 0.5;
}

.stat-number {
    font-size: clamp(var(--text-2xl), 4vw, var(--text-3xl));
    font-weight: 800;
    color: var(--secondary-600);
    line-height: var(--leading-none);
    font-family: var(--font-display);
}

.stat-label {
    font-size: var(--text-sm);
    color: var(--neutral-600);
    margin-top: var(--space-2);
    font-weight: 500;
    text-align: center;
}

/* Analytics Grid */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-8);
    margin-bottom: var(--space-12);
}

.analytics-card {
    background: white;
    padding: var(--space-8);
    border-radius: var(--radius-3xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(235, 206, 178, 0.2);
    text-align: center;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.analytics-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-3xl);
    background: linear-gradient(135deg, var(--secondary-50), var(--primary-100));
    opacity: 0;
    transition: var(--transition-fast);
    z-index: -1;
}

.analytics-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.analytics-card:hover::before {
    opacity: 0.3;
}

.analytics-card h3 {
    color: var(--neutral-700);
    font-size: var(--text-base);
    margin-bottom: var(--space-4);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.analytics-value {
    font-size: clamp(var(--text-3xl), 5vw, var(--text-4xl));
    font-weight: 800;
    color: var(--secondary-600);
    margin-bottom: var(--space-3);
    line-height: var(--leading-none);
    font-family: var(--font-display);
}

.analytics-change {
    font-size: var(--text-sm);
    font-weight: 600;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-lg);
}

.analytics-change.positive {
    color: var(--secondary-600);
    background: linear-gradient(135deg, var(--secondary-50), var(--secondary-100));
    border: 1px solid var(--secondary-200);
}

.analytics-change.negative {
    color: var(--burgundy-600);
    background: linear-gradient(135deg, var(--burgundy-50), var(--burgundy-100));
    border: 1px solid var(--burgundy-200);
}

.analytics-change.neutral {
    color: var(--neutral-500);
    background: linear-gradient(135deg, var(--neutral-50), var(--neutral-100));
    border: 1px solid var(--neutral-200);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: var(--z-modal);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.4s ease;
}

.modal-content {
    background: white;
    border-radius: var(--radius-3xl);
    box-shadow: var(--shadow-2xl);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.4s ease;
    border: 1px solid rgba(235, 206, 178, 0.2);
}

.modal-content.large {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-8);
    border-bottom: 3px solid var(--neutral-100);
    background: linear-gradient(135deg, var(--neutral-50), white);
    border-radius: var(--radius-3xl) var(--radius-3xl) 0 0;
}

.modal-header h3 {
    margin: 0;
    color: var(--neutral-900);
    font-size: clamp(var(--text-xl), 3vw, var(--text-2xl));
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--neutral-500);
    cursor: pointer;
    padding: var(--space-3);
    border-radius: var(--radius-xl);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

.modal-close:hover {
    background: linear-gradient(135deg, var(--neutral-100), var(--neutral-200));
    color: var(--neutral-700);
    transform: scale(1.1);
}

.modal-form {
    padding: var(--space-8);
}

.modal-actions {
    display: flex;
    gap: var(--space-4);
    justify-content: flex-end;
    margin-top: var(--space-8);
    padding-top: var(--space-6);
    border-top: 2px solid var(--neutral-100);
}

/* Order Details Content */
.order-details-content {
    padding: var(--space-8);
}

.order-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    margin-bottom: var(--space-8);
}

.order-details-section h4 {
    color: var(--neutral-800);
    margin-bottom: var(--space-4);
    font-size: clamp(var(--text-lg), 2.5vw, var(--text-xl));
    font-weight: 700;
    padding-bottom: var(--space-2);
    border-bottom: 2px solid var(--neutral-200);
}

.order-items-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) 0;
    border-bottom: 2px solid var(--neutral-100);
    transition: var(--transition-fast);
}

.order-item:hover {
    background: linear-gradient(135deg, var(--neutral-50), transparent);
    border-radius: var(--radius-lg);
    padding-left: var(--space-4);
    padding-right: var(--space-4);
}

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

.order-item-info {
    flex: 1;
}

.order-item-name {
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: var(--space-2);
    font-size: var(--text-base);
}

.order-item-details {
    color: var(--neutral-600);
    font-size: var(--text-sm);
}

.order-item-price {
    font-weight: 700;
    color: var(--secondary-600);
    font-family: var(--font-display);
    font-size: var(--text-lg);
}

.payment-screenshot {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    margin-top: var(--space-4);
    border: 2px solid var(--neutral-200);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .admin-nav-section {
        top: var(--header-height-tablet);
    }

    .orders-grid {
        grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    }

    .custom-orders-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    }
}

@media (max-width: 768px) {
    .admin-nav-section {
        top: var(--header-height-mobile);
        padding: var(--space-4) 0;
    }

    .admin-content {
        padding: var(--space-8) 0;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-4);
        text-align: center;
    }

    .orders-grid,
    .custom-orders-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .analytics-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: var(--space-6);
    }

    .order-filters {
        width: 100%;
        justify-content: stretch;
    }

    .order-filters select {
        flex: 1;
    }

    .custom-order-stats {
        width: 100%;
        justify-content: space-around;
        gap: var(--space-4);
    }

    .modal-content {
        width: 95%;
        margin: var(--space-6);
    }

    .order-details-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    /* Make table responsive */
    .products-table-container {
        overflow-x: auto;
    }

    .admin-table {
        min-width: 700px;
    }

    .admin-nav {
        gap: var(--space-2);
    }

    .admin-nav-btn {
        padding: var(--space-3) var(--space-4);
        font-size: var(--text-sm);
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    .admin-nav-section {
        top: var(--header-height-small);
        padding: var(--space-3) 0;
    }

    .admin-header {
        padding: var(--space-12) 0 var(--space-8) 0;
    }

    .admin-nav {
        gap: var(--space-2);
    }

    .admin-nav-btn {
        padding: var(--space-2) var(--space-4);
        font-size: var(--text-xs);
        min-height: 40px;
    }

    .order-card,
    .custom-order-card,
    .analytics-card {
        padding: var(--space-6);
    }

    .modal-content {
        width: 100%;
        height: 100%;
        border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
        max-height: 100vh;
    }

    .modal-form,
    .modal-header,
    .order-details-content {
        padding: var(--space-6);
    }

    .modal-actions {
        flex-direction: column;
        gap: var(--space-3);
    }

    .order-actions {
        flex-direction: column;
        gap: var(--space-2);
    }

    .order-actions .btn {
        min-width: auto;
        width: 100%;
    }

    .custom-order-actions {
        flex-direction: column;
        gap: var(--space-2);
    }

    .custom-order-actions .btn {
        min-width: auto;
        width: 100%;
    }

    .stat-card {
        padding: var(--space-3) var(--space-4);
    }

    .analytics-card {
        padding: var(--space-6);
    }
}

/* Enhanced Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-20px) rotate(120deg);
    }
    66% {
        transform: translateY(10px) rotate(240deg);
    }
}

/* Enhanced Loading states */
.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--neutral-200);
    border-radius: var(--radius-full);
    border-top-color: var(--secondary-600);
    animation: spin 1s ease-in-out infinite;
}

.table-loading {
    text-align: center;
    padding: var(--space-12);
    color: var(--neutral-500);
    font-size: var(--text-lg);
}

/* Enhanced Empty states */
.empty-state {
    text-align: center;
    padding: var(--space-16);
    color: var(--neutral-500);
    background: linear-gradient(135deg, var(--neutral-50), white);
    border-radius: var(--radius-2xl);
    border: 2px solid var(--neutral-100);
    margin: var(--space-8) 0;
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: var(--space-6);
    color: var(--neutral-300);
}

.empty-state h3 {
    color: var(--neutral-600);
    margin-bottom: var(--space-4);
    font-size: var(--text-xl);
    font-weight: 700;
}

.empty-state p {
    margin-bottom: var(--space-8);
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .admin-table th {
        background: var(--neutral-200);
        border-bottom: 3px solid var(--neutral-800);
    }

    .order-card,
    .custom-order-card,
    .analytics-card {
        border: 3px solid var(--neutral-400);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .order-card,
    .custom-order-card,
    .analytics-card,
    .admin-nav-btn,
    .action-btn,
    .stat-card {
        transition: none;
    }

    .order-card:hover,
    .custom-order-card:hover,
    .analytics-card:hover,
    .stat-card:hover,
    .action-btn:hover {
        transform: none;
    }

    .modal.show {
        animation: none;
    }

    .modal-content {
        animation: none;
    }

    .admin-header::before {
        animation: none;
    }
}