/*****************************************
            SSO LOGIN SAMIRA
******************************************/

.sso-login-page-body {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #ffffff;
  font-family: "Segoe UI", Arial, sans-serif;

  background-image: url("../src/backgrounds/samira-login-bg.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-color: #062a44;
}

.sso-login-box {
  position: relative;
  z-index: 2;
  width: min(420px, calc(100% - 48px));
  text-align: center;
  transform: translateY(0);
}

.sso-login-logo {
  display: block;
  width: min(240px, 70vw);
  height: auto;
  margin: 0 auto 72px;
}

.sso-login-title {
  margin: 0 0 8px;
  font-size: 36px;
  line-height: 1.15;
  font-weight: 700;
  color: #ffffff;
}

.sso-login-description {
  margin: 0 0 50px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.5;
  font-size: 15px;
}

.sso-login-button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  background: #0e5aa0;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.sso-login-button:hover {
  background: #1269b7;
}

.sso-login-button:disabled,
.sso-login-button[data-sso-busy="1"] {
  opacity: 0.68;
  cursor: wait;
}

@media (max-width: 640px) {
  .sso-login-box {
    width: min(360px, calc(100% - 40px));
  }

  .sso-login-logo {
    margin-bottom: 52px;
  }

  .sso-login-title {
    font-size: 30px;
  }
}

/**** /END SSO LOGIN SAMIRA *****/

/*****************************************
            SAMIRA IMPIANTI
******************************************/

:root {
  --samira-bg: #052947;
  --samira-bg-soft: #07385f;
  --samira-card: #f8fafc;
  --samira-blue: #075aa8;
  --samira-blue-dark: #004b8d;
  --samira-blue-light: #0ea5df;
  --samira-text: #ffffff;
  --samira-muted: rgba(255, 255, 255, 0.72);
  --samira-border: rgba(255, 255, 255, 0.24);
  --samira-danger: #dc2626;
  --samira-warning: #f59e0b;
  --samira-success: #22c55e;
}

/* PAGE */

.samira-plants-page {
  width: 100%;
  min-width: 100%;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--samira-text);
  background: radial-gradient(
      circle at top left,
      rgba(14, 165, 223, 0.22),
      transparent 36rem
    ),
    linear-gradient(135deg, rgba(3, 37, 68, 0.98), rgba(3, 73, 93, 0.98)),
    var(--samira-bg);
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
}

.samira-plants-layout {
  width: 100%;
  min-height: 100vh;
  display: block;
}

.samira-plants-main {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 3.75rem 3.5rem 4rem;
  box-sizing: border-box;
}

/* HEADER */

.samira-plants-topbar {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 4rem;
}

.samira-plants-title {
  margin: 0;
  font-size: clamp(3rem, 5vw, 5rem);
  line-height: 0.9;
  font-weight: 900;
  letter-spacing: -0.075em;
}

.samira-plants-subtitle {
  margin: 1rem 0 0;
  color: var(--samira-muted);
  font-size: 1.05rem;
}

.samira-plants-profile {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  color: #ffffff;
  text-decoration: none;
  flex-shrink: 0;
}

.samira-plants-profile-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  color: #ffffff;
  line-height: 1;
}

.samira-plants-profile-icon svg {
  width: 2.5rem;
  height: 2.5rem;
  stroke: currentColor;
}

.samira-plants-profile-name {
  display: block;
  font-size: 1.1rem;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
}

.samira-plants-profile-person {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  font-weight: 700;
  font-style: italic;
}

.samira-plants-profile-action {
  display: block;
  margin-top: 0.25rem;
  color: var(--samira-muted);
  font-size: 0.85rem;
}

/* NOTICE / EMPTY */

.samira-plants-notice,
.samira-plants-empty-state {
  width: 100%;
  margin-bottom: 2rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--samira-border);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.18);
  box-sizing: border-box;
}

.samira-plants-notice strong,
.samira-plants-notice span {
  display: block;
}

.samira-plants-notice span {
  margin-top: 0.25rem;
  color: var(--samira-muted);
}

.samira-plants-empty-state {
  text-align: center;
}

