/**
 * Commerce Sync Middleware - Local Styles
 * Ergaenzt das ak-systems CSS Framework
 * CDN: https://ak-hosting.github.io/ak-systems-css/css/ak-design-system.css
 */

/* ===================================
   CSS Variables
   =================================== */
:root {
    --status-success: #22c55e;
    --status-warning: #f59e0b;
    --status-error: #ef4444;
    --status-info: #3b82f6;
}

/* ===================================
   Base Styles
   =================================== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #0f172a;
    min-height: 100vh;
}

/* ===================================
   Navigation
   =================================== */
.ak-navbar {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 1rem 2rem;
    border-bottom: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ak-navbar-brand {
    color: #94a3b8;
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none;
}
.ak-navbar-brand a { color: #94a3b8; }
.ak-navbar-brand a:hover { color: #f8fafc; }

.ak-navbar-nav {
    display: flex !important;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ak-navbar-nav a {
    color: #94a3b8;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.ak-navbar-nav a:hover,
.ak-navbar-nav a.active {
    color: #f8fafc;
    background: rgba(255,255,255,0.1);
}

.nav-logout {
    margin-left: auto;
}

.nav-logout a {
    color: #ef4444 !important;
}

.nav-logout a:hover {
    background: rgba(239, 68, 68, 0.15) !important;
}

.ak-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 0.5rem;
    background: none;
    border: none;
}

.ak-hamburger span {
    width: 24px;
    height: 2px;
    background: #f8fafc;
    transition: all 0.3s;
}

.ak-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.ak-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.ak-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===================================
   Layout
   =================================== */
.ak-main {
    padding: 2rem;
}

.ak-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.ak-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

/* ===================================
   Page Header
   =================================== */
.ak-page-header {
    margin-bottom: 2rem;
}

.ak-page-title {
    color: #f8fafc;
    font-size: 1.875rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.ak-page-subtitle {
    color: #94a3b8;
    font-size: 1rem;
    margin: 0;
}

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

/* ===================================
   Cards
   =================================== */
.ak-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.ak-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #334155;
}

.ak-card-title {
    color: #f8fafc;
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.ak-card-content,
.ak-card-body {
    padding: 1.5rem;
}

/* ===================================
   Status Cards & Grid
   =================================== */
.ak-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.ak-status-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #334155;
    border-radius: 0.75rem;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.ak-status-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.ak-status-card.success::before { background: var(--status-success); }
.ak-status-card.warning::before { background: var(--status-warning); }
.ak-status-card.error::before { background: var(--status-error); }
.ak-status-card.info::before { background: var(--status-info); }

.ak-status-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.ak-status-card.success .ak-status-icon { background: rgba(34, 197, 94, 0.2); color: var(--status-success); }
.ak-status-card.warning .ak-status-icon { background: rgba(245, 158, 11, 0.2); color: var(--status-warning); }
.ak-status-card.error .ak-status-icon { background: rgba(239, 68, 68, 0.2); color: var(--status-error); }
.ak-status-card.info .ak-status-icon { background: rgba(59, 130, 246, 0.2); color: var(--status-info); }

.ak-status-label {
    color: #94a3b8;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.ak-status-value {
    color: #f8fafc;
    font-size: 1.5rem;
    font-weight: 600;
}

/* ===================================
   Stat Cards (alternate style)
   =================================== */
.ak-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ak-stat-card {
    background: #1e293b;
    border-radius: 0.5rem;
    padding: 1.25rem;
    text-align: center;
}

.ak-stat-number,
.ak-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #f8fafc;
}

.ak-stat-label {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

.stat-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e2e8f0;
}

.stat-label {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* ===================================
   Tables
   =================================== */
.ak-table-wrapper,
.ak-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ak-table {
    width: 100%;
    border-collapse: collapse;
}

.ak-table th,
.ak-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #334155;
}

.ak-table th {
    color: #94a3b8;
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ak-table td {
    color: #e2e8f0;
}

.ak-table tbody tr:hover {
    background: rgba(255,255,255,0.02);
}

.products-table th,
.products-table td {
    padding: 0.75rem 0.5rem;
    vertical-align: middle;
}

/* ===================================
   Badges
   =================================== */
.ak-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.ak-badge-success { background: rgba(34, 197, 94, 0.2); color: var(--status-success); }
.ak-badge-warning { background: rgba(245, 158, 11, 0.2); color: var(--status-warning); }
.ak-badge-error { background: rgba(239, 68, 68, 0.2); color: var(--status-error); }
.ak-badge-info { background: rgba(59, 130, 246, 0.2); color: var(--status-info); }
.ak-badge-secondary { background: rgba(148, 163, 184, 0.2); color: #94a3b8; }
.ak-badge-danger { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.ak-badge-default { background: #475569; color: white; }

/* ===================================
   Buttons
   =================================== */
.ak-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 0.875rem;
    text-decoration: none;
}

.ak-btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.ak-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
}

.ak-btn-secondary {
    background: #334155;
    color: #e2e8f0;
}

.ak-btn-secondary:hover {
    background: #475569;
}

.ak-btn-warning {
    background: #f59e0b;
    color: #0f172a;
}

.ak-btn-warning:hover {
    background: #d97706;
}

.ak-btn-danger {
    background: #ef4444;
    color: #ffffff;
}

.ak-btn-danger:hover {
    background: #dc2626;
}

#delete-modal .modal-content {
    background: #1e293b;
    color: #e2e8f0;
}

#delete-modal h3 {
    color: #f8fafc;
    margin: 0 0 8px;
}

#delete-modal p {
    color: #e2e8f0;
}

#delete-confirm-input {
    background: #0f172a;
    border: 1px solid #475569;
    color: #e2e8f0;
    padding: 0.5rem;
    border-radius: 0.375rem;
}

.ak-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.ak-btn-sm,
.ak-btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.ak-btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
}

.ak-btn-icon {
    background: #334155;
    color: #e2e8f0;
    border: none;
    border-radius: 0.375rem;
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 32px;
}

.ak-btn-icon:hover {
    background: #475569;
}

.ak-btn-icon:active {
    transform: scale(0.95);
}

.ak-btn-set {
    background: #22c55e;
    color: white;
}

.ak-btn-set:hover {
    background: #16a34a;
}

/* ===================================
   Alerts
   =================================== */
.ak-alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.ak-alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.ak-alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

/* ===================================
   Empty State
   =================================== */
.ak-empty {
    text-align: center;
    padding: 3rem;
    color: #64748b;
}

.ak-empty-state {
    text-align: center;
    padding: 3rem;
    color: #94a3b8;
}

.ak-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.ak-empty-state h4 {
    color: #f8fafc;
    margin-bottom: 0.5rem;
}

/* ===================================
   Footer
   =================================== */
.ak-footer {
    text-align: center;
    padding: 1.5rem;
    color: #475569;
    font-size: 0.7rem;
    font-weight: 300;
    border-top: 1px solid #1e293b;
    margin-top: 3rem;
}

/* ===================================
   Log Entries
   =================================== */
.ak-log-entry {
    padding: 0.75rem 1rem;
    border-left: 3px solid #334155;
    margin-bottom: 0.5rem;
    background: rgba(0,0,0,0.2);
    border-radius: 0 0.375rem 0.375rem 0;
    font-family: monospace;
    font-size: 0.875rem;
    color: #e2e8f0;
}

.ak-log-entry.info { border-left-color: var(--status-info); }
.ak-log-entry.success { border-left-color: var(--status-success); }
.ak-log-entry.warning { border-left-color: var(--status-warning); }
.ak-log-entry.error { border-left-color: var(--status-error); }

.ak-log-time {
    color: #64748b;
    margin-right: 1rem;
}

.ak-log-message {
    color: #e2e8f0;
}

.log-row.error {
    background: rgba(239, 68, 68, 0.1);
}

.log-row.warning {
    background: rgba(245, 158, 11, 0.1);
}

.log-details {
    font-size: 0.8rem;
}

.detail-item {
    display: inline-block;
    background: #1e293b;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

.detail-key {
    color: #94a3b8;
}

.detail-value {
    color: #e2e8f0;
    font-weight: 500;
}

/* ===================================
   Spinner
   =================================== */
.ak-spinner,
.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #334155;
    border-top-color: #6366f1;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===================================
   Links
   =================================== */
.ak-link {
    color: #3b82f6;
    text-decoration: none;
}

.ak-link:hover {
    text-decoration: underline;
}

.ak-action-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.ak-action-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid #334155;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
}

.ak-action-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.ak-action-title {
    color: #f8fafc;
    font-size: 0.95rem;
    font-weight: 600;
}

.ak-action-desc {
    color: #94a3b8;
    font-size: 0.85rem;
}

.ak-action-controls {
    margin-top: 0.5rem;
}

.ak-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid #334155;
    padding-bottom: 0.5rem;
}

