:root {
  --petrol: #113b3a; --petrol-deep: #0b2a29; --petrol-soft: #1d5553;
  --lime: #d8f36a; --lime-deep: #b9db45; --ivory: #f4f1e8; --ivory-deep: #e7e2d2;
  --muted: #5b6f6d; --danger: #c94b3f; --warn: #d9a21b; --ok: #2e8f5e;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body.cloud-page {
  margin: 0;
  font-family: 'Tajawal', system-ui, sans-serif;
  background: #F8FAFC;
  color: #0F172A;
  line-height: 1.6;
}

/* Auth Page */
.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
  background: #F1F5F9;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 2.25rem 2rem;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auth-logo {
  display: inline-block;
  margin-bottom: 0.5rem;
}
.auth-logo .logo {
  height: 32px;
}
.auth-card h1 {
  font-size: 1.6rem;
  color: #113B3A;
  margin: 0 0 4px;
}

/* Modern Dashboard Layout */
.cloud-dashboard-app {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Sidebar (ImageKit-inspired dark obsidian-teal SaaS layout) */
.cloud-sidebar {
  width: 270px;
  flex-shrink: 0;
  background: #0B2221;
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 1.25rem 1rem 1rem;
  z-index: 100;
  transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1), padding 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.side-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.85rem;
}

.side-brand-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.side-logo {
  height: 24px;
  filter: brightness(0) invert(1);
  display: block;
}

.side-brand-badge {
  background: rgba(16, 185, 129, 0.18);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.35);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 6px;
}

.side-collapse-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94A3B8;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.16s ease;
}

.side-collapse-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.side-nav-group-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748B;
  padding: 10px 12px 4px;
  letter-spacing: 0.6px;
  user-select: none;
}

.side-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: #CBD5E1;
  font-family: inherit;
  font-size: 0.91rem;
  font-weight: 500;
  cursor: pointer;
  text-align: start;
  transition: all 0.16s ease;
}

.side-nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #FFFFFF;
}

.side-nav-item.active {
  background: rgba(17, 59, 58, 0.85);
  color: #D8F36A;
  font-weight: 700;
  border-color: rgba(216, 243, 106, 0.25);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

.side-nav-item.active::before {
  content: '';
  position: absolute;
  inset-inline-start: -4px;
  top: 6px;
  bottom: 6px;
  width: 4px;
  background: #10B981;
  border-radius: 4px;
}

.side-nav-item * {
  pointer-events: none;
}

.side-nav-locked {
  opacity: 0.82;
}
.side-nav-locked .lock-icon {
  margin-inline-start: auto;
  color: #94A3B8;
}

.nav-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-icon svg,
svg.nav-icon {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* User profile card at bottom of sidebar (ImageKit inspired) */
.side-user-card {
  background: rgba(8, 24, 23, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.side-user-profile-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.side-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10B981, #047857);
  color: #FFFFFF;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
  letter-spacing: 0.5px;
}

.side-user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.side-user-name {
  font-size: 0.84rem;
  color: #FFFFFF;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-user-email {
  font-size: 0.72rem;
  color: #94A3B8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-plan-badge {
  background: #D8F36A;
  color: #0B2A29;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
}

.side-quota-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(0, 0, 0, 0.22);
  padding: 7px 9px;
  border-radius: 8px;
}

.side-quota-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.side-quota-label {
  font-size: 0.7rem;
  color: #94A3B8;
}

.side-quota-val {
  font-size: 0.72rem;
  color: #E2E8F0;
  font-weight: 600;
}

.side-bar {
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  overflow: hidden;
}

.side-user-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 6px;
  margin-top: 2px;
}

.side-home-action,
.side-logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  padding: 4px 6px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.side-home-action {
  color: #94A3B8;
}
.side-home-action:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
}

.side-logout-btn {
  color: #F87171;
}
.side-logout-btn:hover {
  color: #EF4444;
  background: rgba(239, 68, 68, 0.12);
}

