/* TIM-OE Professional Backup panel. Scope: /settings injected module. */
.timoe-backup-pro {
  margin: 0 0 1rem 0;
  border: 1px solid rgba(148,163,184,.22);
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(248,250,252,.94));
  box-shadow: 0 22px 55px rgba(15,23,42,.07);
  border-radius: 28px;
  padding: 1rem;
}

.timoe-backup-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  padding: 1rem;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(14,165,233,.16), transparent 30%),
    linear-gradient(135deg, #f8fbff, #eef6ff);
  border: 1px solid rgba(148,163,184,.16);
}

.timoe-backup-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .35rem .7rem;
  background: rgba(15,23,42,.06);
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .68rem;
  font-weight: 900;
}

.timoe-backup-hero h2 {
  margin: .45rem 0 .2rem;
  color: #0f172a;
  font-size: clamp(1.35rem, 1.8vw, 1.8rem);
  line-height: 1.05;
  font-weight: 1000;
  letter-spacing: -.04em;
}

.timoe-backup-hero p,
.timoe-backup-card p {
  margin: 0;
  color: #64748b;
  font-size: .9rem;
  line-height: 1.45;
}

.timoe-backup-actions,
.timoe-backup-import-actions {
  display: flex;
  gap: .65rem;
  flex-wrap: wrap;
}

.timoe-backup-actions button,
.timoe-backup-import-actions button,
.timoe-backup-file span {
  border: 0;
  min-height: 2.75rem;
  padding: 0 1rem;
  border-radius: 15px;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  box-shadow: 0 12px 24px rgba(15,23,42,.08);
}

.timoe-backup-actions button {
  background: #0f172a;
  color: #fff;
}

.timoe-backup-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(340px,.8fr);
  gap: .9rem;
  margin-top: .9rem;
}

.timoe-backup-card {
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 22px;
  padding: 1rem;
  background: rgba(255,255,255,.86);
  min-width: 0;
}

.timoe-backup-card h3 {
  margin: 0 0 .3rem;
  color: #0f172a;
  font-size: 1.05rem;
  line-height: 1.2;
  font-weight: 1000;
}

.timoe-backup-file {
  display: block;
  margin-top: .9rem;
}

.timoe-backup-file input {
  display: none;
}

.timoe-backup-file span {
  width: 100%;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid rgba(37,99,235,.12);
  box-shadow: none;
}

.timoe-backup-file-name {
  margin-top: .55rem;
  color: #64748b;
  font-size: .82rem;
  font-weight: 800;
  word-break: break-word;
}

.timoe-backup-status {
  margin-top: .75rem;
  min-height: 2.6rem;
  border-radius: 16px;
  padding: .75rem .85rem;
  border: 1px dashed rgba(148,163,184,.32);
  color: #64748b;
  background: rgba(248,250,252,.75);
  font-size: .85rem;
  font-weight: 850;
}

.timoe-backup-status.ok {
  border-style: solid;
  border-color: rgba(16,185,129,.24);
  background: #ecfdf5;
  color: #047857;
}

.timoe-backup-status.error {
  border-style: solid;
  border-color: rgba(239,68,68,.24);
  background: #fef2f2;
  color: #b91c1c;
}

.timoe-backup-status.info {
  border-style: solid;
  border-color: rgba(59,130,246,.22);
  background: #eff6ff;
  color: #1d4ed8;
}

.timoe-backup-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
  margin-top: .8rem;
}

.timoe-backup-count {
  border: 1px solid rgba(148,163,184,.18);
  background: #fff;
  border-radius: 16px;
  padding: .65rem;
  min-width: 0;
}

.timoe-backup-count span {
  display: block;
  color: #64748b;
  font-size: .72rem;
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timoe-backup-count strong {
  display: block;
  color: #0f172a;
  margin-top: .2rem;
  font-size: 1.05rem;
  font-weight: 1000;
}

.timoe-backup-cats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
  margin: .9rem 0;
}

.timoe-backup-cats label {
  display: flex;
  align-items: center;
  gap: .45rem;
  min-height: 2.55rem;
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 15px;
  background: #fff;
  padding: .55rem .65rem;
  color: #334155;
  font-size: .82rem;
  font-weight: 850;
}

.timoe-backup-cats input {
  width: 1rem;
  height: 1rem;
  accent-color: #2563eb;
}

.timoe-backup-import-actions {
  margin-top: .7rem;
}

.timoe-backup-import-actions button.merge {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
}

.timoe-backup-import-actions button.replace {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #fff;
}

