/* ============================================
   The Closet - Shared Styles
   ============================================ */

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

:root {
  --color-background: #F8F9FF;
  --color-sage: #AFC9BE;
  --color-mauve: #B49CB4;
  --color-peach: #E4B9A0;
  --color-text: #2D3142;
  --color-text-muted: #8E8E9A;
  --sidebar-width: 260px;
}

body {
  font-family: 'Nunito Sans', sans-serif;
  background: linear-gradient(135deg, var(--color-background) 0%, #EEF1FF 50%, rgba(175, 201, 190, 0.15) 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ============================================
   Background Decorative Elements
   ============================================ */

.bg-orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.bg-orb-1 {
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(228, 185, 160, 0.2) 0%, transparent 70%);
}

.bg-orb-2 {
  bottom: -30%;
  left: -10%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(180, 156, 180, 0.15) 0%, transparent 70%);
}

.bg-orb-3 {
  top: 40%;
  left: 50%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(175, 201, 190, 0.1) 0%, transparent 70%);
}

/* ============================================
   Layout Structure
   ============================================ */

.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ============================================
   Sidebar Navigation
   ============================================ */

.sidebar {
  width: var(--sidebar-width);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.6);
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 8px;
  margin-bottom: 40px;
}

.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-mauve), var(--color-sage));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(180, 156, 180, 0.35);
  font-size: 1.3rem;
}

.logo-text h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.02em;
}

.logo-text span {
  font-size: 0.65rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

/* Navigation */
.sidebar-nav {
  flex: 1;
}

.nav-section {
  margin-bottom: 32px;
}

.nav-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 0 12px;
  margin-bottom: 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-bottom: 4px;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(255, 255, 255, 0.8);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(180, 156, 180, 0.2), rgba(175, 201, 190, 0.15));
  border-color: rgba(180, 156, 180, 0.3);
  color: var(--color-text);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  width: 3px;
  height: 24px;
  background: linear-gradient(180deg, var(--color-mauve), var(--color-sage));
  border-radius: 0 4px 4px 0;
}

.nav-icon {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
}

/* Sidebar footer */
.sidebar-footer {
  padding: 16px 8px;
  border-top: 1px solid rgba(180, 156, 180, 0.2);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.user-profile:hover {
  background: rgba(255, 255, 255, 0.5);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-peach), var(--color-mauve));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #fff;
  font-weight: 600;
}

.user-info {
  flex: 1;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
}

.user-role {
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

/* ============================================
   Main Content Area
   ============================================ */

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

/* Header */
.header {
  padding: 24px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.page-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--color-text);
}

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

.btn-icon {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 1.1rem;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: scale(1.05);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-mauve), var(--color-peach));
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(180, 156, 180, 0.4);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(180, 156, 180, 0.5);
}

/* Page content */
.page-content {
  padding: 32px 40px;
}

.page-header {
  margin-bottom: 28px;
}

.page-subtitle {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-top: 6px;
}

/* ============================================
   Stats Grid
   ============================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 16px;
  padding: 20px 24px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(180, 156, 180, 0.15);
}

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

.stat-icon.mauve { background: linear-gradient(135deg, rgba(180, 156, 180, 0.4), rgba(180, 156, 180, 0.2)); }
.stat-icon.sage { background: linear-gradient(135deg, rgba(175, 201, 190, 0.4), rgba(175, 201, 190, 0.2)); }
.stat-icon.peach { background: linear-gradient(135deg, rgba(228, 185, 160, 0.4), rgba(228, 185, 160, 0.2)); }

.stat-value {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

/* ============================================
   Closets Grid
   ============================================ */

.closets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 28px;
}

/* Closet card */
.closet-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 8px 32px rgba(180, 156, 180, 0.15), 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.8);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.closet-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(180, 156, 180, 0.25), 0 4px 16px rgba(0, 0, 0, 0.06);
}