/* Collapsed Sidebar State */
@media (min-width: 901px) {
  .cloud-sidebar.collapsed {
    width: 76px;
    padding: 1.25rem 0.65rem;
  }
  .cloud-sidebar.collapsed .side-brand-badge,
  .cloud-sidebar.collapsed .side-brand-wrap,
  .cloud-sidebar.collapsed .side-nav-group-title,
  .cloud-sidebar.collapsed .nav-text,
  .cloud-sidebar.collapsed .lock-icon,
  .cloud-sidebar.collapsed .side-user-meta,
  .cloud-sidebar.collapsed .side-plan-badge,
  .cloud-sidebar.collapsed .side-quota-info,
  .cloud-sidebar.collapsed .side-home-action span,
  .cloud-sidebar.collapsed .side-logout-btn span {
    display: none !important;
  }
  .cloud-sidebar.collapsed .side-top {
    justify-content: center;
  }
  .cloud-sidebar.collapsed .side-nav-item {
    justify-content: center;
    padding: 10px;
  }
  .cloud-sidebar.collapsed .side-user-profile-row {
    justify-content: center;
  }
  .cloud-sidebar.collapsed .side-user-actions {
    justify-content: center;
    gap: 8px;
  }
  .cloud-sidebar.collapsed .side-collapse-btn {
    transform: rotate(180deg);
  }
}

/* Main Area */
.cloud-main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cloud-main-header {
  background: #FFFFFF;
  border-bottom: 1px solid #E2E8F0;
  padding: 0.85rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.main-header-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #113B3A;
}

.cloud-main-header .muted {
  margin: 1px 0 0;
  font-size: 0.82rem;
  color: #64748B;
}

.cloud-main-content {
  padding: 1.25rem 1.75rem 3rem;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

/* Cards & Generic Elements */
.card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}
.card h2 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }

.muted { color: #64748B; margin: 4px 0; }
.text-secondary { color: #64748B; font-size: 0.85rem; }
.error { color: #DC2626; min-height: 1.4em; margin: 0; font-size: 0.9rem; }
.warn { color: #854D0E; background: #FEF9C3; border: 1px solid #FEF08A; padding: 10px 14px; border-radius: 10px; font-size: 0.92rem; }
.auth-success-msg {
  color: #166534;
  background: #DCFCE7;
  border: 1px solid #BBF7D0;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.92rem;
  margin: 8px 0;
  text-align: center;
  font-weight: 500;
  line-height: 1.45;
}

.auth-terms-wrap {
  margin: 10px 0 6px;
}
.terms-checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: #475569;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  line-height: 1.4;
}
.terms-checkbox-label input[type='checkbox'] {
  width: 17px;
  height: 17px;
  accent-color: #113B3A;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}
.terms-checkbox-label a {
  color: #113B3A;
  font-weight: 700;
  text-decoration: underline;
  transition: opacity 0.15s;
}
.terms-checkbox-label a:hover {
  opacity: 0.8;
}

input:not([type='checkbox']) {
  font: inherit;
  padding: 8px 12px;
  border: 1px solid rgba(17, 59, 58, 0.16);
  border-radius: 8px;
  background: #FFFFFF;
  color: #0F172A;
  outline: none;
  font-size: 0.88rem;
  transition: all 0.15s ease;
}
input:not([type='checkbox']):focus {
  border-color: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.14);
}

/* Modernized SaaS Select Elements */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  font-family: 'Tajawal', system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: #113B3A;
  background-color: #FFFFFF;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23113B3A' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  padding: 8px 14px 8px 36px;
  border: 1px solid rgba(17, 59, 58, 0.18);
  border-radius: 9px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  outline: none;
  line-height: 1.4;
  transition: all 0.15s ease;
}

[dir="ltr"] select, body:not(.rtl) select {
  background-position: right 12px center;
  padding: 8px 36px 8px 14px;
}

select:hover {
  border-color: #10B981;
  background-color: #F8FAF9;
}

select:focus {
  border-color: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.14);
}

select option {
  background: #FFFFFF;
  color: #0F172A;
  padding: 10px 14px;
  font-family: 'Tajawal', system-ui, sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
}

/* Custom Dropdown UI (Replaces OS native gray menus) */
.custom-select-wrap {
  position: relative;
  display: inline-flex;
}

.custom-select-trigger {
  font-family: 'Tajawal', system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: #113B3A;
  background: #FFFFFF;
  border: 1px solid rgba(17, 59, 58, 0.18);
  border-radius: 9px;
  padding: 7px 12px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
  user-select: none;
}

.custom-select-trigger:hover {
  border-color: #10B981;
  background: #F8FAF9;
}

.custom-select-wrap.is-open .custom-select-trigger {
  border-color: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
  background: #FFFFFF;
}

.custom-select-icon {
  color: #10B981;
  flex-shrink: 0;
}

.custom-select-chevron {
  color: #64748B;
  transition: transform 0.2s ease;
  margin-inline-start: 4px;
  flex-shrink: 0;
}

.custom-select-wrap.is-open .custom-select-chevron {
  transform: rotate(180deg);
  color: #10B981;
}

.custom-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-start: 0;
  min-width: 210px;
  background: #FFFFFF;
  border: 1px solid rgba(17, 59, 58, 0.12);
  border-radius: 12px;
  box-shadow: 0 14px 38px rgba(17, 59, 58, 0.14), 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 100;
  max-height: 280px;
  overflow-y: auto;
  animation: dropdownIn 0.15s ease-out forwards;
}