.timoe-backup-warning {
  margin-top: .75rem !important;
  font-size: .78rem !important;
}

html.dark .timoe-backup-pro,
body.dark .timoe-backup-pro,
html.dark .timoe-backup-card,
body.dark .timoe-backup-card,
html.dark .timoe-backup-count,
body.dark .timoe-backup-count,
html.dark .timoe-backup-cats label,
body.dark .timoe-backup-cats label {
  background: rgba(15,23,42,.82);
  border-color: rgba(51,65,85,.86);
}

html.dark .timoe-backup-hero,
body.dark .timoe-backup-hero {
  background: linear-gradient(135deg, rgba(15,23,42,.92), rgba(30,41,59,.72));
  border-color: rgba(51,65,85,.86);
}

html.dark .timoe-backup-hero h2,
html.dark .timoe-backup-card h3,
html.dark .timoe-backup-count strong,
body.dark .timoe-backup-hero h2,
body.dark .timoe-backup-card h3,
body.dark .timoe-backup-count strong {
  color: #f8fafc;
}

html.dark .timoe-backup-hero p,
html.dark .timoe-backup-card p,
html.dark .timoe-backup-count span,
html.dark .timoe-backup-file-name,
body.dark .timoe-backup-hero p,
body.dark .timoe-backup-card p,
body.dark .timoe-backup-count span,
body.dark .timoe-backup-file-name {
  color: #94a3b8;
}

@media (max-width: 1180px) {
  .timoe-backup-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .timoe-backup-pro {
    padding: .75rem;
    border-radius: 22px;
  }

  .timoe-backup-hero {
    align-items: stretch;
    flex-direction: column;
    padding: .9rem;
  }

  .timoe-backup-actions button,
  .timoe-backup-import-actions button {
    width: 100%;
  }

  .timoe-backup-counts,
  .timoe-backup-cats {
    grid-template-columns: 1fr;
  }
}

