/* Shared leftovers + Admin styles. Customer chrome lives in crystal-*.css */

:root {
  --admin-primary: #0d1b2a;
  --admin-primary-light: #1b263b;
  --admin-accent: #c9a227;
  --admin-accent-light: rgba(201, 162, 39, 0.1);
  --admin-success: #10b981;
  --admin-warning: #f59e0b;
  --admin-danger: #ef4444;
  --admin-info: #3b82f6;
  --admin-text: #1a1a1a;
  --admin-muted: #718096;
  --admin-radius: 12px;
  --admin-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

body {
  margin: 0;
}

/* Admin button helpers (customer styles live under .customer-shell) */
.btn-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--admin-accent);
  color: var(--admin-primary);
  border: 2px solid var(--admin-accent);
  border-radius: var(--admin-radius);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-accent:hover {
  background: #dbb42f;
  border-color: #dbb42f;
  color: var(--admin-primary);
}

.btn-accent:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Admin sidebar: white to match the rest of the admin UI */
.admin-sidebar {
  background: #ffffff !important;
  color: var(--admin-primary);
  border-right: 1px solid #e2e8f0;
}

.admin-sidebar .sidebar-header,
.admin-sidebar .sidebar-footer {
  background: #ffffff;
  border-color: #e2e8f0;
}

.admin-sidebar .sidebar-brand {
  color: var(--admin-primary);
}

.admin-sidebar .btn-collapse {
  color: #64748b;
}

.admin-sidebar .btn-collapse:hover {
  background: #f8fafc;
  color: var(--admin-primary);
}

.admin-sidebar .sidebar-footer .nav-link {
  color: #64748b;
}

.admin-sidebar .sidebar-footer .nav-link:hover {
  background: #f8fafc;
  color: var(--admin-primary);
}

.admin-sidebar .sidebar-nav .nav-link:hover {
  background: #f8fafc;
  color: var(--admin-primary);
}

/* Admin keeps its own button/card look via AdminLayout.razor.css + these helpers */
.admin-card {
  background: white;
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-shadow);
  padding: 1.5rem;
}

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

.admin-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

.stat-card {
  background: white;
  border-radius: var(--admin-radius);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--admin-shadow);
  height: 100%;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.stat-icon.primary { background: var(--admin-accent-light); color: var(--admin-accent); }
.stat-icon.success { background: rgba(16, 185, 129, 0.1); color: var(--admin-success); }
.stat-icon.warning { background: rgba(245, 158, 11, 0.1); color: var(--admin-warning); }
.stat-icon.info { background: rgba(59, 130, 246, 0.1); color: var(--admin-info); }

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--admin-text);
  line-height: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--admin-muted);
  margin-top: 0.25rem;
}

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

.table-admin th {
  background: #f8fafc;
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--admin-muted);
  border-bottom: 1px solid #e2e8f0;
}

