/*!
 * Boston Project Design System v1.0
 * https://style.thebostonproject.net
 * 
 * A clean, minimal design system for professional web applications
 * Author: Joseph P. Stasio <joe@thebostonproject.net>
 */

/* =============================================================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================================= */

:root {
  /* Color Palette */
  --bp-primary: #0096ff;
  --bp-primary-hover: #007acc;
  --bp-primary-light: rgba(0, 150, 255, 0.1);
  --bp-primary-border: rgba(0, 150, 255, 0.3);
  
  --bp-success: #00c864;
  --bp-success-light: rgba(0, 200, 100, 0.1);
  --bp-success-border: rgba(0, 200, 100, 0.3);
  
  --bp-danger: #dc2626;
  --bp-danger-light: rgba(220, 38, 38, 0.1);
  --bp-danger-border: rgba(220, 38, 38, 0.3);
  
  --bp-warning: #f59e0b;
  --bp-warning-light: rgba(245, 158, 11, 0.1);
  --bp-warning-border: rgba(245, 158, 11, 0.3);
  
  /* Neutral Colors */
  --bp-gray-50: #fafafa;
  --bp-gray-100: #f5f5f5;
  --bp-gray-200: #e5e5e5;
  --bp-gray-300: #d4d4d4;
  --bp-gray-400: #a3a3a3;
  --bp-gray-500: #737373;
  --bp-gray-600: #525252;
  --bp-gray-700: #404040;
  --bp-gray-800: #262626;
  --bp-gray-900: #171717;
  
  /* Semantic Colors */
  --bp-text: #333333;
  --bp-text-muted: #666666;
  --bp-text-light: #999999;
  --bp-bg: #f5f5f5;
  --bp-bg-card: #ffffff;
  --bp-border: rgba(0, 0, 0, 0.1);
  --bp-border-light: rgba(0, 0, 0, 0.05);
  
  /* Typography */
  --bp-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --bp-font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  
  --bp-font-size-xs: 0.75rem;   /* 12px */
  --bp-font-size-sm: 0.875rem;  /* 14px */
  --bp-font-size-base: 1rem;    /* 16px */
  --bp-font-size-lg: 1.125rem;  /* 18px */
  --bp-font-size-xl: 1.25rem;   /* 20px */
  --bp-font-size-2xl: 1.5rem;   /* 24px */
  --bp-font-size-3xl: 1.875rem; /* 30px */
  
  /* Spacing Scale */
  --bp-space-1: 0.25rem;  /* 4px */
  --bp-space-2: 0.5rem;   /* 8px */
  --bp-space-3: 0.75rem;  /* 12px */
  --bp-space-4: 1rem;     /* 16px */
  --bp-space-5: 1.25rem;  /* 20px */
  --bp-space-6: 1.5rem;   /* 24px */
  --bp-space-8: 2rem;     /* 32px */
  --bp-space-10: 2.5rem;  /* 40px */
  --bp-space-12: 3rem;    /* 48px */
  --bp-space-16: 4rem;    /* 64px */
  
  /* Border Radius */
  --bp-radius-sm: 4px;
  --bp-radius: 6px;
  --bp-radius-md: 8px;
  --bp-radius-lg: 12px;
  --bp-radius-xl: 16px;
  
  /* Shadows */
  --bp-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --bp-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  --bp-shadow-md: 0 2px 8px rgba(0, 0, 0, 0.1);
  --bp-shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.15);
  --bp-shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.15);
  
  /* Transitions */
  --bp-transition: all 0.2s ease;
  --bp-transition-fast: all 0.15s ease;
  --bp-transition-slow: all 0.3s ease;
}

/* Dark Theme Override */
[data-theme="dark"] {
  --bp-text: #ffffff;
  --bp-text-muted: #a3a3a3;
  --bp-text-light: #737373;
  --bp-bg: #171717;
  --bp-bg-card: #262626;
  --bp-border: rgba(255, 255, 255, 0.1);
  --bp-border-light: rgba(255, 255, 255, 0.05);
}

