/* ==========================================================================
   MOOKKANNOOR AZCHA CHANTHA - MODERN ORGANIC THEME
   ========================================================================== */

:root {
  --green-bg-dark: #12301f;
  --green-bg-mid: #1d472f;
  --green-bg-light: #2c6343;

  --btn-green: #15803d;
  --btn-green-hover: #166534;

  --text-dark: #1a2e22;
  --text-muted: #52665a;
  --border-color: rgba(20, 60, 35, 0.18);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
}

/* Hide number input up/down spinner arrows globally */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}
input[type=number] {
  -moz-appearance: textfield !important;
}

/* ==========================================================================
   LOGIN PAGE - BRIGHT, VIBRANT FULLSCREEN BACKGROUND
   ========================================================================== */
body.login-body {
  min-height: 100vh;
  width: 100vw;
  margin: 0;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
  background-color: #f4f6f4;
  background-image: url('assets/fresh_market_bg.jpg?v=4');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Fallback compatibility for image-canvas-frame */
.image-canvas-frame {
  position: relative;
  width: 100%;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  aspect-ratio: auto !important;
  max-width: 100% !important;
  max-height: none !important;
}

/* Glassmorphic Minimal Login Card */
.login-clean-box {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 410px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 24px;
  padding: 36px 32px 30px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.9);
  text-align: center;
  animation: cardFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: #f0fdf4;
  border: 1px solid rgba(21, 128, 61, 0.25);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #15803d;
  margin-bottom: 16px;
  letter-spacing: 0.2px;
}

.login-clean-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.login-clean-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.form-group-clean {
  margin-bottom: 18px;
  text-align: left;
}

.form-group-clean label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 7px;
}

.input-clean-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-clean-icon {
  position: absolute;
  left: 14px;
  color: #718779;
  pointer-events: none;
  display: flex;
  align-items: center;
}

.input-clean {
  width: 100%;
  padding: 13px 14px 13px 44px;
  font-size: 0.94rem;
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  background: #ffffff;
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.input-clean:focus {
  border-color: var(--btn-green);
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.22);
}

.clean-toggle-pass {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: #718779;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  border-radius: 6px;
}

.clean-toggle-pass:hover {
  color: var(--btn-green);
  background: rgba(21, 128, 61, 0.08);
}

.btn-clean-submit {
  width: 100%;
  padding: 14px 20px;
  margin-top: 12px;
  background: var(--btn-green);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(21, 128, 61, 0.38);
  transition: background-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn-clean-submit:hover {
  background: var(--btn-green-hover);
  transform: translateY(-1.5px);
  box-shadow: 0 8px 24px rgba(21, 128, 61, 0.45);
}

.btn-clean-submit:active {
  transform: translateY(0);
}

.login-clean-footer {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Market/FinnOne page body — white background */
body.market-body {
  background: #ffffff;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
}

.toast {
  background: #ffffff;
  border-left: 4px solid var(--btn-green);
  border-radius: 10px;
  padding: 12px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn 0.3s ease-out;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  body.login-body {
    padding: 16px;
  }
  .login-clean-box {
    padding: 28px 22px 24px;
    max-width: 100%;
  }
}

/* Global Alert Banners (Company Master Style) */
.cm-alert {
  padding: 10px 16px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 0.9rem;
}
.cm-alert-success {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
}
.cm-alert-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}
.cm-alert-print-btn {
  background: #166534;
  color: #ffffff !important;
  padding: 4px 12px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s ease;
}
.cm-alert-print-btn:hover {
  background: #14532d;
}

/* ==========================================================================
   GLOBAL FORM TEXTBOX & SEARCH DESIGN
   ========================================================================== */
.cm-input {
  height: 36px;
  min-height: 36px;
  padding: 6px 12px;
  font-size: 0.9rem;
  border: 1px solid #94a3b8;
  border-radius: 4px;
  box-sizing: border-box;
  width: 100%;
  background: #ffffff;
  color: #1e293b;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}

select.cm-input {
  height: 36px;
  line-height: normal;
  background-color: #ffffff;
}

textarea.cm-input {
  height: auto;
  min-height: 60px;
  resize: vertical;
}

.cm-input:focus {
  border-color: #15803d;
  box-shadow: 0 0 0 2px rgba(21, 128, 61, 0.2);
}

.cm-input::placeholder,
.cm-search-input::placeholder {
  color: #94a3b8;
  opacity: 1;
}

.cm-search-input {
  height: 36px;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid #94a3b8;
  border-radius: 4px;
  font-size: 0.88rem;
  min-width: 260px;
  outline: none;
  background: #ffffff;
  color: #1e293b;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cm-search-input:focus {
  border-color: #15803d;
  box-shadow: 0 0 0 2px rgba(21, 128, 61, 0.2);
}