.samira-plants-empty-state h2 {
  margin: 0 0 0.5rem;
}

.samira-plants-empty-state p {
  margin: 0;
  color: var(--samira-muted);
}

/* TOOLBAR */

.samira-plants-toolbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.samira-plants-section-title {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.15;
  font-weight: 900;
}

.samira-plants-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  width: min(100%, 36rem);
}

.samira-plants-search {
  width: min(100%, 22rem);
  height: 2.75rem;
  padding: 0 1rem;
  border: 1px solid var(--samira-border);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
  outline: none;
  box-sizing: border-box;
}

.samira-plants-search::placeholder {
  color: rgba(255, 255, 255, 0.62);
}

.samira-plants-search:focus {
  border-color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.13);
}

/* GRID */

.samira-panels-grid {
  width: 100%;
  max-width: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(20rem, 20rem));
  gap: 2rem;
  align-items: stretch;
  justify-content: flex-start;
}

/* CARD - max 20rem */

.samira-panel-card {
  width: 100%;
  max-width: 20rem;
  min-width: 0;
  overflow: hidden;
  border-radius: 1.35rem;
  background: var(--samira-card);
  color: #102033;
  box-shadow: 0 1.6rem 4rem rgba(0, 0, 0, 0.24);
}

.samira-panel-card.is-hidden {
  display: none;
}

.samira-panel-card-header {
  padding: 1.35rem;
  background: linear-gradient(
    135deg,
    var(--samira-blue),
    var(--samira-blue-dark)
  );
  color: #ffffff;
}

.samira-panel-name {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.samira-panel-id {
  margin-top: 0.5rem;
  color: rgba(255, 255, 255, 0.78);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

/* CARD BODY */

.samira-panel-card-body {
  display: block;
  padding: 1.35rem;
}

.samira-panel-meta {
  width: 100%;
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1.35rem;
}

.samira-panel-meta-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.3rem;
  min-width: 0;
}

.samira-panel-meta-label {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
}

.samira-panel-meta-value {
  min-width: 0;
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 800;
  text-align: left;
  overflow-wrap: anywhere;
}

/* STATUS */

.samira-panel-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.samira-panel-status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: currentColor;
}

.samira-panel-status.connected {
  background: #dcfce7;
  color: #15803d;
}

.samira-panel-status.trouble {
  background: #fef3c7;
  color: #b45309;
}

.samira-panel-status.offline {
  background: #fee2e2;
  color: #b91c1c;
}

/* ACTIONS */

.samira-panel-actions {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
  margin: 0;
}

.samira-panel-btn {
  width: 100%;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 0.9rem;
  background: var(--samira-blue);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-sizing: border-box;
}

.samira-panel-btn:hover {
  background: var(--samira-blue-light);
  color: #ffffff;
}

.samira-panel-btn-secondary {
  background: #e2e8f0;
  color: #0f172a;
}

.samira-panel-btn-secondary:hover {
  background: #cbd5e1;
  color: #0f172a;
}

.samira-panel-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.samira-plants-header-logo {
  min-width: 15rem;
  filter: brightness(0) invert(1);
}

/* TABLET */

@media (max-width: 1024px) {
  .samira-plants-main {
    padding: 3rem 2rem 4rem;
  }

  .samira-panels-grid {
    grid-template-columns: repeat(auto-fill, minmax(20rem, 20rem));
  }
}

/* MOBILE */

@media (max-width: 768px) {
  .samira-plants-main {
    padding: 2rem 1rem 3rem;
  }

  .samira-plants-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2.75rem;
  }

  .samira-plants-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .samira-plants-toolbar-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .samira-plants-search {
    width: 100%;
  }

  .samira-panels-grid {
    grid-template-columns: repeat(auto-fill, minmax(20rem, 20rem));
    justify-content: center;
  }
}

/* VERY SMALL MOBILE */

@media (max-width: 380px) {
  .samira-panels-grid {
    grid-template-columns: 1fr;
  }

  .samira-panel-card {
    max-width: 100%;
  }
}

/**** /END SAMIRA IMPIANTI ****/
