/* ========================================
           CONTENT
        ======================================== */

.content {
  padding: 30px 32px 40px;

  max-width: 1450px;
}

.breadcrumb {
  display: flex;
  align-items: center;

  gap: 7px;

  color: var(--muted);

  font-size: 11px;

  margin-bottom: 18px;
}

.breadcrumb span:last-child {
  color: var(--blue);

  font-weight: 600;
}

/* ========================================
           HERO
        ======================================== */

.settings-hero {
  position: relative;

  overflow: hidden;

  border-radius: var(--radius);

  background: linear-gradient(115deg, #0d47c7 0%, #1769ff 55%, #08afd5 100%);

  padding: 27px 30px;

  color: #fff;

  margin-bottom: 22px;

  box-shadow: 0 15px 40px rgba(23, 105, 255, 0.16);
}

.settings-hero::before {
  content: "";

  position: absolute;

  width: 260px;
  height: 260px;

  border: 45px solid rgba(255, 255, 255, 0.055);

  border-radius: 50%;

  right: -70px;
  top: -115px;
}

.settings-hero::after {
  content: "";

  position: absolute;

  width: 160px;
  height: 160px;

  border: 30px solid rgba(255, 255, 255, 0.045);

  border-radius: 50%;

  right: 170px;
  bottom: -100px;
}

.hero-content {
  position: relative;

  z-index: 2;

  display: flex;
  align-items: center;

  gap: 17px;
}

.hero-icon {
  width: 58px;
  height: 58px;

  border-radius: 17px;

  background: rgba(255, 255, 255, 0.16);

  border: 1px solid rgba(255, 255, 255, 0.2);

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

  flex-shrink: 0;
}

.hero-icon svg {
  width: 29px;
  height: 29px;

  stroke: #fff;

  fill: none;

  stroke-width: 1.6;

  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-info h1 {
  font-size: 22px;

  font-weight: 800;

  letter-spacing: -0.6px;

  margin-bottom: 5px;
}

.hero-info p {
  font-size: 11px;

  opacity: 0.78;
}

/* ========================================
           GRID
        ======================================== */

.settings-grid {
  display: grid;

  grid-template-columns:
    minmax(0, 1.35fr)
    minmax(310px, 0.65fr);

  gap: 22px;

  align-items: start;
}

.card {
  background: var(--white);

  border: 1px solid var(--border);

  border-radius: var(--radius);

  box-shadow: var(--shadow);

  overflow: hidden;
}

.card-header {
  padding: 21px 23px 17px;

  border-bottom: 1px solid var(--border);

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

  gap: 15px;
}

.card-title {
  font-size: 14px;

  font-weight: 700;

  letter-spacing: -0.2px;
}

.card-desc {
  font-size: 10px;

  color: var(--muted);

  margin-top: 4px;
}

.card-body {
  padding: 23px;
}

/* ========================================
           SETTING ITEM
        ======================================== */

.setting-list {
  display: flex;
  flex-direction: column;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;

  padding: 16px 0;

  border-bottom: 1px solid var(--border);
}

.setting-item:first-child {
  padding-top: 0;
}

.setting-item:last-child {
  border-bottom: 0;

  padding-bottom: 0;
}

.setting-left {
  display: flex;
  align-items: center;

  gap: 13px;

  min-width: 0;
}

.setting-icon {
  width: 38px;
  height: 38px;

  border-radius: 11px;

  background: #eef5ff;

  color: var(--blue);

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

  flex-shrink: 0;
}

.setting-icon.cyan {
  background: #e9fafd;

  color: var(--cyan);
}

.setting-icon.green {
  background: #e9faf3;

  color: var(--green);
}

.setting-icon.orange {
  background: #fff4e7;

  color: var(--orange);
}

.setting-icon.purple {
  background: #f0edff;

  color: var(--purple);
}

.setting-icon.red {
  background: #fff0ef;

  color: var(--red);
}

.setting-icon svg {
  width: 18px;
  height: 18px;

  stroke: currentColor;

  fill: none;

  stroke-width: 1.8;

  stroke-linecap: round;
  stroke-linejoin: round;
}

.setting-text {
  min-width: 0;
}

.setting-text strong {
  display: block;

  font-size: 11px;

  font-weight: 600;

  margin-bottom: 3px;
}

.setting-text span {
  display: block;

  color: var(--muted);

  font-size: 9px;

  line-height: 1.45;
}

/* ========================================
           TOGGLE
        ======================================== */

.switch {
  position: relative;

  width: 42px;
  height: 23px;

  flex-shrink: 0;
}

.switch input {
  opacity: 0;

  width: 0;
  height: 0;
}

.slider {
  position: absolute;

  inset: 0;

  cursor: pointer;

  background: #dce3ec;

  border-radius: 30px;

  transition: 0.25s;
}

.slider::before {
  content: "";

  position: absolute;

  width: 17px;
  height: 17px;

  left: 3px;
  top: 3px;

  background: #fff;

  border-radius: 50%;

  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);

  transition: 0.25s;
}

.switch input:checked + .slider {
  background: var(--blue);
}

.switch input:checked + .slider::before {
  transform: translateX(19px);
}

/* ========================================
           SELECT
        ======================================== */

.select-control {
  min-width: 145px;

  height: 37px;

  border: 1px solid var(--border);

  border-radius: 9px;

  background: #fff;

  color: var(--text);

  padding: 0 11px;

  font-size: 10px;

  outline: none;

  cursor: pointer;
}

.select-control:focus {
  border-color: rgba(23, 105, 255, 0.5);

  box-shadow: 0 0 0 3px rgba(23, 105, 255, 0.08);
}

/* ========================================
           SECURITY CARD
        ======================================== */

.security-list {
  display: flex;
  flex-direction: column;
}

.security-item {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 12px;

  padding: 14px 0;

  border-bottom: 1px solid var(--border);
}

.security-item:first-child {
  padding-top: 0;
}

.security-item:last-child {
  border-bottom: 0;

  padding-bottom: 0;
}

.security-info {
  display: flex;

  align-items: center;

  gap: 10px;
}

.security-info-icon {
  width: 35px;
  height: 35px;

  border-radius: 10px;

  background: #eef5ff;

  color: var(--blue);

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

  flex-shrink: 0;
}

.security-info-icon svg {
  width: 17px;
  height: 17px;

  stroke: currentColor;

  fill: none;

  stroke-width: 1.8;

  stroke-linecap: round;
  stroke-linejoin: round;
}

.security-info strong {
  display: block;

  font-size: 10px;

  font-weight: 600;
}

.security-info span {
  display: block;

  font-size: 8px;

  color: var(--muted);

  margin-top: 3px;
}

.status-badge {
  padding: 5px 8px;

  border-radius: 7px;

  font-size: 8px;

  font-weight: 600;

  color: var(--green);

  background: #eafaf3;

  white-space: nowrap;
}

/* ========================================
           LOGIN SESSION
        ======================================== */

.session-box {
  margin-top: 18px;

  padding: 13px;

  background: #f7f9fc;

  border: 1px solid var(--border);

  border-radius: 12px;
}

.session-top {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 10px;

  margin-bottom: 9px;
}

.session-title {
  font-size: 10px;

  font-weight: 700;
}

.session-current {
  font-size: 8px;

  color: var(--green);

  background: #eafaf3;

  padding: 4px 7px;

  border-radius: 6px;

  font-weight: 600;
}

.session-info {
  display: flex;

  align-items: center;

  gap: 9px;
}

.session-device {
  width: 31px;
  height: 31px;

  background: #fff;

  border: 1px solid var(--border);

  border-radius: 9px;

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

  color: var(--blue);
}

.session-device svg {
  width: 15px;
  height: 15px;

  stroke: currentColor;

  fill: none;

  stroke-width: 1.8;
}

.session-text strong {
  display: block;

  font-size: 9px;
}

.session-text span {
  display: block;

  color: var(--muted);

  font-size: 8px;

  margin-top: 2px;
}

/* ========================================
           DANGER ZONE
        ======================================== */

.danger-card {
  margin-top: 22px;

  border-color: #f5dede;
}

.danger-header {
  padding: 17px 20px;

  background: #fff8f8;

  border-bottom: 1px solid #f5e2e2;
}

.danger-title {
  color: var(--red);

  font-size: 12px;

  font-weight: 700;
}

.danger-desc {
  color: var(--muted);

  font-size: 9px;

  margin-top: 3px;
}

.danger-body {
  padding: 17px 20px;

  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 20px;
}

.danger-body strong {
  display: block;

  font-size: 10px;

  margin-bottom: 3px;
}

.danger-body span {
  font-size: 8px;

  color: var(--muted);

  line-height: 1.4;
}

.btn-danger {
  height: 36px;

  padding: 0 13px;

  border-radius: 9px;

  border: 1px solid #f1cccc;

  background: #fff;

  color: var(--red);

  font-size: 9px;

  font-weight: 600;

  cursor: pointer;

  white-space: nowrap;

  transition: 0.2s;
}

.btn-danger:hover {
  background: #fff0ef;
}

/* ========================================
           SAVE BUTTON
        ======================================== */

.save-area {
  display: flex;

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

  gap: 10px;

  margin-top: 22px;
}

.btn {
  height: 40px;

  padding: 0 17px;

  border-radius: 10px;

  border: 0;

  font-size: 10px;

  font-weight: 600;

  cursor: pointer;

  display: inline-flex;

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

  gap: 7px;

  transition: 0.2s;
}

.btn svg {
  width: 15px;
  height: 15px;

  stroke: currentColor;

  fill: none;

  stroke-width: 1.8;
}

.btn-secondary {
  background: #f1f4f8;

  color: #5f6d7e;
}

.btn-secondary:hover {
  background: #e9eef5;
}

.btn-primary {
  background: var(--blue);

  color: #fff;

  box-shadow: 0 5px 14px rgba(23, 105, 255, 0.18);
}

.btn-primary:hover {
  background: var(--blue-dark);

  transform: translateY(-1px);
}

/* ========================================
           TOAST
        ======================================== */

.toast {
  position: fixed;

  right: 25px;
  bottom: 25px;

  min-width: 280px;

  max-width: 360px;

  padding: 13px 15px;

  background: #182230;

  color: #fff;

  border-radius: 12px;

  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);

  display: flex;

  align-items: center;

  gap: 10px;

  font-size: 11px;

  transform: translateY(100px);

  opacity: 0;

  pointer-events: none;

  transition: 0.3s ease;

  z-index: 2000;
}