.table-admin td {
  padding: 1rem;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

.table-admin tbody tr:hover {
  background: #f8fafc;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-status.pending { background: rgba(245, 158, 11, 0.1); color: var(--admin-warning); }
.badge-status.confirmed { background: rgba(16, 185, 129, 0.1); color: var(--admin-success); }
.badge-status.cancelled { background: rgba(239, 68, 68, 0.1); color: var(--admin-danger); }
.badge-status.active { background: rgba(59, 130, 246, 0.1); color: var(--admin-info); }

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
}

.page-subtitle {
  color: var(--admin-muted);
  margin: 0.25rem 0 0 0;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--admin-primary);
  border: 2px solid #e2e8f0;
  border-radius: var(--admin-radius);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn-outline:hover {
  border-color: var(--admin-accent);
  color: var(--admin-primary);
}

/* Address autocomplete (Places API suggestions) — admin + customer */
.address-autocomplete {
  position: relative;
  width: 100%;
}

.address-autocomplete .form-control {
  width: 100%;
}

.address-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 1080;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

.address-suggestions li {
  padding: 0.65rem 0.9rem;
  cursor: pointer;
  color: #1a1a1a;
  font-size: 0.925rem;
  line-height: 1.35;
}

.address-suggestions li:hover,
.address-suggestions li.active {
  background: #f1f5f9;
}

.customer-shell .address-suggestions {
  border-color: var(--glass-border, rgba(255, 255, 255, 0.18));
  background: var(--glass-strong, rgba(18, 24, 38, 0.92));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
}

.customer-shell .address-suggestions li {
  color: var(--text, #f8fafc);
}

.customer-shell .address-suggestions li:hover,
.customer-shell .address-suggestions li.active {
  background: color-mix(in srgb, var(--accent, #c9a227) 18%, transparent);
}

/* === AdminLayout (ported from Blazor) === */
/* ═══════════════════════════════════════════════════════════════
   ADMIN LAYOUT - Professional Dashboard Design
   ═══════════════════════════════════════════════════════════════ */

:root {
    --admin-sidebar-width: 260px;
    --admin-sidebar-collapsed: 70px;
    --admin-header-height: 64px;
    --admin-primary: #1a1f36;
    --admin-primary-light: #252b48;
    --admin-accent: #c9a227;
    --admin-accent-hover: #dbb42f;
    --admin-text: #e2e8f0;
    --admin-text-muted: #94a3b8;
    --admin-border: #334155;
    --admin-bg: #f8fafc;
    --admin-card: #ffffff;
    --admin-success: #10b981;
    --admin-warning: #f59e0b;
    --admin-danger: #ef4444;
    --admin-info: #3b82f6;
}

/* Wrapper */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--admin-bg);
    overflow-x: hidden;
    width: 100%;
}

/* ═══ SIDEBAR ═══ */
.admin-sidebar {
    width: var(--admin-sidebar-width);
    background: #ffffff;
    color: var(--admin-primary);
    display: flex;
    flex-direction: column;
/*    position: fixed;*/
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1050;
    transition: width 0.3s ease, transform 0.3s ease;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    border-right: 1px solid #e2e8f0;
}

.admin-sidebar.collapsed {
    width: var(--admin-sidebar-collapsed);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    min-height: var(--admin-header-height);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    color: var(--admin-primary);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
    font-family: 'Playfair Display', serif;
    letter-spacing: 0.5px;
}

.sidebar-brand i {
    color: var(--admin-accent);
    font-size: 1.5rem;
}

.btn-collapse {
    background: transparent;
    border: none;
    color: #64748b;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-collapse:hover {
    background: var(--admin-bg);
    color: var(--admin-primary);
}

/* Sidebar Navigation */
.sidebar-nav {
    background: white;
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.sidebar-nav .nav {
    padding: 0 0.75rem;
}

.sidebar-nav .nav-item {
    margin-bottom: 2px;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--admin-text-muted);
    border-radius: 8px;
    transition: all 0.2s;
    text-decoration: none;
    gap: 0.75rem;
}

.sidebar-nav .nav-link i {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-nav .nav-link:hover {
    background: var(--admin-bg);
    color: var(--admin-primary);
}

.sidebar-nav .nav-link.active {
    background: var(--admin-accent);
    color: var(--admin-primary);
    font-weight: 500;
}

.sidebar-nav .nav-link.active i {
    color: var(--admin-primary);
}

.nav-section {
    padding: 1rem 1rem 0.5rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--admin-text-muted);
    font-weight: 600;
}

.admin-sidebar.collapsed .nav-section span {
    display: none;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}

.sidebar-footer .nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #64748b;
    border-radius: 8px;
    transition: all 0.2s;
    text-decoration: none;
    gap: 0.75rem;
}

.sidebar-footer .nav-link:hover {
    background: var(--admin-bg);
    color: var(--admin-primary);
}

/* ═══ MAIN CONTENT AREA ═══ */
.admin-main {
    flex: 1;
    /* margin handled by flex */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0; /* Prevent flex item overflow */
    transition: margin-left 0.3s ease;
    width: auto;
}

/* When sidebar is collapsed */
.admin-wrapper.sidebar-collapsed .admin-sidebar { width: var(--admin-sidebar-collapsed); }

/* ═══ HEADER ═══ */
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    height: var(--admin-header-height);
    background: var(--admin-card);
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-menu {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--admin-primary);
    cursor: pointer;
    padding: 0.25rem;
}

.breadcrumb {
    font-size: 0.875rem;
}

.breadcrumb-item a {
    color: var(--admin-text-muted);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--admin-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-search {
    position: relative;
}

.header-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--admin-text-muted);
}

.header-search input {
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    width: 240px;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.header-search input:focus {
    outline: none;
    border-color: var(--admin-accent);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.1);
}

.btn-icon {
    position: relative;
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: var(--admin-text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--admin-bg);
    color: var(--admin-primary);
}

.btn-icon .badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--admin-danger);
    color: white;
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
    border-radius: 10px;
}

.btn-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-user:hover {
    background: var(--admin-bg);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--admin-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.user-name {
    font-weight: 500;
    color: var(--admin-primary);
}

/* ═══ CONTENT ═══ */
.admin-content {
    flex: 1;
    padding: 1.5rem;
    overflow-x: auto;
    max-width: 100%;
}

/* Ensure tables don't overflow */
.admin-content .table-responsive,
.admin-content table {
    max-width: 100%;
}

/* Mobile Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 991.98px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    
    .admin-sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .sidebar-overlay {
        display: block;
    }
}

@media (max-width: 767.98px) {
    .admin-header {
        padding: 0 1rem;
    }
    
    .admin-content {
        padding: 1rem;
    }
}

