/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* BACKGROUND */
body {
  background: linear-gradient(180deg, #0f1722 0%, #1E2129 100%);
  color: #e6edf3;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}


/* CARD PRINCIPAL */
.container {
  min-height: 100vh;
  /* Altura mínima igual à altura da tela */
  display: flex;
  flex-direction: column;
  width: 380px;
  max-width: 95%;
  background: #131720;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* LOGO */
.logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

/* TITULO */
h1 {
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: .5px;
}

/* SEÇÃO */
.section {
  margin-top: 12px;
  padding: 14px;
  background: #0d1117;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* LABEL */
label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  opacity: .8;
}

/* INPUT */
input[type="number"],
input[type="time"],
input[type="text"] {
  width: 100%;
  padding: 10px;
  background: #0b0f14;
  border: 1px solid #222933;
  border-radius: 8px;
  color: white;
  outline: none;
}

input:focus {
  border-color: #22c55e;
}

/* CHECKBOX */
.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

/* BOTÕES */
button {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: none;
  margin-top: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
}

.btn-copy {
  background-color: #1E2129;
  color: white;
  border: none;
  margin-top: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy.copied {
  background-color: #2ecc71;
}

/* BOTÃO PRINCIPAL */
.btn-save {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
}

.btn-stop {
  background: linear-gradient(135deg, #d6372c, #a32b16);
  color: white;
}

.btn-open {
  background: linear-gradient(135deg, #5092e9, #3047c9);
  color: white;
}


.btn-save:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, .35);
}

/* BOTÃO RESET */
.btn-reset {
  background: #1f2937;
  color: #d1d5db;
}

.btn-reset:hover {
  background: #374151;
}

.info-text ol {
  margin-top: 10px;
  padding-left: 20px;
}

.info-text li {
  margin-bottom: 10px;
  line-height: 1.4;
}

/* STATUS */
.status {
  margin-top: 14px;
  padding: 10px;
  border-radius: 10px;
  background: #020617;
  border: 1px solid rgba(34, 197, 94, .3);
  font-size: 13px;
  text-align: center;
}

.status.success {
  color: #22c55e;
}

.hidden {
  display: none;
}

.fade-in {
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.status-line {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  margin-bottom: 6px;
}

.timer {
  font-size: 18px;
  font-weight: bold;
  color: #b43232;
  /* cor de destaque */
  background: #0f1722;
  padding: 36px 12px;
  border-radius: 50%;
  /* Deixa circular */
  border: 2px solid #b43232;
  /* Borda sutil */
  min-width: 50px;
  text-align: center;
}

.divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 12px 0;
}

.log-box {
  max-height: 150px;
  overflow-y: auto;
  background: #0b0f14;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #222933;
  font-size: 12px;
}

/* TOGGLE SWITCH */

.switch-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px;
  background: #0d1117;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.switch-group .switch {
  flex-shrink: 0;
}

.switch-group>div {
  flex: 1;
  text-align: right;
}

.switch-title {
  font-weight: 600;
  font-size: 14px;
}

.switch-desc {
  font-size: 12px;
  opacity: .6;
}

.switch {
  position: relative;
  width: 46px;
  height: 26px;
  display: inline-block;
}

.switch input {
  display: none;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #2b3240;
  border-radius: 30px;
  transition: .25s;
}

.slider:before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: .25s;
}

.switch input:checked+.slider {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

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

/* texto ao lado */
.section-switch {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 14px;
  background: #0d1117;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.switch-text .title {
  font-weight: 600;
  font-size: 14px;
}

.switch-text .desc {
  font-size: 12px;
  opacity: .6;
}


/* Header do painel */
.app-header,
.panel-header,
.config-header {
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  justify-content: flex-start;
  gap: 10px;
}

/* Display flex */
.display-flex {
  display: flex;
}

/* Botão voltar estilo app */
.back-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #0b0f14;
  border: 1px solid #222933;
  color: #e6edf3;
  font-size: 28px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;

}

.back-btn:hover {
  background: #161b22;
}

/* grupo logo + título */
.title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}


.panel-title,
.config-title {
  font-weight: 600;
  font-size: 15px;
  opacity: .9;
  text-align: center;
  color: #e6edf3;
  margin-top: 10px;
  margin-bottom: 10px;
}

.config-input {
  width: 100%;
  padding: 10px;
  background: #0b0f14;
  border: 1px solid #222933;
  border-radius: 8px;
  color: white;
  outline: none;
  margin-bottom: 10px;
}

/* Logs */
.log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  margin-bottom: 6px;
  font-size: 13px;
  opacity: .8;
}

.btn-clear {
  background: #1f2937;
  border: none;
  padding: 4px 10px;
  border-radius: 8px;
  color: #cbd5e1;
  cursor: pointer;
  font-size: 12px;
  transition: .2s;
  width: 60px;
}

.btn-clear:hover {
  background: #374151;
  color: white;
}

/* ACCORDION DARK */

.accordion-item {
  background: #0d1117;
  border-radius: 14px;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transition: all .2s ease;
}

.accordion-header {
  padding: 14px 16px;
  font-weight: 600;
  cursor: pointer;
  background: #131720;
  color: #e6edf3;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordion-header::after {
  content: "›";
  font-size: 18px;
  opacity: .6;
  transition: transform .2s ease;
}

.accordion-item.active .accordion-header::after {
  transform: rotate(90deg);
}

.accordion-content {
  display: none;
  padding: 16px;
  background: #0b0f14;
}

.accordion-item.active .accordion-content {
  display: block;
  animation: fadeIn .25s ease;
}

/* FORM GRID */

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.form-group {
  margin-bottom: 14px;
}

/* Switch ajuste dark */

.switch-desc {
  color: rgba(230, 237, 243, 0.6);
}

#restartTimer {
  font-weight: bold;
  color: #f59e0b;
}