@keyframes dropdownIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.custom-select-wrap.is-open .custom-select-menu {
  display: flex;
}

#keyExpiryCustomWrap .custom-select-trigger {
  min-width: 240px;
}
#keyExpiryCustomWrap .custom-select-menu {
  min-width: 250px;
}
#folderSelCustomWrap .custom-select-trigger {
  min-width: 170px;
}
#annSpeedCustomWrap {
  width: 100%;
}
#annSpeedCustomWrap .custom-select-trigger {
  width: 100%;
}

.custom-select-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  text-align: start;
  transition: all 0.12s ease;
}

.custom-select-item:hover {
  background: #F1F5F9;
  color: #113B3A;
}

.custom-select-item.is-selected {
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
  font-weight: 700;
}

.item-folder-icon {
  color: #64748B;
  flex-shrink: 0;
}

.custom-select-item.is-selected .item-folder-icon {
  color: #10B981;
}

.item-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-check-icon {
  color: #10B981;
  margin-inline-start: auto;
  flex-shrink: 0;
}

/* Search input with icon */
.search-input-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.search-input-wrap .search-icon {
  position: absolute;
  inset-inline-start: 11px;
  color: #94A3B8;
  pointer-events: none;
}

label {
  display: block;
  margin: 8px 0;
  font-weight: 500;
  font-size: 0.94rem;
}
label input:not([type='checkbox']) {
  display: block;
  width: 100%;
  margin-top: 4px;
}

