/* ========================================
   BASE THEME CSS - Global UI Components
   ======================================== */

/* CSS Variables for Theme */
:root {
  --primary: #6C5CE7;
  --primary-light: #A29BFE;
  --primary-dark: #5a4bd1;
  
  --secondary: #00B894;
  --danger: #FF7675;
  --warning: #FDCB6E;
  --success: #00B894;
  
  --bg-main: #F8F9FC;
  --bg-sidebar: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-input: #f9fafb;
  
  --text-primary: #2D3436;
  --text-secondary: #636E72;
  --text-muted: #B2BEC3;
  
  --border-color: #e5e7eb;
  --border-light: #E5E7EB;
  --border-hover: #d1d5db;
  
  --shadow-sm: 0 2px 6px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.2);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 18px;
  
  --transition-fast: 0.2s;
  --transition-normal: 0.3s;
  --transition-slow: 0.5s;
}

/* ========================================
   BUTTON STYLES
   ======================================== */

.btn {
  padding: 12px 24px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: all var(--transition-normal) ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

/* Primary Button */
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(108, 92, 231, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #4a3bc1 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Secondary Button */
.btn-secondary {
  background: #f3f4f6;
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  background: #e5e7eb;
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.btn-secondary:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  border-color: var(--text-muted);
}

/* Danger Button */
.btn-danger {
  background: var(--danger);
  color: white;
  box-shadow: 0 4px 14px rgba(255, 118, 117, 0.3);
}

.btn-danger:hover {
  background: #ff6b6b;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 118, 117, 0.4);
}

/* Success Button */
.btn-success {
  background: var(--success);
  color: white;
  box-shadow: 0 4px 14px rgba(0, 184, 148, 0.3);
}

.btn-success:hover {
  background: #00c9a7;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 184, 148, 0.4);
}

/* Warning Button */
.btn-warning {
  background: var(--warning);
  color: var(--text-primary);
  box-shadow: 0 4px 14px rgba(253, 203, 110, 0.3);
}

.btn-warning:hover {
  background: #ffd93d;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(253, 203, 110, 0.4);
}

/* Outline Button */
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

/* Ghost Button */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
}

.btn-ghost:hover {
  background: rgba(108, 92, 231, 0.1);
  color: var(--primary);
}

/* Button Sizes */
.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 8px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
  border-radius: 12px;
}

.btn-block {
  width: 100%;
  display: flex;
}

/* ========================================
   INPUT BOX STYLES
   ======================================== */

.input,
.input-box {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-size: 15px;
  color: var(--text-primary);
  background: var(--bg-input);
  transition: all var(--transition-normal) ease;
  box-sizing: border-box;
  font-family: inherit;
}

.input:focus,
.input-box:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1);
}

.input::placeholder,
.input-box::placeholder {
  color: #9ca3af;
}

.input:disabled,
.input-box:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.6;
}

.input-error {
  border-color: var(--danger) !important;
}

.input-error:focus {
  box-shadow: 0 0 0 4px rgba(255, 118, 117, 0.1) !important;
}

.input-success {
  border-color: var(--success) !important;
}

.input-success:focus {
  box-shadow: 0 0 0 4px rgba(0, 184, 148, 0.1) !important;
}

/* Input Sizes */
.input-sm,
.input-box-sm {
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 8px;
}

.input-lg,
.input-box-lg {
  padding: 16px 20px;
  font-size: 16px;
  border-radius: 12px;
}

/* ========================================
   DROPDOWN/SELECT STYLES
   ======================================== */

.select,
.dropdown {
  width: fit-content;
  padding: 14px 16px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-size: 15px;
  color: var(--text-primary);
  background: var(--bg-input);
  transition: all var(--transition-normal) ease;
  box-sizing: border-box;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%236B7280' d='M7 11L2 5h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 48px;
}

.select:focus,
.dropdown:focus {
  outline: none;
  border-color: var(--primary);
  background-color: white;
  box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1);
}

.select:disabled,
.dropdown:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.6;
}

.select option,
.dropdown option {
  background: white;
  color: var(--text-primary);
  padding: 12px;
}

/* Select Sizes */
.select-sm,
.dropdown-sm {
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 8px;
  padding-right: 40px;
}

.select-lg,
.dropdown-lg {
  padding: 16px 20px;
  font-size: 16px;
  border-radius: 12px;
  padding-right: 56px;
}

/* ========================================
   TEXTAREA STYLES
   ======================================== */

.textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-size: 15px;
  color: var(--text-primary);
  background: var(--bg-input);
  transition: all var(--transition-normal) ease;
  box-sizing: border-box;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

.textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1);
}

.textarea::placeholder {
  color: #9ca3af;
}

.textarea:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.6;
}

/* ========================================
   LABEL STYLES
   ======================================== */

.label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

.label-sm {
  font-size: 12px;
  font-weight: 500;
}

.label-lg {
  font-size: 16px;
  font-weight: 700;
}

.label-muted {
  color: var(--text-secondary);
}

/* ========================================
   FORM GROUP STYLES
   ======================================== */

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

.form-group-sm {
  margin-bottom: 12px;
}

.form-group-lg {
  margin-bottom: 28px;
}

/* ========================================
   ICON BUTTON STYLES
   ======================================== */

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #EEF2FF;
  color: var(--primary);
  font-size: 18px;
  font-weight: 600;
  transition: var(--transition-fast);
}

.icon-btn:hover {
  background: #E0E7FF;
  transform: scale(1.1);
}

.icon-btn-sm {
  width: 28px;
  height: 28px;
  font-size: 14px;
}

.icon-btn-lg {
  width: 44px;
  height: 44px;
  font-size: 20px;
}

/* ========================================
   CARD STYLES
   ======================================== */

.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.card-sm {
  padding: 12px;
  border-radius: var(--radius-sm);
}

.card-lg {
  padding: 32px;
  border-radius: var(--radius-lg);
}

/* ========================================
   BADGE STYLES
   ======================================== */

.badge {
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  display: inline-block;
}

.badge-primary {
  background: rgba(108, 92, 231, 0.1);
  color: var(--primary);
}

.badge-success {
  background: #E6F9F2;
  color: var(--success);
}

.badge-danger {
  background: #FFEAEA;
  color: var(--danger);
}

.badge-warning {
  background: #FFF4E5;
  color: var(--warning);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }

.d-flex { display: flex; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-none { display: none; }

.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.gap-4 { gap: 32px; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }
