/* Custom Premium CSS for Shopify Laravel Dashboard */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-primary: #fbfaf7;
    --bg-secondary: #f4f1ea;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(24, 24, 27, 0.08);
    --glass-highlight: rgba(24, 24, 27, 0.12);
    --text-primary: #18181b;
    --text-secondary: #71717a;
    --accent-gradient: linear-gradient(135deg, #18181b, #27272a);
    --success-gradient: linear-gradient(135deg, #10b981, #059669);
    --danger-gradient: linear-gradient(135deg, #ef4444, #dc2626);
    --warning-gradient: linear-gradient(135deg, #f59e0b, #d97706);
    --info-gradient: linear-gradient(135deg, #0ea5e9, #2563eb);
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --shadow-premium: 0 8px 30px 0 rgba(27, 25, 22, 0.06);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    min-height: 100vh;
    font-family: var(--font-sans);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Glassmorphism Card Style */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
}
.glass-card:hover {
    border-color: var(--glass-highlight);
    transform: translateY(-2px);
}

/* Layout Grid */
.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--glass-border);
    backdrop-filter: blur(24px);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.brand-logo {
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 20px;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.brand-name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #18181b, #71717a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid var(--glass-border);
}

.avatar-placeholder {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #fff;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
}

.user-role {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition-smooth);
}

.nav-item a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active a {
    color: #fff;
    background: var(--accent-gradient);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.25);
}

.logout-section {
    margin-top: auto;
}

/* Main Content Styling */
.main-content {
    flex-grow: 1;
    margin-left: 280px;
    padding: 40px 48px;
    min-height: 100vh;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.page-title h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.page-title p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
    color: #fff;
}

.btn-primary {
    background: var(--accent-gradient);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success-gradient);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}
.btn-success:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger-gradient);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
}
.btn-danger:hover {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Metrics Dashboard Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.metric-card {
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -1px;
}

.metric-value.positive {
    color: #10b981;
}

.metric-value.negative {
    color: #ef4444;
}

.metric-footer {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* Dashboard Bottom Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

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

/* Table Design */
.table-wrapper {
    overflow-x: auto;
}

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

table.premium-table th {
    padding: 16px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--glass-border);
}

table.premium-table td {
    padding: 16px;
    border-bottom: 1px solid var(--glass-border);
    font-size: 14px;
    vertical-align: middle;
}

table.premium-table tr:last-child td {
    border-bottom: none;
}

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

/* Status Badges */
.badge {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-pending {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-confirmed {
    background: rgba(14, 165, 233, 0.15);
    color: #0ea5e9;
    border: 1px solid rgba(14, 165, 233, 0.3);
}

.badge-shipped {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.badge-delivered {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-returned {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-cancelled {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    outline: none;
    transition: var(--transition-smooth);
}

.form-control:focus {
    border-color: #18181b;
    box-shadow: 0 0 10px rgba(24, 24, 27, 0.05);
    background: #fff;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    width: 100%;
    max-width: 500px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow-premium);
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    padding: 24px;
}

/* Alerts */
.alert {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Real-time Order Alert Notification Box */
#realtime-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--glass-bg);
    border: 2px solid #a855f7;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    z-index: 10000;
    width: 320px;
    backdrop-filter: blur(25px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transform: translateY(150%);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#realtime-toast.show {
    transform: translateY(0);
}

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

.toast-title {
    font-weight: 700;
    color: #a855f7;
    font-size: 15px;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 18px;
}

.toast-body {
    font-size: 13px;
    color: var(--text-primary);
}

/* Pagination design */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
}

.pagination-links {
    display: flex;
    gap: 6px;
}

.pagination-links a, .pagination-links span {
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    font-size: 13px;
}

.pagination-links a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.pagination-links .active {
    background: var(--accent-gradient);
    color: #fff;
    border: none;
}

/* Details Page styling */
.details-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 32px;
}

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

.order-items-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.order-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.item-info {
    display: flex;
    flex-direction: column;
}

.item-name {
    font-weight: 600;
}

.item-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.item-total {
    font-weight: 700;
}