.btn {
  font: inherit;
  cursor: pointer;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  color: #113B3A;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.92rem;
  transition: all 0.15s ease;
}
.btn:hover {
  background: #F1F5F9;
}
.btn.primary {
  background: #113B3A;
  color: #FFFFFF;
  border-color: #113B3A;
}
.btn.primary:hover {
  background: #1D5553;
}
.btn.danger {
  background: #EF4444;
  color: #FFFFFF;
  border-color: #EF4444;
}
.btn.danger:hover {
  background: #DC2626;
}
.btn.link {
  border: 0;
  background: none;
  color: #113B3A;
  padding: 6px 0;
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.badge {
  background: #D8F36A;
  color: #0B2A29;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap !important;
  flex-shrink: 0;
  line-height: 1.2;
}
.badge-soon {
  background: #FEF3C7 !important;
  color: #92400E !important;
}
.badge-wa {
  background: #DCFCE7 !important;
  color: #166534 !important;
}

.bar {
  height: 6px;
  background: #E2E8F0;
  border-radius: 99px;
  overflow: hidden;
  margin: 8px 0 6px;
}
.bar-fill {
  height: 100%;
  width: 0;
  background: #113B3A;
  transition: width 0.4s ease;
}
.bar-fill.high { background: #EAB308; }
.bar-fill.full { background: #EF4444; }

.code, code {
  background: #0B2A29;
  color: #D8F36A;
  padding: 12px 14px;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 0.86rem;
  display: block;
  direction: ltr;
  text-align: left;
}

/* Hub Hero Banner */
.hub-hero-banner {
  background: linear-gradient(135deg, #113B3A 0%, #1D5553 100%);
  color: #FFFFFF;
  border-radius: 12px;
  padding: 1rem 1.35rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 4px 16px rgba(17, 59, 58, 0.08);
}
.hub-hero-banner h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 4px;
}
.hub-hero-banner p {
  margin: 0;
  color: #E2E8F0;
  font-size: 0.86rem;
  line-height: 1.4;
}
.hub-banner-badge {
  background: #D8F36A;
  color: #0B2A29;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 5px 14px;
  border-radius: 99px;
  white-space: nowrap;
}

/* Hub Services Grid - Compact 5 Columns */
.services-hub-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

@media (max-width: 960px) {
  .services-hub-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .services-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .services-hub-grid {
    grid-template-columns: 1fr;
  }
}

.hub-service-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
  transition: all 0.15s ease;
  min-height: 0;
}
.hub-service-card:hover {
  box-shadow: 0 8px 22px rgba(17, 59, 58, 0.08);
  border-color: rgba(17, 59, 58, 0.25);
  transform: translateY(-2px);
}
.hub-service-card.active-service {
  border: 1.5px solid #113B3A;
  background: #FCFDFD;
}

.service-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.service-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #113B3A;
  flex-shrink: 0;
}
.service-card-top .badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  white-space: nowrap;
}

.service-card-title-group h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.service-card-title-group small {
  display: block;
  margin-top: 2px;
  color: #64748B;
  font-size: 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.service-desc {
  font-size: 0.74rem;
  color: #64748B;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2rem;
}

.service-metrics-box,
.service-soon-box,
.service-wa-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.72rem;
}

.service-metrics-box .row span,
.service-wa-box span,
.service-soon-box span {
  font-size: 0.7rem;
  color: #64748B;
}
.service-metrics-box .row strong,
.service-wa-box strong,
.service-soon-box strong {
  font-size: 0.75rem;
  color: #0F172A;
}

.service-metrics-box .bar {
  height: 4px;
  background: #E2E8F0;
  border-radius: 99px;
  overflow: hidden;
  margin-top: 2px;
}

.metrics-sub-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: #64748B;
  margin-top: 2px;
}

.service-card-actions {
  display: flex;
  gap: 4px;
  margin-top: auto;
  padding-top: 4px;
}

.service-card-actions .btn {
  width: 100%;
  padding: 5px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  justify-content: center;
  white-space: nowrap;
}

/* Files Upload Box */
.drop {
  border: 2px dashed #CBD5E1;
  border-radius: 12px;
  padding: 1.25rem 1rem;
  text-align: center;
  transition: all 0.2s ease;
  background: #F8FAFC;
}
.drop.over {
  border-color: #113B3A;
  background: #F1F5F9;
}
.drop-icon {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}
.pick {
  color: #113B3A;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.uploads {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 10px;
}
.uploads li {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  font-size: 0.9rem;
}
.uploads progress {
  grid-column: 1 / -1;
  width: 100%;
  height: 6px;
  accent-color: #113B3A;
}

