/* SoleTrack Premium Glassmorphism Design System */

:root {
    --bg-main: #090d16;
    --bg-card: rgba(17, 25, 40, 0.75);
    --bg-sidebar: #0e1322;
    --border-color: rgba(255, 255, 255, 0.075);
    --primary: #06b6d4;
    --primary-hover: #0891b2;
    --primary-glow: rgba(6, 182, 212, 0.15);
    --success: #10b981;
    --success-hover: #059669;
    --success-glow: rgba(16, 185, 129, 0.15);
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --sidebar-width: 260px;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ==================== TYPOGRAPHY & COMMON ==================== */
h1, h2, h3, h4 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--primary-hover);
}

.mt-4 { margin-top: 1.5rem; }

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-sans);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 10px var(--primary-glow);
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success);
    color: #fff;
    box-shadow: 0 0 10px var(--success-glow);
}
.btn-success:hover {
    background: var(--success-hover);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}
.btn-danger:hover {
    background: var(--danger-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border-color: var(--border-color);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

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

.btn-block {
    display: width;
    width: 100%;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    transition: var(--transition);
}
.btn-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* ==================== FORMS ==================== */
.form-group {
    margin-bottom: 1.2rem;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
    font-family: var(--font-sans);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .col {
    flex: 1;
}

.field-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

.input-action-wrapper {
    display: flex;
    gap: 0.5rem;
}
.input-action-wrapper input {
    flex: 1;
}

.input-highlight {
    font-size: 1.5rem !important;
    font-weight: 600;
    text-align: right;
    color: var(--primary);
    border-color: rgba(6, 182, 212, 0.3) !important;
    background: rgba(6, 182, 212, 0.03) !important;
}
.input-highlight:focus {
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.25);
}

.form-divider {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 1.5rem 0;
}

/* ==================== AUTH SCREEN ==================== */
.auth-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 10% 20%, rgb(4, 8, 17) 0%, rgb(15, 23, 42) 90%);
    padding: 1rem;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.auth-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 440px;
    padding: 2.5rem;
    display: none;
    animation: fadeIn 0.4s ease;
}

.auth-card.active {
    display: block;
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.shoe-icon {
    color: var(--primary);
    filter: drop-shadow(0 0 5px var(--primary-glow));
}

.auth-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.auth-header p {
    font-size: 0.9rem;
}

.auth-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.2rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.question-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.8rem 1rem;
    font-weight: 500;
    color: var(--text-main);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== APP SYSTEM LAYOUT ==================== */
.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    padding: 1.5rem;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.4rem;
    font-weight: 700;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.shop-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    margin-bottom: 1.5rem;
}

.shop-badge-icon {
    font-size: 1.4rem;
}

.shop-badge-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.shop-badge-info p {
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.8rem 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
}

.nav-item.active {
    background: var(--primary-glow);
    color: var(--primary);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--primary);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: radial-gradient(ellipse at top right, rgb(13, 20, 36) 0%, rgb(9, 13, 22) 100%);
    padding: 2rem;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-shrink: 0;
}

.main-header h1 {
    font-size: 1.8rem;
}

.barcode-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 50px;
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    color: var(--success);
    font-weight: 500;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 1.6s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* ==================== PANELS & CARDS ==================== */
.tab-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-header h2 {
    font-size: 1.25rem;
}

.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
}

.badge-info {
    background: rgba(6, 182, 212, 0.1);
    color: var(--primary);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

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

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.stat-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

.stat-icon.sales { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.stat-icon.orders { background: rgba(99, 102, 241, 0.1); color: #6366f1; }
.stat-icon.products { background: rgba(6, 182, 212, 0.1); color: var(--primary); }
.stat-icon.customers { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }

.stat-details h3 {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
}

.stat-val {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 0.2rem;
}

.dashboard-details {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

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

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.action-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
}

.action-btn:hover {
    background: var(--primary-glow);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.action-icon {
    font-size: 1.8rem;
}

.action-btn span:last-child {
    font-size: 0.85rem;
    font-weight: 500;
}

/* ==================== TABLES ==================== */
.table-card {
    padding: 0;
    overflow: hidden;
}

.table-toolbar {
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.search-filter-group {
    flex: 1;
    max-width: 400px;
}

.search-filter-group input {
    width: 100%;
}

.table-container {
    overflow-x: auto;
    width: 100%;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th, .data-table td {
    padding: 1rem 1.75rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.data-table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.01);
}

.data-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}
.data-table th.sortable:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
}

.data-table tbody tr {
    transition: var(--transition);
}

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

.data-table td {
    color: var(--text-main);
}

/* Table action buttons */
.table-actions {
    display: flex;
    gap: 0.5rem;
}

/* ==================== ORDER CREATION FORM ==================== */
.order-card {
    max-width: 1000px;
    margin: 0 auto;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.form-section {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-main);
}

.section-num {
    background: var(--primary-glow);
    color: var(--primary);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.order-pricing-section {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.pricing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.pricing-label h3 {
    font-size: 1.1rem;
    color: var(--text-main);
}

.pricing-label p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.pricing-input {
    width: 200px;
}

.order-actions-bar {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Autocomplete Dropdown List */
.autocomplete-container {
    position: relative;
}

.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0f172a;
    border: 1px solid var(--border-color);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: var(--shadow);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.autocomplete-suggestions.active {
    display: block;
}

.suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.suggestion-item:hover {
    background: var(--primary-glow);
    color: var(--primary);
}

.suggestion-item strong {
    color: var(--text-main);
}

/* ==================== FILTERS & REPORTS ==================== */
.filter-card {
    padding: 1.5rem;
}

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

.filter-group {
    flex: 1;
    min-width: 180px;
}

.filter-actions {
    display: flex;
    gap: 0.75rem;
}

.sales-summary-box {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.summary-label {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-muted);
}

.summary-val {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--success);
    text-shadow: 0 0 10px var(--success-glow);
}

/* ==================== SETTINGS & PROFILE ==================== */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 768px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== MODALS ==================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 500px;
    padding: 2rem;
    position: relative;
    animation: fadeIn 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}
.modal-close:hover {
    color: var(--text-main);
}

.modal h2 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.25rem;
}
