/* Custom Alvican Styles - Non-Bootstrap */

/* Custom CSS Variables */
:root {
  --bs-primary: #0d9488;
  --bs-primary-rgb: 13, 148, 136;
  --teal-light: #14c2ac;
  --teal-dark: #0fae97;
  --accent: #ffc84a;
}

/* Customer Number Display */
#custNum {
  white-space: nowrap;
  overflow: hidden;
  max-width: 220px;
  margin: 0 auto;
  font-size: 1rem;
  font-weight: bold;
}

@media (max-width: 576px) {
  #custNum {
    max-width: 160px;
    font-size: 0.7rem;
  }
}

@media (max-width: 400px) {
  #custNum {
    max-width: 140px;
    font-size: 0.6rem;
  }
}

/* Organization Name Display */
#stofnName {
  white-space: nowrap;
  overflow: hidden;
  max-width: 220px;
  margin: 0 auto;
  font-size: 1rem;
  font-weight: bold;
}

@media (max-width: 576px) {
  #stofnName {
    max-width: 160px;
    font-size: 0.7rem;
  }
}

@media (max-width: 400px) {
  #stofnName {
    max-width: 140px;
    font-size: 0.6rem;
  }
}

/* Status Circle */
.status-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

/* Custom Popup Image */
.custom-popup-image {
  width: 100%;
}

/* Heat/Humidity Graph Modals */
@media (min-width: 992px) {
  #heatgraph .modal-dialog,
  #humgraph .modal-dialog {
      max-width: 95%;
  }
}

/* Background Colors */
.bg-lightgrey {
  background-color: #7d65658a;
}

.bg-light-gray {
  background-color: #f4f4f5;
}

/* Flexbox Items */
.flexbox-item {
  flex: 0 0 calc(50% - 20px);
  margin: 10px;
  box-shadow: 0px 0px 20px rgba(0,0,0,0.2);
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  background-color: rgba(var(--bs-secondary-rgb), var(--bs-bg-opacity)) !important;
}

/* Global Body Styles */
html, body {
  height: 100%;
}

body {
  background: linear-gradient(180deg, #0fb8ad 0%, #17bea3 60%, #b8e0ff 100%);
  background-attachment: fixed;
  font-family: 'Segoe UI', sans-serif;
  min-height: 100%;
}

/* Main Wrapper */
.main-wrapper {
  max-width: 1200px;
  margin: 100px auto 40px auto;
  background: #f4f4f5;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
  padding: 2rem 2rem 3rem;
}

/* Inner Header/Footer */
.inner-header,
.inner-footer {
  background: #1f2937;
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 12px;
}

.inner-header {
  position: relative;
  border-bottom: 4px solid var(--accent);
}

.inner-footer {
  text-align: center;
  margin-top: 2rem;
}

/* Top Bar Icons */
.topbar-icons a {
  color: #fff;
  margin-left: 1rem;
  font-size: 1.2rem;
}

.topbar-icons a:hover {
  color: var(--accent);
}

/* Section Cards */
.section-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.04);
}

.section-card h4 {
  margin-bottom: 1rem;
}

/* Custom Buttons */
.btn-custom {
  display: block;
  width: 100%;
  padding: .75rem;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(180deg, var(--teal-light) 0%, var(--teal-dark) 100%);
  border: none;
  border-radius: 8px;
  margin-bottom: .5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,.1);
  text-shadow: 0 1px 2px rgba(0,0,0,.2);
  transition: background .15s ease, transform .1s ease;
}

.btn-custom:hover {
  background: var(--accent);
  color: #1f2937;
  transform: translateY(-1px);
}

/* Navbar Styles */
@media (max-width: 991px) {
  .navbar .col {
    padding: 0 10px;
  }
  
  .navbar .col.text-end {
    padding-right: 0;
  }
}

.navbar-logo {
  min-width: 80px;
  width: 20%;
  height: auto;
}

.nav-link-first {
  padding: 0 !important;
  margin: 0 !important;
}

/* Sensor Settings */
.sensor-setting {
  margin-bottom: 1rem;
  padding: 0.5rem;
  background: #f8f9fa;
  border-radius: 0.25rem;
}

.sensor-setting span {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
  color: #333;
}

.sensor-setting input {
  width: 100%;
  text-align: center;
  padding: 0.375rem 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  background-clip: padding-box;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.sensor-setting input:focus {
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