/* Files Grid */
.files {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.file {
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  overflow: hidden;
  background: #FFFFFF;
  position: relative;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.file:hover {
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}
.file.sel {
  outline: 3px solid #113B3A;
}
.thumb {
  aspect-ratio: 4 / 3;
  background: #F1F5F9;
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  color: #94A3B8;
  overflow: hidden;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.file .meta {
  padding: 10px 12px 6px;
  font-size: 0.86rem;
}
.file .name {
  font-weight: 700;
  color: #0F172A;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file .acts {
  display: flex;
  gap: 6px;
  padding: 4px 12px 12px;
}
.file .acts .btn {
  padding: 4px 10px;
  font-size: 0.8rem;
  flex: 1;
}
.file .chk {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  width: 20px;
  height: 20px;
  cursor: pointer;
  z-index: 2;
}

/* Overview Tab - Modern Compact 2-Column & Metric Tiles */
.overview-quotas-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
@media (max-width: 860px) {
  .overview-quotas-grid {
    grid-template-columns: 1fr;
  }
}

.overview-card {
  padding: 12px 14px;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-head-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.overview-card-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #F1F5F9;
  color: #113B3A;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.overview-card-foot {
  font-size: 0.78rem;
  margin-top: 4px;
}

.overview-inline-link {
  color: #10B981;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.76rem;
  transition: opacity 0.15s;
}
.overview-inline-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.badge-neutral {
  background: #F1F5F9 !important;
  color: #64748B !important;
  font-weight: 600 !important;
}

.overview-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}
@media (max-width: 768px) {
  .overview-stats-grid {
    grid-template-columns: 1fr;
  }
}

.stat-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 0;
  background: #FFFFFF;
}

.stat-icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  color: #113B3A;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-meta {
  display: flex;
  flex-direction: column;
}

.stat-tile .stat-n {
  font-size: 1.25rem;
  font-weight: 800;
  color: #113B3A;
  line-height: 1.15;
}

.stat-tile .stat-label {
  font-size: 0.74rem;
  color: #64748B;
  font-weight: 500;
}

.cdn-guide-card {
  padding: 12px 14px;
  margin-bottom: 0;
}

.cdn-code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #0B2221;
  color: #6EE7B7;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  overflow-x: auto;
}

.cdn-code-text {
  color: #A7F3D0;
  white-space: nowrap;
  font-size: 0.78rem;
  user-select: all;
}

.cdn-copy-btn {
  background: #113B3A;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4px 10px;
  font-size: 0.74rem;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.15s ease;
}
.cdn-copy-btn:hover {
  background: #10B981;
  border-color: #10B981;
}

.cdn-params-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.cdn-param-tag {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.7rem;
  color: #475569;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.cdn-param-tag code {
  color: #047857;
  font-weight: 700;
  font-family: monospace;
}