.closet-card-accent {
  position: absolute;
  top: 0;
  left: 28px;
  right: 28px;
  height: 3px;
  border-radius: 0 0 4px 4px;
}

.closet-card-accent.sage { background: linear-gradient(90deg, var(--color-sage), rgba(175, 201, 190, 0.5)); }
.closet-card-accent.mauve { background: linear-gradient(90deg, var(--color-mauve), rgba(180, 156, 180, 0.5)); }
.closet-card-accent.peach { background: linear-gradient(90deg, var(--color-peach), rgba(228, 185, 160, 0.5)); }

.closet-header {
  margin-bottom: 20px;
  padding-top: 8px;
}

.closet-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.02em;
}

.closet-meta {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 4px;
}

/* Closet visualization */
.closet-body {
  border-radius: 16px;
  padding: 12px;
  border-width: 2px;
  border-style: solid;
  position: relative;
  background: linear-gradient(180deg, var(--color-background) 0%, rgba(255, 255, 255, 0.5) 100%);
}

.closet-body.sage { border-color: rgba(175, 201, 190, 0.4); }
.closet-body.mauve { border-color: rgba(180, 156, 180, 0.4); }
.closet-body.peach { border-color: rgba(228, 185, 160, 0.4); }

.closet-frame-top {
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  border-radius: 0 0 4px 4px;
}

/* Shelf */
.shelf {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.shelf:last-child {
  margin-bottom: 0;
}

.shelf:hover {
  transform: scale(1.02);
}

.shelf.sage:hover {
  background: linear-gradient(90deg, rgba(175, 201, 190, 0.25), rgba(175, 201, 190, 0.15));
  border-color: rgba(175, 201, 190, 0.5);
}

.shelf.mauve:hover {
  background: linear-gradient(90deg, rgba(180, 156, 180, 0.25), rgba(180, 156, 180, 0.15));
  border-color: rgba(180, 156, 180, 0.5);
}

.shelf.peach:hover {
  background: linear-gradient(90deg, rgba(228, 185, 160, 0.25), rgba(228, 185, 160, 0.15));
  border-color: rgba(228, 185, 160, 0.5);
}

.shelf-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text);
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.shelf-number.sage { background: linear-gradient(135deg, rgba(175, 201, 190, 0.6), rgba(175, 201, 190, 0.3)); }
.shelf-number.mauve { background: linear-gradient(135deg, rgba(180, 156, 180, 0.6), rgba(180, 156, 180, 0.3)); }
.shelf-number.peach { background: linear-gradient(135deg, rgba(228, 185, 160, 0.6), rgba(228, 185, 160, 0.3)); }

