/* ========== ORGANIZED FORMS - PREMIUM DATA ENTRY PAGES ========== */

/* ========== FORM PAGE CONTAINER ========== */
.form-page-container{
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

.form-page-card{
  background: var(--premium-bg-card) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid var(--premium-border) !important;
  border-radius: 16px !important;
  box-shadow: var(--premium-shadow-md) !important;
  padding: 32px !important;
  margin-bottom: 24px !important;
}

/* ========== FORM GRID LAYOUT ========== */
.form-grid{
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
  gap: 20px !important;
  margin-bottom: 24px !important;
}

@media (max-width: 768px){
  .form-grid{
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

/* ========== FIELD ORGANIZATION ========== */
.field{
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  margin-bottom: 0 !important;
}

.field label{
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--premium-text) !important;
  margin-bottom: 0 !important;
  letter-spacing: 0.2px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.field label::before{
  content: '' !important;
  width: 3px !important;
  height: 16px !important;
  background: var(--premium-primary) !important;
  border-radius: 2px !important;
  display: block !important;
}

.field input[type="text"],
.field input[type="number"],
.field input[type="date"],
.field input[type="time"],
.field input[type="email"],
.field input[type="tel"],
.field select,
.field textarea{
  width: 100% !important;
  border: 1.5px solid var(--premium-border) !important;
  border-radius: 10px !important;
  padding: 12px 16px !important;
  background: var(--premium-bg-card) !important;
  color: var(--premium-text) !important;
  font-size: 14px !important;
  transition: all 0.2s ease !important;
  font-family: inherit !important;
}

.field input:focus,
.field select:focus,
.field textarea:focus{
  outline: none !important;
  border-color: var(--premium-primary) !important;
  box-shadow: 
    0 0 0 3px rgba(99, 102, 241, 0.1),
    0 2px 8px rgba(99, 102, 241, 0.15) !important;
  background: var(--premium-bg-card) !important;
  transform: translateY(-1px) !important;
}

.field input::placeholder,
.field textarea::placeholder{
  color: var(--premium-text-muted) !important;
  opacity: 0.6 !important;
}

.field textarea{
  min-height: 100px !important;
  resize: vertical !important;
  font-family: inherit !important;
}

/* ========== FORM SECTIONS ========== */
.form-section{
  margin-bottom: 32px !important;
  padding-bottom: 24px !important;
  border-bottom: 1px solid var(--premium-border-light) !important;
}

.form-section:last-child{
  border-bottom: none !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.form-section-title{
  font-size: 16px !important;
  font-weight: 600 !important;
  color: var(--premium-text) !important;
  margin-bottom: 20px !important;
  padding-bottom: 12px !important;
  border-bottom: 2px solid var(--premium-primary) !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.form-section-title::before{
  content: '' !important;
  width: 4px !important;
  height: 20px !important;
  background: var(--premium-primary) !important;
  border-radius: 2px !important;
}

.form-section-description{
  font-size: 13px !important;
  color: var(--premium-text-muted) !important;
  margin-bottom: 20px !important;
  line-height: 1.6 !important;
}

/* ========== FORM ACTIONS ========== */
.form-actions{
  display: flex !important;
  gap: 12px !important;
  margin-top: 32px !important;
  padding-top: 24px !important;
  border-top: 1px solid var(--premium-border-light) !important;
  flex-wrap: wrap !important;
}

.form-actions .btn{
  min-width: 120px !important;
}

.form-actions .btn-primary{
  flex: 1 !important;
  min-width: 200px !important;
}

@media (max-width: 768px){
  .form-actions{
    flex-direction: column !important;
  }
  
  .form-actions .btn{
    width: 100% !important;
    min-width: 100% !important;
  }
}

/* ========== FORM ROWS ========== */
.form-row{
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
  gap: 16px !important;
  margin-bottom: 20px !important;
}

.form-row .field{
  margin-bottom: 0 !important;
}

@media (max-width: 768px){
  .form-row{
    grid-template-columns: 1fr !important;
  }
}

/* ========== FORM GROUPS ========== */
.form-group{
  background: var(--premium-bg-soft) !important;
  border: 1px solid var(--premium-border-light) !important;
  border-radius: 12px !important;
  padding: 20px !important;
  margin-bottom: 20px !important;
}

.form-group-title{
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--premium-text) !important;
  margin-bottom: 16px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

/* ========== INPUT GROUPS ========== */
.input-group{
  display: flex !important;
  gap: 0 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  border: 1.5px solid var(--premium-border) !important;
  background: var(--premium-bg-card) !important;
}

.input-group input,
.input-group select{
  flex: 1 !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 12px 16px !important;
}

.input-group input:focus,
.input-group select:focus{
  box-shadow: none !important;
  transform: none !important;
}

.input-group-prepend,
.input-group-append{
  display: flex !important;
  align-items: center !important;
  padding: 0 12px !important;
  background: var(--premium-bg-soft) !important;
  color: var(--premium-text-muted) !important;
  font-size: 14px !important;
  border-right: 1px solid var(--premium-border) !important;
}

.input-group-append{
  border-right: none !important;
  border-left: 1px solid var(--premium-border) !important;
}

/* ========== CHECKBOX & RADIO ========== */
.checkbox-group,
.radio-group{
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

.checkbox-item,
.radio-item{
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px 12px !important;
  border-radius: 8px !important;
  border: 1px solid var(--premium-border-light) !important;
  background: var(--premium-bg-card) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.checkbox-item:hover,
.radio-item:hover{
  background: var(--premium-bg-soft) !important;
  border-color: var(--premium-primary) !important;
}

.checkbox-item input[type="checkbox"],
.radio-item input[type="radio"]{
  width: 18px !important;
  height: 18px !important;
  cursor: pointer !important;
  accent-color: var(--premium-primary) !important;
}

.checkbox-item label,
.radio-item label{
  flex: 1 !important;
  cursor: pointer !important;
  margin: 0 !important;
  font-weight: 400 !important;
}

.checkbox-item label::before,
.radio-item label::before{
  display: none !important;
}

/* ========== REQUIRED FIELDS ========== */
.field.required label::after{
  content: '*' !important;
  color: var(--premium-danger) !important;
  margin-left: 4px !important;
}

/* ========== FIELD HELP TEXT ========== */
.field-help{
  font-size: 12px !important;
  color: var(--premium-text-muted) !important;
  margin-top: 4px !important;
  line-height: 1.5 !important;
}

/* ========== FIELD ERRORS ========== */
.field-error{
  font-size: 12px !important;
  color: var(--premium-danger) !important;
  margin-top: 4px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.field-error::before{
  content: '⚠' !important;
  font-size: 14px !important;
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea{
  border-color: var(--premium-danger) !important;
}

.field.has-error input:focus,
.field.has-error select:focus,
.field.has-error textarea:focus{
  box-shadow: 
    0 0 0 3px rgba(239, 68, 68, 0.1),
    0 2px 8px rgba(239, 68, 68, 0.15) !important;
}

/* ========== FIELD SUCCESS ========== */
.field.has-success input,
.field.has-success select,
.field.has-success textarea{
  border-color: var(--premium-success) !important;
}

.field.has-success input:focus,
.field.has-success select:focus,
.field.has-success textarea:focus{
  box-shadow: 
    0 0 0 3px rgba(16, 185, 129, 0.1),
    0 2px 8px rgba(16, 185, 129, 0.15) !important;
}

/* ========== SELECT STYLING ========== */
.field select{
  appearance: none !important;
  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='%236366f1' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  padding-right: 40px !important;
  cursor: pointer !important;
}

/* ========== NUMBER INPUT STYLING ========== */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button{
  opacity: 1 !important;
  cursor: pointer !important;
}

/* ========== DATE INPUT STYLING ========== */
input[type="date"]::-webkit-calendar-picker-indicator{
  cursor: pointer !important;
  opacity: 0.7 !important;
  filter: invert(1) !important;
}

body:not(.theme-dark) input[type="date"]::-webkit-calendar-picker-indicator{
  filter: none !important;
}

/* ========== FORM VALIDATION STATES ========== */
.form-validating .btn-primary{
  opacity: 0.7 !important;
  cursor: wait !important;
}

.form-submitted .btn-primary{
  background: var(--premium-success) !important;
}

/* ========== COMPACT FORM VARIANT ========== */
.form-compact .field{
  margin-bottom: 16px !important;
}

.form-compact .form-section{
  margin-bottom: 24px !important;
  padding-bottom: 20px !important;
}

.form-compact .form-page-card{
  padding: 24px !important;
}

/* ========== INLINE FORM VARIANT ========== */
.form-inline{
  display: flex !important;
  gap: 12px !important;
  align-items: flex-end !important;
  flex-wrap: wrap !important;
}

.form-inline .field{
  flex: 1 !important;
  min-width: 200px !important;
  margin-bottom: 0 !important;
}

.form-inline .form-actions{
  margin-top: 0 !important;
  padding-top: 0 !important;
  border-top: none !important;
}

@media (max-width: 768px){
  .form-inline{
    flex-direction: column !important;
    align-items: stretch !important;
  }
  
  .form-inline .field{
    min-width: 100% !important;
  }
}

/* ========== FORM HEADER ========== */
.form-header{
  margin-bottom: 24px !important;
  padding-bottom: 20px !important;
  border-bottom: 2px solid var(--premium-border) !important;
}

.form-header-title{
  font-size: 20px !important;
  font-weight: 700 !important;
  color: var(--premium-text) !important;
  margin-bottom: 8px !important;
}

.form-header-description{
  font-size: 14px !important;
  color: var(--premium-text-muted) !important;
  line-height: 1.6 !important;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px){
  .form-page-card{
    padding: 24px !important;
  }
  
  .form-grid{
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
    gap: 16px !important;
  }
}

@media (max-width: 480px){
  .form-page-card{
    padding: 20px !important;
    border-radius: 12px !important;
  }
  
  .form-section-title{
    font-size: 15px !important;
  }
}