/* API Keys */
.keylist {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
}
.keylist li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid #E2E8F0;
  flex-wrap: wrap;
}
.keylist .prefix {
  font-family: monospace;
  direction: ltr;
  color: #64748B;
  background: #F1F5F9;
  padding: 3px 8px;
  border-radius: 6px;
}
.key-exp {
  font-size: 0.8rem;
  padding: 2px 10px;
  border-radius: 99px;
  background: #F1F5F9;
  color: #0F172A;
}
.key-exp.expired {
  background: #FEE2E2;
  color: #DC2626;
}
.newkey {
  background: #ECFCCB;
  border: 1px solid #D9F99D;
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

/* Plans Grid & Modern SaaS Pricing System */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
  align-items: stretch;
}
@media (max-width: 1080px) {
  .plans-grid {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin-inline: auto;
  }
}
.plan-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  padding: 2.25rem 1.75rem 1.75rem;
  display: flex;
  flex-direction: column;
  position: relative;
  text-align: right;
  direction: rtl;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
}
.plan-card:hover {
  transform: translateY(-4px);
  border-color: #CBD5E1;
  box-shadow: 0 16px 36px rgba(17, 59, 58, 0.08);
}
.plan-card.featured {
  border: 2px solid #113B3A;
  background: linear-gradient(180deg, #FBFDFD 0%, #FFFFFF 100%);
  box-shadow: 0 12px 36px rgba(17, 59, 58, 0.1);
}
.plan-card.current-plan {
  border-color: #16A34A;
  box-shadow: 0 8px 28px rgba(22, 163, 74, 0.08);
}
.plan-popular-ribbon {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #113B3A 0%, #1A5452 100%);
  color: #FFFFFF;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 12px rgba(17, 59, 58, 0.25);
  pointer-events: none;
  white-space: nowrap;
}
.plan-card-header {
  display: flex;
  flex-direction: column;
}
.plan-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.plan-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  display: inline-block;
}
.plan-badge.badge-free {
  background: #F1F5F9;
  color: #475569;
}
.plan-badge.badge-pro {
  background: rgba(17, 59, 58, 0.08);
  color: #113B3A;
}
.plan-badge.badge-enterprise {
  background: rgba(30, 41, 59, 0.08);
  color: #0F172A;
}
.plan-active-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #16A34A;
  background: rgba(22, 163, 74, 0.1);
  padding: 3px 10px;
  border-radius: 999px;
}
.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16A34A;
}
.plan-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 6px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.plan-subtitle {
  font-size: 0.82rem;
  font-weight: 500;
  color: #94A3B8;
}
.plan-desc {
  font-size: 0.86rem;
  color: #64748B;
  line-height: 1.5;
  margin: 0 0 16px;
  min-height: 42px;
}
.plan-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}
.plan-price-value {
  font-size: 2.35rem;
  font-weight: 800;
  color: #113B3A;
  letter-spacing: -0.02em;
  line-height: 1;
}
.plan-price-period {
  font-size: 0.88rem;
  color: #64748B;
  font-weight: 500;
}
.plan-divider {
  height: 1px;
  background: #F1F5F9;
  margin: 16px 0;
}
.plan-features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.plan-features-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: #334155;
  line-height: 1.5;
}
.plan-check-svg {
  stroke: #16A34A;
  min-width: 17px;
  width: 17px;
  height: 17px;
  margin-top: 2px;
  flex-shrink: 0;
}
.plan-features-list li.feat-highlight {
  background: rgba(17, 59, 58, 0.04);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px dashed rgba(17, 59, 58, 0.16);
}
.plan-action-area {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid #F8FAFC;
}
.plan-upgrade-btn {
  width: 100%;
  padding: 13px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #113B3A;
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(17, 59, 58, 0.2);
  transition: all 0.2s ease;
}
.plan-upgrade-btn:hover {
  background: #164e4d;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(17, 59, 58, 0.28);
}
.plan-active-btn {
  width: 100%;
  padding: 12px 18px;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 12px;
  background: rgba(22, 163, 74, 0.08);
  color: #16A34A;
  border: 1px solid rgba(22, 163, 74, 0.2);
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.plan-contact-btn {
  width: 100%;
  padding: 12px 18px;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  background: #FFFFFF;
  color: #0F172A;
  border: 1px solid #CBD5E1;
  transition: all 0.2s ease;
}
.plan-contact-btn:hover {
  border-color: #113B3A;
  color: #113B3A;
  background: #F8FAFC;
  transform: translateY(-2px);
}
.plan-btn-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.plan-sub-portal-link {
  font-size: 0.82rem;
  color: #113B3A;
  text-decoration: underline;
  font-weight: 600;
}
/* Plans Trust & Guarantees Bar */
.plans-trust-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  padding: 1.5rem;
  margin-top: 2rem;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
}
@media (max-width: 960px) {
  .plans-trust-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .plans-trust-bar {
    grid-template-columns: 1fr;
  }
}
.plans-trust-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.plans-trust-item svg {
  color: #113B3A;
  min-width: 20px;
  margin-top: 2px;
  flex-shrink: 0;
}
.plans-trust-item strong {
  display: block;
  font-size: 0.88rem;
  color: #0F172A;
  margin-bottom: 2px;
}
.plans-trust-item small {
  display: block;
  font-size: 0.77rem;
  color: #64748B;
  line-height: 1.45;
}