.shelf:hover .shelf-number.sage { background: var(--color-sage); color: #fff; }
.shelf:hover .shelf-number.mauve { background: var(--color-mauve); color: #fff; }
.shelf:hover .shelf-number.peach { background: var(--color-peach); color: #fff; }

.shelf-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.shelf-items {
  flex: 1;
  min-width: 0;
  font-size: 0.85rem;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shelf-count {
  border-radius: 12px;
  padding: 2px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text);
  flex-shrink: 0;
}

.shelf-count.sage { background: rgba(175, 201, 190, 0.3); }
.shelf-count.mauve { background: rgba(180, 156, 180, 0.3); }
.shelf-count.peach { background: rgba(228, 185, 160, 0.3); }

/* Closet actions */
.closet-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  justify-content: flex-end;
}

.btn-outline {
  background: transparent;
  border-width: 1.5px;
  border-style: solid;
  border-radius: 20px;
  padding: 8px 18px;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.btn-outline.sage { border-color: var(--color-sage); }
.btn-outline.mauve { border-color: var(--color-mauve); }
.btn-outline.peach { border-color: var(--color-peach); }

.btn-outline.sage:hover { background: rgba(175, 201, 190, 0.2); }
.btn-outline.mauve:hover { background: rgba(180, 156, 180, 0.2); }
.btn-outline.peach:hover { background: rgba(228, 185, 160, 0.2); }

.btn-filled {
  border: none;
  border-radius: 20px;
  padding: 8px 18px;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.btn-filled.sage { background: linear-gradient(135deg, var(--color-sage), rgba(175, 201, 190, 0.8)); box-shadow: 0 4px 12px rgba(175, 201, 190, 0.4); }
.btn-filled.mauve { background: linear-gradient(135deg, var(--color-mauve), rgba(180, 156, 180, 0.8)); box-shadow: 0 4px 12px rgba(180, 156, 180, 0.4); }
.btn-filled.peach { background: linear-gradient(135deg, var(--color-peach), rgba(228, 185, 160, 0.8)); box-shadow: 0 4px 12px rgba(228, 185, 160, 0.4); }

.btn-filled:hover {
  transform: scale(1.05);
}

/* ============================================
   Stock Page Specific Styles
   ============================================ */

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  align-items: center;
}

.search-box {
  flex: 1;
  min-width: 280px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--color-text);
  transition: all 0.3s ease;
}

.search-box input::placeholder {
  color: var(--color-text-muted);
}

.search-box input:focus {
  outline: none;
  border-color: var(--color-mauve);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 16px rgba(180, 156, 180, 0.15);
}

.search-box::before {
  content: '🔍';
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  opacity: 0.6;
}

.filter-btn {
  padding: 14px 20px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--color-mauve);
}

.filter-btn.active {
  background: linear-gradient(135deg, rgba(180, 156, 180, 0.25), rgba(175, 201, 190, 0.2));
  border-color: var(--color-mauve);
}

/* Stock table */
.stock-table-wrapper {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(180, 156, 180, 0.1);
}

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

.stock-table thead {
  background: linear-gradient(90deg, rgba(180, 156, 180, 0.15), rgba(175, 201, 190, 0.1));
}

.stock-table th {
  padding: 18px 24px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-bottom: 1px solid rgba(180, 156, 180, 0.15);
}

.stock-table td {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  vertical-align: middle;
}

.stock-table tbody tr {
  transition: all 0.3s ease;
}

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

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

/* Item cell */
.item-cell {
  display: flex;
  align-items: center;
  gap: 14px;
}

.item-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.item-icon.sage { background: linear-gradient(135deg, rgba(175, 201, 190, 0.4), rgba(175, 201, 190, 0.2)); }
.item-icon.mauve { background: linear-gradient(135deg, rgba(180, 156, 180, 0.4), rgba(180, 156, 180, 0.2)); }
.item-icon.peach { background: linear-gradient(135deg, rgba(228, 185, 160, 0.4), rgba(228, 185, 160, 0.2)); }

.item-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
}

.item-category {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* Closet tag */
.closet-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.closet-tag.sage { background: rgba(175, 201, 190, 0.25); color: #5a7a6a; }
.closet-tag.mauve { background: rgba(180, 156, 180, 0.25); color: #7a5a7a; }
.closet-tag.peach { background: rgba(228, 185, 160, 0.25); color: #8a6a5a; }

/* Shelf badge */
.shelf-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
}

.shelf-badge.sage { background: linear-gradient(135deg, rgba(175, 201, 190, 0.5), rgba(175, 201, 190, 0.25)); color: var(--color-text); }
.shelf-badge.mauve { background: linear-gradient(135deg, rgba(180, 156, 180, 0.5), rgba(180, 156, 180, 0.25)); color: var(--color-text); }
.shelf-badge.peach { background: linear-gradient(135deg, rgba(228, 185, 160, 0.5), rgba(228, 185, 160, 0.25)); color: var(--color-text); }

/* Status indicator */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status.in-stock .status-dot { background: var(--color-sage); }
.status.low-stock .status-dot { background: var(--color-peach); }
.status.out-of-stock .status-dot { background: var(--color-mauve); }

/* Action buttons in table */
.action-btns {
  display: flex;
  gap: 8px;
}

.action-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(180, 156, 180, 0.3);
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.action-btn:hover {
  background: rgba(180, 156, 180, 0.2);
  border-color: var(--color-mauve);
  transform: scale(1.1);
}

/* ============================================
   Form Styles (Create/Edit Pages)
   ============================================ */

.form-container {
  max-width: 900px;
}

.form-section {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(180, 156, 180, 0.1);
}

.form-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(180, 156, 180, 0.15);
}

.form-section-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.form-section-icon.sage { background: linear-gradient(135deg, rgba(175, 201, 190, 0.4), rgba(175, 201, 190, 0.2)); }
.form-section-icon.mauve { background: linear-gradient(135deg, rgba(180, 156, 180, 0.4), rgba(180, 156, 180, 0.2)); }
.form-section-icon.peach { background: linear-gradient(135deg, rgba(228, 185, 160, 0.4), rgba(228, 185, 160, 0.2)); }

.form-section-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-text);
}