.ak-tab {
    background: #334155;
    color: #e2e8f0;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.ak-tab.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
}

.ak-tab-panels {
    margin-top: 1rem;
}

.ak-tab-panel {
    display: none;
}

.ak-tab-panel.active {
    display: block;
}

/* ===================================
   Code
   =================================== */
code {
    background: #1e293b;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-family: monospace;
    font-size: 0.8rem;
    color: #e2e8f0;
}

/* ===================================
   Text Utilities
   =================================== */
.text-muted {
    color: #64748b;
}

.small {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* ===================================
   Filter Form
   =================================== */
.filter-card {
    margin-bottom: 1.5rem;
}

.filter-form {
    padding: 1rem;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filter-group label {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
}

.filter-group select,
.filter-group input[type="text"] {
    background: #1e293b;
    border: 1px solid #475569;
    border-radius: 0.375rem;
    color: #e2e8f0;
    padding: 0.5rem;
    min-width: 140px;
}

.filter-group select:focus,
.filter-group input[type="text"]:focus {
    outline: none;
    border-color: #3b82f6;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 1rem;
    border-top: 1px solid #334155;
}

.ak-header-actions {
    display: flex;
    gap: 0.5rem;
}

/* ===================================
   Batch Actions
   =================================== */
.batch-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #1e3a5f;
    border-bottom: 1px solid #334155;
}

.batch-info {
    color: #e2e8f0;
    font-weight: 500;
}

.batch-buttons {
    display: flex;
    gap: 0.5rem;
}

.checkbox-cell {
    text-align: center;
    vertical-align: middle;
}

.product-checkbox,
#select-all {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ===================================
   Inventory Controls
   =================================== */
.inventory-controls {
    min-width: 280px;
}

.inventory-adjust-group {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.inventory-input {
    width: 60px;
    background: #1e293b;
    border: 1px solid #475569;
    border-radius: 0.375rem;
    color: #e2e8f0;
    padding: 0.375rem 0.5rem;
    text-align: center;
    font-size: 0.875rem;
}

.inventory-input:focus {
    outline: none;
    border-color: #3b82f6;
}

.inventory-display {
    font-weight: 600;
    font-size: 1rem;
}

.inventory-display.updating {
    opacity: 0.5;
}

.inventory-display.success {
    color: #22c55e;
    animation: flash 0.5s;
}

.inventory-display.error {
    color: #ef4444;
}

@keyframes flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===================================
   Toast Notifications
   =================================== */
.inventory-toast,
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    color: #e2e8f0;
    font-size: 0.875rem;
    opacity: 0;
    transform: translateY(1rem);
    transition: all 0.3s;
    z-index: 1000;
    max-width: 300px;
}

.inventory-toast.show,
.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.inventory-toast.success,
.toast.success {
    border-color: #22c55e;
}

.inventory-toast.error,
.toast.error {
    border-color: #ef4444;
}

/* ===================================
   Action Cell
   =================================== */
.action-cell {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ===================================
   Product Detail Page
   =================================== */
.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 1.5rem;
}

.product-form {
    padding: 1.5rem;
}

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

.form-group label {
    display: block;
    color: #e2e8f0;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    background: #1e293b;
    border: 1px solid #475569;
    border-radius: 0.375rem;
    color: #e2e8f0;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
}

.form-control[readonly] {
    background: #0f172a;
    color: #94a3b8;
}

.textarea-large {
    min-height: 150px;
    resize: vertical;
    font-family: monospace;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-hint {
    color: #64748b;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #334155;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    color: #f8fafc;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    accent-color: #6366f1;
}

.help-text {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0.5rem;
    margin-left: 1.75rem;
}

/* ===================================
   Channel Management
   =================================== */
.channel-list {
    padding: 1rem;
}

.channel-item {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.channel-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.channel-name {
    font-weight: 600;
    color: #e2e8f0;
}

.channel-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.channel-status.active {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.channel-status.inactive {
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
}

.channel-actions {
    display: flex;
    justify-content: flex-end;
}

.channel-sync-info {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.channel-sync-info small {
    color: #64748b;
    font-size: 0.7rem;
}

.channel-error {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 0.25rem;
}

.channel-error small {
    color: #ef4444;
    font-size: 0.75rem;
}

.channel-actions-footer {
    padding: 1rem;
    border-top: 1px solid #334155;
}

.channel-loading {
    padding: 1rem;
    text-align: center;
    color: #64748b;
}

.shopify-channel-item {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shopify-channel-item .channel-name {
    font-size: 0.85rem;
}

.shopify-channel-item .channel-app {
    font-size: 0.7rem;
    color: #64748b;
}

.channel-published {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
}

.channel-published.yes {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.channel-published.no {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.channels-summary {
    padding: 0.5rem 1rem;
    background: #0f172a;
    border-radius: 0.25rem;
    margin: 0.5rem 1rem 1rem;
    font-size: 0.75rem;
    color: #94a3b8;
}

/* ===================================
   Toggle Switch
   =================================== */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #475569;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #e2e8f0;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background: #22c55e;
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* ===================================
   Info List
   =================================== */
.info-list {
    padding: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #1e293b;
}

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

.info-label {
    color: #94a3b8;
    font-size: 0.8rem;
}

.info-value {
    color: #e2e8f0;
    font-size: 0.875rem;
    text-align: right;
}

/* ===================================
   Image Gallery
   =================================== */
.image-gallery {
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.gallery-thumb {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 0.375rem;
    border: 1px solid #334155;
}

.gallery-more {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1e293b;
    border-radius: 0.375rem;
    color: #64748b;
    font-size: 0.875rem;
    aspect-ratio: 1;
}

.product-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 0.25rem;
}

.product-thumb-placeholder {
    width: 40px;
    height: 40px;
    background: #334155;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 0.75rem;
}

/* ===================================
   Modal
   =================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 0.75rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #334155;
}

.modal-header h3 {
    margin: 0;
    color: #f8fafc;
}

.modal-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-close:hover {
    color: #f8fafc;
}

.modal-body {
    padding: 1.5rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #334155;
}

.detail-label {
    color: #94a3b8;
}

/* ===================================
   Upload Area
   =================================== */
.upload-area {
    border: 2px dashed #334155;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #0f172a;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
}

.upload-area h3 {
    color: #f8fafc;
    margin: 0.5rem 0;
}

.upload-area p {
    color: #cbd5e1;
    margin: 0.5rem 0;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upload-hint {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 1.5rem;
}

.file-info {
    margin-top: 1rem;
    padding: 1rem;
    background: #1e293b;
    border-radius: 8px;
    color: #f8fafc;
}

.file-info-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.file-size {
    color: #94a3b8;
    margin-left: 1rem;
}

.upload-actions {
    margin-top: 1.5rem;
    text-align: center;
}

.upload-progress {
    margin-top: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #1e293b;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #6366f1;
    width: 0%;
    transition: width 0.3s ease;
    animation: progress-animation 1.5s ease-in-out infinite;
}

@keyframes progress-animation {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

.progress-text {
    text-align: center;
    margin-top: 0.5rem;
    color: #94a3b8;
}

/* ===================================
   Instructions & Info
   =================================== */
.instruction-list {
    line-height: 2;
    padding-left: 1.5rem;
    margin: 0;
    color: #e2e8f0;
}

.ak-info-box {
    background: #1e293b;
    border-radius: 8px;
    padding: 1rem;
    font-size: 0.9rem;
    margin-top: 1.5rem;
    border-left: 3px solid #6366f1;
    color: #e2e8f0;
}

/* ===================================
   Action Bar
   =================================== */
.ak-action-bar {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ===================================
   Error Lists
   =================================== */
.error-list {
    margin: 0;
    padding-left: 1.5rem;
    color: #ef4444;
}

.error-list li {
    margin: 0.25rem 0;
}

.result-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.result-errors {
    text-align: left;
    margin-top: 1rem;
    background: rgba(239, 68, 68, 0.1);
    padding: 1rem;
    border-radius: 8px;
}

.result-errors ul {
    color: #ef4444;
    margin: 0.5rem 0 0;
    padding-left: 1.5rem;
}

/* ===================================
   Order Details
   =================================== */
.customer-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.customer-name {
    font-weight: 500;
    color: #f8fafc;
}

.customer-email {
    font-size: 0.75rem;
    color: #94a3b8;
}

.order-amount {
    font-weight: 500;
    color: #10b981;
}

.items-count {
    background: #334155;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 768px) {
    .ak-navbar {
        flex-wrap: wrap;
        padding: 1rem;
    }
    
    .ak-hamburger {
        display: flex;
    }
    
    .ak-navbar-nav {
        display: none !important;
        flex-direction: column;
        width: 100%;
        gap: 0;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid #334155;
    }
    
    .ak-navbar-nav.open {
        display: flex !important;
    }
    
    .ak-navbar-nav li {
        width: 100%;
    }
    
    .ak-navbar-nav a {
        display: block;
        padding: 0.75rem 1rem;
        border-radius: 0.375rem;
    }
    
    .ak-main {
        padding: 1rem;
    }
    
    .ak-page-title {
        font-size: 1.5rem;
    }
    
    .ak-page-subtitle {
        font-size: 0.875rem;
    }
    
    .ak-status-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .ak-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ak-grid-2,
    .ak-grid-4 {
        grid-template-columns: 1fr;
    }
    
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ak-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .ak-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .ak-status-card {
        padding: 1rem;
    }
    
    .ak-status-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .ak-status-value {
        font-size: 1.25rem;
    }
    
    .ak-table th,
    .ak-table td {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .ak-badge {
        padding: 0.2rem 0.5rem;
        font-size: 0.7rem;
    }
    
    .ak-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        width: 100%;
        justify-content: center;
    }
    
    .ak-log-entry {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .ak-log-time {
        display: block;
        margin-bottom: 0.25rem;
        margin-right: 0;
    }
    
    .ak-empty {
        padding: 2rem 1rem;
    }
    
    .ak-footer {
        padding: 1rem;
        margin-top: 2rem;
    }
    
    .filter-row {
        flex-direction: column;
    }
    
    .filter-group select,
    .filter-group input[type="text"] {
        width: 100%;
    }
    
    .inventory-controls {
        min-width: auto;
    }
    
    .inventory-adjust-group {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    
    .ak-btn-icon {
        padding: 0.5rem;
        min-width: 36px;
    }
    
    .inventory-input {
        width: 50px;
    }
    
    .product-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .ak-navbar-brand {
        font-size: 1rem;
    }
    
    .ak-page-title {
        font-size: 1.25rem;
    }
    
    .ak-card-title {
        font-size: 1rem;
    }
    
    .ak-status-value,
    .ak-stat-value {
        font-size: 1.125rem;
    }
}

@media (max-width: 1024px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   Authentication Pages
   =================================== */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}

.auth-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 1rem;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.auth-card-wide {
    max-width: 700px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    color: #f8fafc;
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.auth-header p {
    color: #94a3b8;
    margin: 0;
}

.auth-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-icon svg {
    color: white;
}

.auth-form .form-group {
    margin-bottom: 1.25rem;
}

.auth-form label {
    display: block;
    color: #e2e8f0;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
    width: 100%;
    padding: 0.875rem 1rem;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    color: #f8fafc;
    font-size: 1rem;
    transition: all 0.2s;
}

.auth-form input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.auth-form input::placeholder {
    color: #64748b;
}

.auth-form small {
    display: block;
    color: #64748b;
    font-size: 0.75rem;
    margin-top: 0.375rem;
}

.auth-form .btn-block {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.auth-content {
    color: #cbd5e1;
    line-height: 1.6;
}

.auth-content p {
    margin-bottom: 1rem;
}

.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #334155;
}

.text-link {
    color: #22c55e;
    text-decoration: none;
}

.text-link:hover {
    text-decoration: underline;
}

.text-muted {
    color: #64748b;
    font-size: 0.875rem;
}

.info-box {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.info-box ol {
    margin: 0.5rem 0 0 1.25rem;
    padding: 0;
}

.info-box li {
    margin: 0.5rem 0;
}

/* TOTP Setup */
.totp-setup {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.totp-instructions h3 {
    color: #f8fafc;
    font-size: 1rem;
    margin: 0 0 1rem 0;
}

.totp-instructions ol {
    margin: 0;
    padding: 0 0 0 1.25rem;
    color: #cbd5e1;
}

.totp-instructions li {
    margin: 1rem 0;
    line-height: 1.5;
}

.totp-instructions li strong {
    color: #f8fafc;
}

.app-suggestions {
    display: block;
    color: #64748b;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.manual-entry {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #334155;
}

.secret-code {
    display: block;
    background: #0f172a;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    font-family: monospace;
    font-size: 0.875rem;
    color: #22c55e;
    word-break: break-all;
    margin-top: 0.5rem;
}

.qr-container {
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.qr-image {
    display: block;
    width: 200px;
    height: 200px;
}

.totp-qr {
    text-align: center;
}

.totp-qr .form-group input {
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 0.5rem;
    font-family: monospace;
}

/* Progress Steps */
.auth-progress {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #334155;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #334155;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
}

.step-label {
    color: #64748b;
    font-size: 0.75rem;
    text-align: center;
}

.progress-step.active .step-number {
    background: #22c55e;
    color: white;
}

.progress-step.active .step-label {
    color: #22c55e;
}

.progress-step.completed .step-number {
    background: #16a34a;
    color: white;
}

.progress-step.completed .step-label {
    color: #94a3b8;
}

@media (max-width: 700px) {
    .totp-setup {
        grid-template-columns: 1fr;
    }
    
    .totp-qr {
        order: -1;
    }
    
    .auth-card-wide {
        max-width: 420px;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 1rem;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
    
    .progress-step {
        flex: none;
    }
    
    .step-label {
        display: none;
    }
}
.ak-navbar-item { color: #94a3b8; }
.ak-navbar-item:hover,
.ak-navbar-item.active { color: #f8fafc; background: rgba(255,255,255,0.1); }