/* Modal Dialog */
.cloud-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 42, 41, 0.6);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 10000;
}
.cloud-modal {
  background: #FFFFFF;
  border-radius: 18px;
  padding: 24px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
}
.cloud-modal h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  color: #113B3A;
}
.cloud-modal input {
  width: 100%;
  margin-top: 10px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  inset-inline: 0;
  margin: 0 auto;
  width: max-content;
  max-width: 90vw;
  background: #0B2A29;
  color: #FFFFFF;
  padding: 12px 22px;
  border-radius: 12px;
  z-index: 10001;
  font-weight: 600;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}
.toast.err {
  background: #DC2626;
}

/* Responsive */
@media (max-width: 900px) {
  .cloud-dashboard-app {
    flex-direction: column;
  }
  .cloud-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-left: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .side-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .side-nav-item {
    width: auto;
    flex: 1;
    min-width: 130px;
  }
  .cloud-main-header, .cloud-main-content {
    padding-inline: 1.25rem;
  }
}


/* --- Modern Auth Card & ImageKit-Inspired Form Elements --- */
.auth-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: #FFFFFF;
  border: 1px solid var(--border-color, #E2E8F0);
  border-radius: 18px;
  padding: 2.25rem 2rem 1.85rem;
  box-shadow: 0 20px 45px -12px rgba(17, 59, 58, 0.14), 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-modal-close {
  position: absolute;
  top: 14px;
  inset-inline-end: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #E2E8F0;
  background: #F8FAFC;
  color: #64748B;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.auth-modal-close:hover {
  background: #F1F5F9;
  color: #0F172A;
}

.auth-card-head {
  margin-bottom: 0.75rem;
  text-align: center;
}

.auth-card-head h1,
.auth-card-head h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: #113B3A;
  margin: 0 0 4px;
}

.auth-card-head .muted {
  font-size: 0.9rem;
  color: #64748B;
  margin: 0;
  line-height: 1.5;
}

.google-auth-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 11px 16px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  color: #0F172A;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.18s ease;
}

.google-auth-btn:hover {
  background: #F8FAFC;
  border-color: #94A3B8;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.google-svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 0.85rem 0 0.5rem;
  color: #94A3B8;
  font-size: 0.82rem;
  font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #E2E8F0;
}

.auth-divider span {
  padding: 0 12px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.35rem;
}
.auth-field[hidden] {
  display: none !important;
}
.auth-field label {
  display: block;
  margin: 4px 0;
  font-weight: 600;
  font-size: 0.88rem;
  color: #1E293B;
  text-align: start;
}
.auth-field input:not([type='checkbox']) {
  display: block;
  width: 100%;
  margin-top: 3px;
  font-family: inherit;
  padding: 10px 14px;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  background: #FFFFFF;
  color: #0F172A;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-field input:focus {
  border-color: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
  outline: none;
}

.auth-field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3px;
}
.auth-field-header label {
  margin: 0;
}
.auth-forgot-link {
  font-size: 0.82rem !important;
  color: #059669 !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  padding: 0 !important;
  background: none !important;
  border: none !important;
  cursor: pointer;
  transition: color 0.15s ease;
}
.auth-forgot-link:hover {
  color: #113B3A !important;
  text-decoration: underline !important;
}

.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.password-input-wrap input {
  width: 100%;
  padding-right: 42px !important;
  padding-left: 14px !important;
}
.password-toggle-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
  z-index: 2;
}
.password-toggle-btn:hover {
  color: #113B3A;
  background: #F1F5F9;
}
.password-toggle-btn svg {
  width: 18px;
  height: 18px;
}

.auth-submit-btn {
  width: 100%;
  margin-top: 0.6rem;
  padding: 12px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 10px;
  background: #113B3A;
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  transition: all 0.18s ease;
}
.auth-submit-btn:hover {
  background: #0D2E2D;
  box-shadow: 0 4px 14px rgba(17, 59, 58, 0.25);
}

.auth-card-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  padding-top: 8px;
  font-size: 0.88rem;
}

.auth-card-footer button {
  font-size: 0.88rem;
  color: #113B3A;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  transition: color 0.15s;
}
.auth-card-footer button:hover {
  color: #059669;
  text-decoration: underline;
}