/* =============================================================================
   RESET & BASE STYLES
   ============================================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  line-height: 1.5;
}

body {
  font-family: var(--bp-font-family);
  font-size: var(--bp-font-size-base);
  line-height: 1.6;
  color: var(--bp-text);
  background-color: var(--bp-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =============================================================================
   TYPOGRAPHY
   ============================================================================= */

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: var(--bp-space-4);
  color: var(--bp-text);
}

h1 { font-size: var(--bp-font-size-3xl); }
h2 { font-size: var(--bp-font-size-2xl); }
h3 { font-size: var(--bp-font-size-xl); }
h4 { font-size: var(--bp-font-size-lg); }
h5 { font-size: var(--bp-font-size-base); }
h6 { font-size: var(--bp-font-size-sm); }

p {
  margin-bottom: var(--bp-space-4);
  line-height: 1.7;
}

a {
  color: var(--bp-primary);
  text-decoration: none;
  transition: var(--bp-transition);
}

a:hover {
  color: var(--bp-primary-hover);
}

code {
  font-family: var(--bp-font-mono);
  font-size: 0.875em;
  background: var(--bp-gray-100);
  padding: 0.2em 0.4em;
  border-radius: var(--bp-radius-sm);
}

pre {
  font-family: var(--bp-font-mono);
  background: var(--bp-gray-100);
  padding: var(--bp-space-4);
  border-radius: var(--bp-radius);
  overflow-x: auto;
  margin-bottom: var(--bp-space-4);
}

/* =============================================================================
   LAYOUT UTILITIES
   ============================================================================= */

.bp-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--bp-space-4);
}

.bp-container-sm { max-width: 640px; }
.bp-container-md { max-width: 768px; }
.bp-container-lg { max-width: 1024px; }
.bp-container-xl { max-width: 1280px; }

.bp-flex {
  display: flex;
}

.bp-flex-col {
  flex-direction: column;
}

.bp-items-center {
  align-items: center;
}

.bp-items-start {
  align-items: flex-start;
}

.bp-items-end {
  align-items: flex-end;
}

.bp-justify-center {
  justify-content: center;
}

.bp-justify-between {
  justify-content: space-between;
}

.bp-justify-around {
  justify-content: space-around;
}

.bp-gap-1 { gap: var(--bp-space-1); }
.bp-gap-2 { gap: var(--bp-space-2); }
.bp-gap-3 { gap: var(--bp-space-3); }
.bp-gap-4 { gap: var(--bp-space-4); }
.bp-gap-6 { gap: var(--bp-space-6); }
.bp-gap-8 { gap: var(--bp-space-8); }

.bp-grid {
  display: grid;
}

.bp-grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.bp-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.bp-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.bp-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* =============================================================================
   SPACING UTILITIES
   ============================================================================= */

.bp-p-1 { padding: var(--bp-space-1); }
.bp-p-2 { padding: var(--bp-space-2); }
.bp-p-3 { padding: var(--bp-space-3); }
.bp-p-4 { padding: var(--bp-space-4); }
.bp-p-6 { padding: var(--bp-space-6); }
.bp-p-8 { padding: var(--bp-space-8); }

.bp-px-3 { padding-left: var(--bp-space-3); padding-right: var(--bp-space-3); }
.bp-px-4 { padding-left: var(--bp-space-4); padding-right: var(--bp-space-4); }
.bp-py-2 { padding-top: var(--bp-space-2); padding-bottom: var(--bp-space-2); }
.bp-py-3 { padding-top: var(--bp-space-3); padding-bottom: var(--bp-space-3); }

.bp-m-1 { margin: var(--bp-space-1); }
.bp-m-2 { margin: var(--bp-space-2); }
.bp-m-3 { margin: var(--bp-space-3); }
.bp-m-4 { margin: var(--bp-space-4); }
.bp-mb-4 { margin-bottom: var(--bp-space-4); }
.bp-mt-4 { margin-top: var(--bp-space-4); }