/* TIM-OE 20260501 v2: professional backup placement fix */
[data-timoe-legacy-backup-hidden] { display: none !important; }
body.timoe-settings-backup-pro-page .timoe-backup-pro {
  margin: 1rem 0 1.15rem !important;
  width: 100%;
  max-width: none;
  position: relative;
  z-index: 1;
  padding: .9rem !important;
  border-radius: 24px !important;
}
body.timoe-settings-backup-pro-page .timoe-backup-hero {
  align-items: center;
  padding: .9rem 1rem !important;
  border-radius: 20px !important;
}
body.timoe-settings-backup-pro-page .timoe-backup-hero h2 {
  font-size: clamp(1.25rem, 1.45vw, 1.6rem) !important;
}
body.timoe-settings-backup-pro-page .timoe-backup-hero p,
body.timoe-settings-backup-pro-page .timoe-backup-card p {
  font-size: .82rem !important;
}
body.timoe-settings-backup-pro-page .timoe-backup-grid {
  grid-template-columns: minmax(0,1.1fr) minmax(360px,.9fr) !important;
  gap: .75rem !important;
  margin-top: .75rem !important;
}
body.timoe-settings-backup-pro-page .timoe-backup-card {
  border-radius: 18px !important;
  padding: .85rem !important;
}
body.timoe-settings-backup-pro-page .timoe-backup-counts {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: .45rem !important;
}
body.timoe-settings-backup-pro-page .timoe-backup-count {
  border-radius: 13px !important;
  padding: .52rem !important;
}
body.timoe-settings-backup-pro-page .timoe-backup-cats {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: .42rem !important;
}
body.timoe-settings-backup-pro-page .timoe-backup-cats label {
  min-height: 2.28rem !important;
  border-radius: 13px !important;
  font-size: .78rem !important;
}
body.timoe-settings-backup-pro-page .timoe-backup-actions button,
body.timoe-settings-backup-pro-page .timoe-backup-import-actions button,
body.timoe-settings-backup-pro-page .timoe-backup-file span {
  min-height: 2.45rem !important;
  border-radius: 13px !important;
  font-size: .84rem !important;
}
@media (max-width: 1180px) {
  body.timoe-settings-backup-pro-page .timoe-backup-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 760px) {
  body.timoe-settings-backup-pro-page .timoe-backup-counts,
  body.timoe-settings-backup-pro-page .timoe-backup-cats { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  body.timoe-settings-backup-pro-page .timoe-backup-hero { align-items: stretch; flex-direction: column; }
}
@media (max-width: 520px) {
  body.timoe-settings-backup-pro-page .timoe-backup-counts,
  body.timoe-settings-backup-pro-page .timoe-backup-cats { grid-template-columns: 1fr !important; }
}

/* TIM-OE 20260501 real Settings slot fix */
#timoe-professional-backup-mount{width:100%;display:block;}
#timoe-professional-backup-mount .timoe-backup-pro{margin:0;}
#timoe-professional-backup-mount .timoe-backup-grid{grid-template-columns:1fr;}
#timoe-professional-backup-mount .timoe-backup-counts{grid-template-columns:repeat(2,minmax(0,1fr));}
#timoe-professional-backup-mount .timoe-backup-hero{align-items:flex-start;}
#timoe-professional-backup-mount .timoe-backup-actions{width:100%;}
#timoe-professional-backup-mount .timoe-backup-actions button{flex:1 1 160px;}


/* TIM-OE 20260501 settings balance fix: make backup card more compact to remove left-side whitespace */
#timoe-professional-backup-mount .timoe-backup-pro{
  padding:.72rem !important;
  border-radius:20px !important;
}
#timoe-professional-backup-mount .timoe-backup-hero{
  padding:.72rem .8rem !important;
  gap:.55rem !important;
  border-radius:16px !important;
}
#timoe-professional-backup-mount .timoe-backup-hero h2{
  font-size:1.1rem !important;
  line-height:1.02 !important;
  margin:.22rem 0 .08rem !important;
}
#timoe-professional-backup-mount .timoe-backup-hero p,
#timoe-professional-backup-mount .timoe-backup-card p,
#timoe-professional-backup-mount .timoe-backup-warning{
  font-size:.72rem !important;
  line-height:1.35 !important;
}
#timoe-professional-backup-mount .timoe-backup-grid{
  grid-template-columns:1fr !important;
  gap:.55rem !important;
  margin-top:.55rem !important;
}
#timoe-professional-backup-mount .timoe-backup-card{
  padding:.72rem !important;
  border-radius:16px !important;
}
#timoe-professional-backup-mount .timoe-backup-card h3{
  font-size:.9rem !important;
  margin:0 0 .15rem !important;
}
#timoe-professional-backup-mount .timoe-backup-file{margin-top:.55rem !important;}
#timoe-professional-backup-mount .timoe-backup-file-name{margin-top:.35rem !important;font-size:.72rem !important;}
#timoe-professional-backup-mount .timoe-backup-status{margin-top:.45rem !important;min-height:2rem !important;padding:.55rem .65rem !important;font-size:.74rem !important;border-radius:12px !important;}
#timoe-professional-backup-mount .timoe-backup-counts{
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:.34rem !important;
  margin-top:.55rem !important;
}
#timoe-professional-backup-mount .timoe-backup-count{
  padding:.42rem .46rem !important;
  border-radius:11px !important;
}
#timoe-professional-backup-mount .timoe-backup-count span{
  font-size:.62rem !important;
}
#timoe-professional-backup-mount .timoe-backup-count strong{
  margin-top:.12rem !important;
  font-size:.92rem !important;
  line-height:1 !important;
}
#timoe-professional-backup-mount .timoe-backup-cats{
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:.34rem !important;
  margin:.55rem 0 !important;
}
#timoe-professional-backup-mount .timoe-backup-cats label{
  min-height:1.95rem !important;
  padding:.36rem .45rem !important;
  border-radius:11px !important;
  font-size:.69rem !important;
  gap:.3rem !important;
  line-height:1.15 !important;
}
#timoe-professional-backup-mount .timoe-backup-cats input{width:.88rem !important;height:.88rem !important;}
#timoe-professional-backup-mount .timoe-backup-actions,
#timoe-professional-backup-mount .timoe-backup-import-actions{
  gap:.4rem !important;
}
#timoe-professional-backup-mount .timoe-backup-actions button,
#timoe-professional-backup-mount .timoe-backup-import-actions button,
#timoe-professional-backup-mount .timoe-backup-file span{
  min-height:2rem !important;
  border-radius:11px !important;
  font-size:.73rem !important;
  padding:0 .65rem !important;
}
@media (max-width: 760px){
  #timoe-professional-backup-mount .timoe-backup-counts,
  #timoe-professional-backup-mount .timoe-backup-cats{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
}
@media (max-width: 520px){
  #timoe-professional-backup-mount .timoe-backup-counts,
  #timoe-professional-backup-mount .timoe-backup-cats{grid-template-columns:1fr !important;}
}