.auth-legal-notice {
  text-align: center;
  font-size: 0.77rem;
  color: #94A3B8;
  margin-top: 6px;
  line-height: 1.45;
}
.auth-legal-notice a {
  color: #64748B;
  text-decoration: underline;
}
.auth-legal-notice a:hover {
  color: #113B3A;
}

.auth-back-link {
  display: block;
  text-align: center;
  margin-top: 10px;
  font-size: 0.86rem;
  color: #64748B;
  text-decoration: none;
  transition: color 0.15s ease;
}
.auth-back-link:hover {
  color: #113B3A;
}

/* ==========================================================================
   Refined Plans & Settings Styles
   ========================================================================== */
.plans-intro-card {
  padding: 2rem 2.25rem;
}

.plans-intro-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #F1F5F9;
}

.plans-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #113B3A;
  background: rgba(17, 59, 58, 0.08);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.plans-current-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 10px 18px;
  text-align: center;
  min-width: 150px;
}

.plans-current-label {
  display: block;
  font-size: 0.76rem;
  color: #64748B;
  margin-bottom: 2px;
}

.plans-current-name {
  font-size: 1.05rem;
  color: #113B3A;
  font-weight: 700;
}

/* Billing Portal Card */
.billing-portal-card {
  padding: 1.5rem 1.75rem;
  border-inline-start: 4px solid #113B3A;
  background: #FFFFFF;
  margin-top: 1.25rem;
  max-width: 780px;
}

.billing-card-layout {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.billing-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(17, 59, 58, 0.08);
  color: #113B3A;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.billing-details {
  flex: 1;
  min-width: 250px;
}

.billing-details h3 {
  font-size: 1.1rem;
  margin: 0 0 4px;
  color: #0F172A;
}

.billing-details p {
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0;
}

.billing-action-wrap {
  flex-shrink: 0;
}

.billing-portal-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  font-size: 0.88rem;
  text-decoration: none !important;
}

/* Settings Tab Container & 2-Column Responsive SaaS Layout */
.settings-container {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  max-width: 100%;
  align-items: stretch;
}

@media (max-width: 960px) {
  .settings-container {
    grid-template-columns: 1fr;
  }
}

.settings-card {
  padding: 1.75rem 2rem;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
}

.settings-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 1.1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid #F1F5F9;
}

.settings-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(17, 59, 58, 0.08);
  color: #113B3A;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.settings-icon-badge.danger {
  background: #FEE2E2;
  color: #DC2626;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  flex: 1;
}

.settings-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.settings-form label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #1E293B;
  text-align: right;
}

.settings-form .input {
  width: 100%;
  max-width: 100%;
  padding: 10px 14px;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  font-size: 0.95rem;
  background: #FFFFFF;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.settings-form .input:focus {
  outline: none;
  border-color: #113B3A;
  box-shadow: 0 0 0 3px rgba(17, 59, 58, 0.12);
}

.settings-form .input:disabled {
  background: #F8FAFC;
  color: #64748B;
  cursor: not-allowed;
}

.input-with-badge {
  position: relative;
  display: flex;
  align-items: center;
}

.badge-verified {
  position: absolute;
  left: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #166534;
  background: #DCFCE7;
  padding: 2px 8px;
  border-radius: 6px;
  pointer-events: none;
}

.settings-form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: auto;
  padding-top: 0.75rem;
}

.settings-feedback-success {
  font-size: 0.88rem;
  font-weight: 600;
  color: #166534;
  background: #DCFCE7;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #BBF7D0;
}

.google-security-notice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 16px;
  margin-top: 0.25rem;
}

.google-notice-icon {
  margin-top: 2px;
  flex-shrink: 0;
}

/* Danger Zone Card (Full width horizontal banner) */
.settings-card.danger-card {
  grid-column: 1 / -1;
  border: 1px solid #FECACA;
  background: #FFFBFB;
  padding: 1.25rem 1.75rem;
  border-radius: 16px;
}

.danger-row-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.danger-info-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 280px;
}

.danger-action-wrap {
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