/* =============================================================================
   BUTTON COMPONENTS
   ============================================================================= */

.bp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--bp-space-2);
  padding: var(--bp-space-3) var(--bp-space-4);
  border: 2px solid transparent;
  border-radius: var(--bp-radius-md);
  font-family: inherit;
  font-size: var(--bp-font-size-sm);
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: var(--bp-transition);
  touch-action: manipulation;
  background: var(--bp-border-light);
  color: var(--bp-text);
  border-color: var(--bp-border);
}

.bp-btn:hover {
  transform: translateY(-1px);
  background: var(--bp-border);
}

.bp-btn:active {
  transform: scale(0.98);
}

.bp-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Button Variants */
.bp-btn-primary {
  background: var(--bp-primary);
  color: white;
  border-color: var(--bp-primary);
}

.bp-btn-primary:hover {
  background: var(--bp-primary-hover);
  border-color: var(--bp-primary-hover);
  color: white;
}

.bp-btn-outline-primary {
  background: var(--bp-primary-light);
  color: var(--bp-primary);
  border-color: var(--bp-primary-border);
}

.bp-btn-outline-primary:hover {
  background: var(--bp-primary);
  color: white;
}

.bp-btn-success {
  background: var(--bp-success);
  color: white;
  border-color: var(--bp-success);
}

.bp-btn-success:hover {
  background: #00a854;
  border-color: #00a854;
  color: white;
}

.bp-btn-danger {
  background: var(--bp-danger);
  color: white;
  border-color: var(--bp-danger);
}

.bp-btn-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  color: white;
}

/* Button Sizes */
.bp-btn-sm {
  padding: var(--bp-space-2) var(--bp-space-3);
  font-size: var(--bp-font-size-xs);
}

.bp-btn-lg {
  padding: var(--bp-space-4) var(--bp-space-6);
  font-size: var(--bp-font-size-base);
}

.bp-btn-icon {
  min-width: auto;
  padding: var(--bp-space-2);
  aspect-ratio: 1;
}

/* =============================================================================
   CARD COMPONENTS
   ============================================================================= */

.bp-card {
  background: var(--bp-bg-card);
  border-radius: var(--bp-radius-lg);
  border: 1px solid var(--bp-border-light);
  overflow: hidden;
  transition: var(--bp-transition);
  box-shadow: var(--bp-shadow-sm);
}

.bp-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--bp-shadow-lg);
  border-color: var(--bp-border);
}

.bp-card-header {
  padding: var(--bp-space-6);
  border-bottom: 1px solid var(--bp-border-light);
}

.bp-card-content {
  padding: var(--bp-space-6);
}

.bp-card-footer {
  padding: var(--bp-space-6);
  border-top: 1px solid var(--bp-border-light);
  background: var(--bp-gray-50);
}

/* =============================================================================
   FORM COMPONENTS
   ============================================================================= */

.bp-form-group {
  margin-bottom: var(--bp-space-4);
}

.bp-form-label {
  display: block;
  font-size: var(--bp-font-size-sm);
  font-weight: 500;
  color: var(--bp-text);
  margin-bottom: var(--bp-space-2);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.bp-form-input {
  width: 100%;
  padding: var(--bp-space-3) var(--bp-space-4);
  border: 2px solid var(--bp-border);
  border-radius: var(--bp-radius);
  font-family: inherit;
  font-size: var(--bp-font-size-sm);
  color: var(--bp-text);
  background: var(--bp-bg-card);
  transition: var(--bp-transition);
}

.bp-form-input:focus {
  outline: none;
  border-color: var(--bp-primary);
  box-shadow: 0 0 0 3px var(--bp-primary-light);
}

.bp-form-input::placeholder {
  color: var(--bp-text-light);
}

.bp-form-textarea {
  min-height: 100px;
  resize: vertical;
  font-family: inherit;
}

.bp-form-select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right var(--bp-space-3) center;
  background-size: 16px;
  padding-right: var(--bp-space-8);
}