.toast.show {
  transform: translateY(0);

  opacity: 1;
}

.toast-icon {
  width: 25px;
  height: 25px;

  border-radius: 8px;

  background: rgba(24, 185, 121, 0.15);

  color: #45e69c;

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

  flex-shrink: 0;
}

.toast-icon svg {
  width: 14px;
  height: 14px;

  stroke: currentColor;

  fill: none;

  stroke-width: 2;
}

/* ========================================
           RESPONSIVE
        ======================================== */

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

  .right-column {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 22px;

    align-items: start;
  }

  .danger-card {
    margin-top: 0;

    grid-column: 1 / -1;
  }
}

@media (max-width: 850px) {
  .sidebar {
    transform: translateX(-100%);

    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main {
    margin-left: 0;
  }

  .mobile-menu {
    display: flex;
  }

  .topbar {
    padding: 0 20px;
  }

  .content {
    padding: 25px 20px 35px;
  }

  .right-column {
    grid-template-columns: 1fr;
  }

  .danger-card {
    grid-column: auto;
  }
}

@media (max-width: 650px) {
  .topbar {
    height: 68px;
  }

  .page-title {
    font-size: 16px;
  }

  .page-subtitle {
    display: none;
  }

  .user-info {
    display: none;
  }

  .user-mini {
    border-left: 0;

    padding-left: 0;
  }

  .notification {
    display: none;
  }

  .content {
    padding: 20px 15px 30px;
  }

  .settings-hero {
    padding: 22px;
  }

  .hero-icon {
    width: 52px;
    height: 52px;
  }

  .hero-info h1 {
    font-size: 19px;
  }

  .hero-info p {
    font-size: 10px;
  }

  .card-header {
    padding: 18px;
  }

  .card-body {
    padding: 18px;
  }

  .setting-item {
    align-items: flex-start;
  }

  .select-control {
    min-width: 125px;
  }

  .danger-body {
    align-items: flex-start;

    flex-direction: column;
  }

  .btn-danger {
    width: 100%;
  }

  .save-area {
    flex-direction: column-reverse;
  }

  .save-area .btn {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .setting-left {
    gap: 9px;
  }

  .setting-icon {
    width: 34px;
    height: 34px;
  }

  .setting-text strong {
    font-size: 10px;
  }

  .setting-text span {
    font-size: 8px;
  }

  .select-control {
    min-width: 105px;

    font-size: 9px;
  }
}