.form-section-subtitle {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* Form grid layouts */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-row.single {
  grid-template-columns: 1fr;
}

.form-row.triple {
  grid-template-columns: 1fr 1fr 1fr;
}

.form-row:last-child {
  margin-bottom: 0;
}

/* Form groups */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.form-label .required {
  color: var(--color-mauve);
  margin-left: 2px;
}

/* Text inputs */
.form-input {
  padding: 14px 18px;
  border-radius: 12px;
  border: 1.5px solid rgba(180, 156, 180, 0.25);
  background: rgba(255, 255, 255, 0.7);
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--color-text);
  transition: all 0.3s ease;
}

.form-input::placeholder {
  color: var(--color-text-muted);
  opacity: 0.7;
}

.form-input:hover {
  border-color: rgba(180, 156, 180, 0.4);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-mauve);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 4px rgba(180, 156, 180, 0.1);
}

/* Textarea */
.form-textarea {
  padding: 14px 18px;
  border-radius: 12px;
  border: 1.5px solid rgba(180, 156, 180, 0.25);
  background: rgba(255, 255, 255, 0.7);
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--color-text);
  transition: all 0.3s ease;
  resize: vertical;
  min-height: 100px;
}

.form-textarea:hover {
  border-color: rgba(180, 156, 180, 0.4);
}

.form-textarea:focus {
  outline: none;
  border-color: var(--color-mauve);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 4px rgba(180, 156, 180, 0.1);
}

/* Select dropdown */
.form-select {
  padding: 14px 18px;
  border-radius: 12px;
  border: 1.5px solid rgba(180, 156, 180, 0.25);
  background: rgba(255, 255, 255, 0.7);
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--color-text);
  transition: all 0.3s ease;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238E8E9A' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}

.form-select:hover {
  border-color: rgba(180, 156, 180, 0.4);
}

.form-select:focus {
  outline: none;
  border-color: var(--color-mauve);
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 4px rgba(180, 156, 180, 0.1);
}

/* Color picker */
.color-picker-group {
  display: flex;
  gap: 12px;
}

.color-option {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 3px solid transparent;
  position: relative;
}

.color-option:hover {
  transform: scale(1.1);
}