/* =============================================================================
   MODAL COMPONENTS
   ============================================================================= */

.bp-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--bp-space-5);
}
 .bp-form-select {
            width: 100%;
            padding: var(--bp-space-3) var(--bp-space-8) var(--bp-space-3) var(--bp-space-4);
            border: 2px solid var(--bp-border);
            border-radius: var(--bp-radius);
            font-family: inherit;
            font-size: var(--bp-font-size-sm);
            color: var(--bp-text);
            background: var(--bp-bg-card);
            transition: var(--bp-transition);
        }
        
        .bp-form-select:focus {
            outline: none;
            border-color: var(--bp-primary);
            box-shadow: 0 0 0 3px var(--bp-primary-light);
        }
		
.bp-modal.bp-modal-active {
  display: flex;
}

.bp-modal-content {
  background: var(--bp-bg-card);
  border-radius: var(--bp-radius-xl);
  padding: var(--bp-space-8);
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--bp-shadow-xl);
  border: 1px solid var(--bp-border);
}

.bp-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--bp-space-6);
}

.bp-modal-title {
  font-size: var(--bp-font-size-xl);
  font-weight: 600;
  color: var(--bp-text);
}

.bp-modal-close {
  background: var(--bp-border-light);
  border: none;
  color: var(--bp-text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--bp-transition);
}

.bp-modal-close:hover {
  background: var(--bp-border);
  color: var(--bp-text);
}

/* =============================================================================
   TOAST/ALERT COMPONENTS
   ============================================================================= */

.bp-toast {
  position: fixed;
  top: var(--bp-space-5);
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  padding: var(--bp-space-3) var(--bp-space-5);
  border-radius: var(--bp-radius);
  background: var(--bp-bg-card);
  color: var(--bp-text);
  box-shadow: var(--bp-shadow-lg);
  border: 1px solid var(--bp-border);
  z-index: 10000;
  transition: var(--bp-transition-slow);
  text-align: center;
  max-width: 90vw;
  font-size: var(--bp-font-size-sm);
}

.bp-toast.bp-toast-show {
  transform: translateX(-50%) translateY(0);
}

.bp-toast.bp-toast-success {
  background: var(--bp-success);
  color: white;
  border-color: var(--bp-success);
}

.bp-toast.bp-toast-error {
  background: var(--bp-danger);
  color: white;
  border-color: var(--bp-danger);
}

.bp-toast.bp-toast-warning {
  background: var(--bp-warning);
  color: white;
  border-color: var(--bp-warning);
}

/* =============================================================================
   HEADER/NAVIGATION COMPONENTS
   ============================================================================= */

.bp-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 2px solid var(--bp-primary-border);
  padding: var(--bp-space-3);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--bp-shadow);
}

.bp-header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--bp-space-3);
}

.bp-logo {
  font-size: var(--bp-font-size-lg);
  font-weight: 700;
  color: var(--bp-primary);
  display: flex;
  align-items: center;
  gap: var(--bp-space-2);
  text-decoration: none;
  white-space: nowrap;
}

.bp-nav {
  display: flex;
  align-items: center;
  gap: var(--bp-space-2);
  margin-left: auto;
}

/* =============================================================================
   SIDEBAR COMPONENTS
   ============================================================================= */

.bp-sidebar {
  background: var(--bp-bg-card);
  border-right: 1px solid var(--bp-border);
  padding: var(--bp-space-4);
  overflow-y: auto;
}

.bp-sidebar-section {
  margin-bottom: var(--bp-space-6);
}

