@import url('../../css/styles.css');

/* Customer Dashboard Layout overlaying main site styles */
:root {
  --sidebar-w: 240px;
  --topbar-h: 70px;
}

body.dashboard-body {
  margin: 0;
  padding: 0;
  background-color: var(--clr-bg-2, #FAF5F0);
  font-family: var(--ff-body, 'Jost', sans-serif);
  color: var(--clr-dark, #3A2E28);
}

.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.cust-sidebar {
  width: var(--sidebar-w);
  background-color: #fff;
  border-right: 1px solid var(--clr-border, rgba(139,105,20,0.15));
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}
.cust-sidebar-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(2px);
  z-index: 95; opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.cust-sidebar-overlay.open { opacity: 1; pointer-events: all; }
.cust-sidebar-logo {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  padding: 0 24px;
  border-bottom: 1px solid var(--clr-border);
  text-decoration: none;
  gap: 12px;
}
.cust-sidebar-logo img { height: 32px; width: auto; }
.cust-sidebar-logo span {
  font-family: var(--ff-heading, 'Cormorant Garamond', serif);
  font-size: 22px; font-weight: 600; color: var(--clr-dark);
}
.cust-nav { flex: 1; padding: 24px 16px; display: flex; flex-direction: column; gap: 8px; }
.cust-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 8px;
  color: var(--clr-text, #5C504A); font-weight: 500; font-size: 15px;
  text-decoration: none; transition: all 0.2s ease;
}
.cust-nav-item svg { width: 20px; height: 20px; stroke: currentColor; opacity: 0.7; }
.cust-nav-item:hover, .cust-nav-item.active {
  background-color: var(--clr-bg-2);
  color: var(--clr-accent-dark, #B8857F);
}
.cust-nav-item.active svg { opacity: 1; }
.cust-sidebar-footer { padding: 20px 16px; border-top: 1px solid var(--clr-border); }

/* Main Content */
.cust-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
}
.cust-topbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--clr-border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; position: sticky; top: 0; z-index: 90;
}
.cust-topbar-title { font-family: var(--ff-heading); font-size: 24px; font-weight: 600; }
.cust-topbar-right { display: flex; align-items: center; gap: 16px; }

.cust-content { padding: 32px; max-width: 1000px; margin: 0 auto; width: 100%; }

/* Cards */
.cust-card {
  background: #fff; border-radius: 12px;
  border: 1px solid var(--clr-border);
  box-shadow: 0 4px 12px rgba(58, 46, 40, 0.03);
  margin-bottom: 24px; overflow: hidden;
}
.cust-card-header {
  padding: 20px 24px; border-bottom: 1px solid var(--clr-border);
  display: flex; justify-content: space-between; align-items: center;
}
.cust-card-title { font-family: var(--ff-heading); font-size: 20px; font-weight: 600; margin: 0; }
.cust-card-body { padding: 24px; }

/* Dashboard specific */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; margin-bottom: 32px; }
.stat-card {
  background: #fff; padding: 24px; border-radius: 12px;
  border: 1px solid var(--clr-border);
  display: flex; flex-direction: column; gap: 8px;
}
.stat-label { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--clr-text-light); font-weight: 600; }
.stat-value { font-size: 32px; font-family: var(--ff-heading); font-weight: 600; color: var(--clr-accent-dark); }

/* Tables */
.cust-table-wrapper { overflow-x: auto; margin: -24px; }
.cust-table { width: 100%; border-collapse: collapse; text-align: left; }
.cust-table th { padding: 14px 24px; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--clr-text-light); border-bottom: 1px solid var(--clr-border); background: var(--clr-bg-2); }
.cust-table td { padding: 16px 24px; border-bottom: 1px solid var(--clr-border); font-size: 14.5px; vertical-align: middle; }
.cust-table tbody tr:last-child td { border-bottom: none; }
.cust-table tbody tr:hover { background: #fafafa; }

/* Status Badges */
.status-badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.status-pending { background: #FFF3CD; color: #856404; }
.status-processing { background: #CCE5FF; color: #004085; }
.status-shipped { background: #D4EDDA; color: #155724; }
.status-delivered { background: #EAF0E8; color: #3D5E3A; }
.status-cancelled { background: #F8D7DA; color: #721C24; }

/* Forms overlay */
.cust-form-group { margin-bottom: 20px; }
.cust-form-label { display: block; font-size: 13px; font-weight: 600; color: var(--clr-dark); margin-bottom: 8px; }
.cust-form-control {
  width: 100%; padding: 12px 14px; border-radius: 8px;
  border: 1px solid var(--clr-border); background: #FAF5F0;
  font-family: var(--ff-body); font-size: 14px; color: var(--clr-dark);
  transition: all 0.2s ease;
}
.cust-form-control:focus { outline: none; border-color: var(--clr-accent); background: #fff; box-shadow: 0 0 0 3px rgba(212,165,160,0.15); }
.cust-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* Auth page */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: url('../../images/bg-pattern.png'), var(--clr-bg-2); padding: 20px; }
.auth-card { background: #fff; border-radius: 16px; padding: 40px; width: 100%; max-width: 440px; box-shadow: 0 10px 40px rgba(58,46,40,0.08); border: 1px solid var(--clr-border); }
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo img { height: 48px; margin-bottom: 12px; }
.auth-title { font-family: var(--ff-heading); font-size: 28px; font-weight: 600; color: var(--clr-dark); margin-bottom: 8px; text-align: center; }
.auth-sub { text-align: center; color: var(--clr-text-light); font-size: 14.5px; margin-bottom: 24px; }
.auth-toggle { text-align: center; margin-top: 24px; font-size: 14px; color: var(--clr-text); }
.auth-toggle a { color: var(--clr-accent-dark); font-weight: 600; cursor: pointer; text-decoration: none; }
.auth-toggle a:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 768px) {
  .dashboard-layout { flex-direction: column; }
  .cust-sidebar { transform: translateX(-100%); transition: transform 0.3s ease; }
  .cust-sidebar.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,0.1); }
  .nav-toggle { display: flex !important; border: none; background: transparent; cursor: pointer; padding: 4px; align-items: center; justify-content: center; }
  .cust-main { margin-left: 0; }
  .cust-topbar { padding: 0 16px; }
  .cust-content { padding: 20px; }
  .cust-form-row { grid-template-columns: 1fr; gap: 0; }
}