.color-option.selected {
  border-color: var(--color-text);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.color-option.selected::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.color-option.sage { background: linear-gradient(135deg, var(--color-sage), #8fb5a3); }
.color-option.mauve { background: linear-gradient(135deg, var(--color-mauve), #9a7f9a); }
.color-option.peach { background: linear-gradient(135deg, var(--color-peach), #d4a088); }

/* Image upload area */
.image-upload-area {
  border: 2px dashed rgba(180, 156, 180, 0.35);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  background: rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
  cursor: pointer;
}

.image-upload-area:hover {
  border-color: var(--color-mauve);
  background: rgba(255, 255, 255, 0.6);
}

.image-upload-area.dragover {
  border-color: var(--color-mauve);
  background: rgba(180, 156, 180, 0.1);
  transform: scale(1.01);
}

.upload-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(180, 156, 180, 0.2), rgba(175, 201, 190, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 16px;
}

.upload-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}

.upload-subtitle {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 20px;
  border: 1.5px solid var(--color-mauve);
  background: transparent;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.upload-btn:hover {
  background: rgba(180, 156, 180, 0.15);
}

.upload-formats {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin-top: 12px;
}

/* Image preview */
.image-preview {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  display: none;
}

.image-preview.has-image {
  display: block;
}

.image-preview img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.image-preview-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-preview:hover .image-preview-overlay {
  opacity: 1;
}

.image-preview-name {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
}

.image-remove-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.image-remove-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Shelf configuration */
.shelf-config {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shelf-config-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  border: 1px solid rgba(180, 156, 180, 0.15);
  transition: all 0.3s ease;
}

.shelf-config-item:hover {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(180, 156, 180, 0.3);
}

.shelf-config-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(180, 156, 180, 0.4), rgba(180, 156, 180, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text);
  flex-shrink: 0;
}

.shelf-config-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(180, 156, 180, 0.2);
  background: rgba(255, 255, 255, 0.6);
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.85rem;
  color: var(--color-text);
  transition: all 0.3s ease;
}

.shelf-config-input::placeholder {
  color: var(--color-text-muted);
  opacity: 0.6;
}

.shelf-config-input:focus {
  outline: none;
  border-color: var(--color-mauve);
  background: rgba(255, 255, 255, 0.9);
}

/* Form actions */
.form-actions {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  padding-top: 8px;
}

.btn-cancel {
  padding: 14px 28px;
  border-radius: 14px;
  border: 1.5px solid rgba(180, 156, 180, 0.4);
  background: transparent;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-cancel:hover {
  background: rgba(180, 156, 180, 0.1);
  border-color: var(--color-mauve);
}

.btn-save {
  padding: 14px 32px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, var(--color-mauve), var(--color-peach));
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(180, 156, 180, 0.4);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(180, 156, 180, 0.5);
}

/* Helper text */
.form-helper {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 6px;
}

/* ID display */
.id-display {
  display: flex;
  align-items: center;
  gap: 12px;
}

.id-value {
  flex: 1;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1.5px solid rgba(180, 156, 180, 0.25);
  background: rgba(248, 249, 255, 0.8);
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 0.9rem;
  color: var(--color-text);
  letter-spacing: 0.05em;
}

.id-regenerate {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1.5px solid rgba(180, 156, 180, 0.3);
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.id-regenerate:hover {
  background: rgba(180, 156, 180, 0.15);
  border-color: var(--color-mauve);
  transform: rotate(180deg);
}

/* ============================================
   Responsive Styles
   ============================================ */

@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .sidebar {
    width: 80px;
    padding: 24px 12px;
  }
  
  .sidebar-logo {
    justify-content: center;
    padding: 0;
  }
  
  .logo-text,
  .nav-section-title,
  .user-info {
    display: none;
  }
  
  .nav-item {
    justify-content: center;
    padding: 14px;
  }
  
  .nav-item span:last-child {
    display: none;
  }
  
  .user-profile {
    justify-content: center;
  }
  
  .main-content {
    margin-left: 80px;
  }
  
  :root {
    --sidebar-width: 80px;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 20px 24px;
    flex-direction: column;
    gap: 16px;
  }

  .page-content {
    padding: 24px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .closets-grid {
    grid-template-columns: 1fr;
  }
  
  .filter-bar {
    flex-direction: column;
  }
  
  .search-box {
    width: 100%;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .form-row.triple {
    grid-template-columns: 1fr;
  }
  
  .form-section {
    padding: 20px;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .btn-cancel,
  .btn-save {
    width: 100%;
    justify-content: center;
  }
}