.bp-sidebar-title {
  color: var(--bp-primary);
  font-size: var(--bp-font-size-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--bp-space-3);
  display: flex;
  align-items: center;
  gap: var(--bp-space-2);
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */

.bp-text-xs { font-size: var(--bp-font-size-xs); }
.bp-text-sm { font-size: var(--bp-font-size-sm); }
.bp-text-base { font-size: var(--bp-font-size-base); }
.bp-text-lg { font-size: var(--bp-font-size-lg); }
.bp-text-xl { font-size: var(--bp-font-size-xl); }

.bp-text-muted { color: var(--bp-text-muted); }
.bp-text-light { color: var(--bp-text-light); }
.bp-text-primary { color: var(--bp-primary); }
.bp-text-success { color: var(--bp-success); }
.bp-text-danger { color: var(--bp-danger); }

.bp-bg-primary { background: var(--bp-primary); }
.bp-bg-success { background: var(--bp-success); }
.bp-bg-danger { background: var(--bp-danger); }
.bp-bg-card { background: var(--bp-bg-card); }

.bp-border { border: 1px solid var(--bp-border); }
.bp-border-light { border: 1px solid var(--bp-border-light); }
.bp-border-primary { border: 1px solid var(--bp-primary-border); }

.bp-rounded { border-radius: var(--bp-radius); }
.bp-rounded-md { border-radius: var(--bp-radius-md); }
.bp-rounded-lg { border-radius: var(--bp-radius-lg); }

.bp-shadow { box-shadow: var(--bp-shadow); }
.bp-shadow-md { box-shadow: var(--bp-shadow-md); }
.bp-shadow-lg { box-shadow: var(--bp-shadow-lg); }

.bp-hidden { display: none; }
.bp-block { display: block; }
.bp-inline-block { display: inline-block; }

.bp-w-full { width: 100%; }
.bp-h-full { height: 100%; }

.bp-text-center { text-align: center; }
.bp-text-left { text-align: left; }
.bp-text-right { text-align: right; }

.bp-font-mono { font-family: var(--bp-font-mono); }
.bp-font-medium { font-weight: 500; }
.bp-font-semibold { font-weight: 600; }
.bp-font-bold { font-weight: 700; }

/* =============================================================================
   RESPONSIVE UTILITIES
   ============================================================================= */

@media (max-width: 768px) {
  .bp-container {
    padding: 0 var(--bp-space-3);
  }
  
  .bp-header-content {
    flex-wrap: wrap;
    gap: var(--bp-space-2);
  }
  
  .bp-modal-content {
    padding: var(--bp-space-6);
    margin: var(--bp-space-4);
  }
  
  .bp-grid-cols-3,
  .bp-grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Mobile-specific utilities */
  .bp-hide-mobile { display: none; }
}

@media (min-width: 769px) {
  .bp-show-mobile { display: none; }
}

/* =============================================================================
   ANIMATIONS
   ============================================================================= */

@keyframes bp-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bp-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.bp-fade-in {
  animation: bp-fade-in 0.3s ease-out;
}

.bp-loading {
  position: relative;
}

.bp-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid var(--bp-border);
  border-top: 2px solid var(--bp-primary);
  border-radius: 50%;
  animation: bp-spin 1s linear infinite;
}

/* =============================================================================
   THEME TOGGLES
   ============================================================================= */

.bp-theme-toggle {
  position: fixed;
  bottom: var(--bp-space-5);
  right: var(--bp-space-5);
  background: var(--bp-bg-card);
  border: 1px solid var(--bp-border);
  padding: var(--bp-space-3);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--bp-shadow-lg);
  transition: var(--bp-transition);
  z-index: 1000;
}

.bp-theme-toggle:hover {
  transform: translateY(-2px);
  box-shadow: var(--bp-shadow-xl);
}

/* =============================================================================
   PRINT STYLES
   ============================================================================= */

@media print {
  .bp-header,
  .bp-sidebar,
  .bp-modal,
  .bp-toast,
  .bp-theme-toggle {
    display: none !important;
  }
  
  .bp-card {
    border: 1px solid #000;
    box-shadow: none;
  }
}
/* =============================================================================
   BASE ELEMENT ENHANCEMENTS (UNMARKED ELEMENTS)
   ============================================================================= */

/* Give default sections a nice card-like feel */
main, section, article, aside {
  background: var(--bp-bg-card);
  border-radius: var(--bp-radius-lg);
  border: 1px solid var(--bp-border-light);
  padding: var(--bp-space-5);
  box-shadow: var(--bp-shadow-sm);
  margin-bottom: var(--bp-space-5);
}

/* Lists */
ul, ol {
  margin: 0 0 var(--bp-space-4) var(--bp-space-5);
  padding-left: var(--bp-space-4);
}

li {
  margin-bottom: var(--bp-space-1);
}

/* Horizontal rule */
hr {
  border: 0;
  border-top: 1px solid var(--bp-border);
  margin: var(--bp-space-5) 0;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  border-radius: var(--bp-radius-md);
  display: block;
}

/* Blockquotes */
blockquote {
  margin: 0 0 var(--bp-space-4);
  padding: var(--bp-space-3) var(--bp-space-4);
  border-left: 4px solid var(--bp-primary);
  background: var(--bp-primary-light);
  color: var(--bp-text);
  border-radius: 0 var(--bp-radius-md) var(--bp-radius-md) 0;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--bp-space-5);
  font-size: var(--bp-font-size-sm);
}

thead {
  background: var(--bp-gray-100);
}

th, td {
  padding: var(--bp-space-3) var(--bp-space-4);
  border-bottom: 1px solid var(--bp-border-light);
  text-align: left;
}

th {
  font-weight: 600;
  color: var(--bp-text);
  white-space: nowrap;
}

/* Make striped tables easy */
tbody tr:nth-child(odd) {
  background: rgba(0, 0, 0, 0.01);
}

/* Generic buttons (no classes) */
button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--bp-space-2);
  padding: var(--bp-space-3) var(--bp-space-4);
  border-radius: var(--bp-radius-md);
  border: 2px solid var(--bp-primary);
  background: var(--bp-primary);
  color: #fff;
  font-family: inherit;
  font-size: var(--bp-font-size-sm);
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: var(--bp-transition);
  touch-action: manipulation;
}

button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
input[type="reset"]:hover {
  background: var(--bp-primary-hover);
  border-color: var(--bp-primary-hover);
  transform: translateY(-1px);
}

button:active,
input[type="button"]:active,
input[type="submit"]:active,
input[type="reset"]:active {
  transform: scale(0.98);
}

button:disabled,
input[type="button"]:disabled,
input[type="submit"]:disabled,
input[type="reset"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Generic form controls */
input,
textarea,
select {
  font-family: inherit;
  font-size: var(--bp-font-size-sm);
  color: var(--bp-text);
}

/* Text-ish inputs & selects */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: var(--bp-space-3) var(--bp-space-4);
  border-radius: var(--bp-radius);
  border: 2px solid var(--bp-border);
  background: var(--bp-bg-card);
  transition: var(--bp-transition);
  box-shadow: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--bp-primary);
  box-shadow: 0 0 0 3px var(--bp-primary-light);
}

input::placeholder,
textarea::placeholder {
  color: var(--bp-text-light);
}

/* Textareas */
textarea {
  min-height: 100px;
  resize: vertical;
}

/* Labels */
label {
  display: block;
  font-size: var(--bp-font-size-sm);
  font-weight: 500;
  color: var(--bp-text);
  margin-bottom: var(--bp-space-2);
}

/* Checkbox & radio alignment */
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  margin-right: var(--bp-space-2);
}

/* Simple page wrapper defaults for naked pages */
body > header,
body > footer {
  padding: var(--bp-space-4) var(--bp-space-4);
}

body > header {
  border-bottom: 1px solid var(--bp-border-light);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

body > footer {
  border-top: 1px solid var(--bp-border-light);
  color: var(--bp-text-muted);
  font-size: var(--bp-font-size-xs);
}

body > main {
  max-width: 960px;
  margin: var(--bp-space-6) auto;
  padding: 0 var(--bp-space-4);
}
