/**
 * File: index.css
 * Hostinger Cron Manager — layout & components
 * Version: 1.0.1
 */

:root {
  --hcm-bg: #0f1419;
  --hcm-surface: #1a2332;
  --hcm-border: #2d3a4d;
  --hcm-text: #e8eef7;
  --hcm-muted: #8b9cb3;
  --hcm-accent: #3d8bfd;
  --hcm-accent-hover: #5c9dff;
  --hcm-danger: #f07178;
  --hcm-success: #7fd962;
  --hcm-radius: 10px;
  --hcm-font: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;
  --hcm-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--hcm-font);
  background: radial-gradient(1200px 600px at 10% -10%, #1e3a5f 0%, transparent 55%), var(--hcm-bg);
  color: var(--hcm-text);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.92em;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.12em 0.35em;
  border-radius: 4px;
}

.hcm-hidden {
  display: none !important;
}

.hcm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid var(--hcm-border);
  background: rgba(26, 35, 50, 0.85);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.hcm-header__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.hcm-header__title {
  font-weight: 650;
  letter-spacing: -0.02em;
}

.hcm-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: rgba(61, 139, 253, 0.18);
  color: var(--hcm-accent-hover);
  border: 1px solid rgba(61, 139, 253, 0.35);
}

.hcm-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
}

.hcm-panel__title {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
}

.hcm-muted {
  color: var(--hcm-muted);
  margin: 0 0 1rem;
  line-height: 1.55;
}

.hcm-mt-sm {
  margin-top: 0.75rem;
}

.hcm-card {
  background: var(--hcm-surface);
  border: 1px solid var(--hcm-border);
  border-radius: var(--hcm-radius);
  padding: 1.5rem;
  box-shadow: var(--hcm-shadow);
}

.hcm-form {
  display: grid;
  gap: 1rem;
  max-width: 380px;
}

.hcm-field {
  display: grid;
  gap: 0.35rem;
}

.hcm-field__label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--hcm-muted);
}

.hcm-field input,
.hcm-field select,
.hcm-field textarea {
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--hcm-border);
  background: #121923;
  color: var(--hcm-text);
  font: inherit;
}

.hcm-field textarea {
  min-height: 88px;
  resize: vertical;
}

.hcm-field input:focus,
.hcm-field select:focus,
.hcm-field textarea:focus {
  outline: 2px solid rgba(61, 139, 253, 0.45);
  outline-offset: 1px;
}

.hcm-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--hcm-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--hcm-text);
  font: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.hcm-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.hcm-btn--primary {
  background: rgba(61, 139, 253, 0.22);
  border-color: rgba(61, 139, 253, 0.55);
  color: #cfe4ff;
}

.hcm-btn--primary:hover {
  background: rgba(61, 139, 253, 0.32);
}

.hcm-btn--danger {
  border-color: rgba(240, 113, 120, 0.55);
  color: #ffc9cc;
  background: rgba(240, 113, 120, 0.12);
}

.hcm-btn--ghost {
  border-color: transparent;
  background: transparent;
}

.hcm-btn--icon {
  padding: 0.25rem 0.55rem;
  font-size: 1.25rem;
  line-height: 1;
}

.hcm-btn--sm {
  padding: 0.28rem 0.55rem;
  font-size: 0.85rem;
}

.hcm-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.hcm-toolbar__title {
  margin: 0;
  font-size: 1.25rem;
}

.hcm-table-wrap {
  overflow: auto;
  border: 1px solid var(--hcm-border);
  border-radius: var(--hcm-radius);
  background: var(--hcm-surface);
}

.hcm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.hcm-table th,
.hcm-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--hcm-border);
  vertical-align: top;
}

.hcm-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hcm-muted);
  font-weight: 700;
}

.hcm-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.hcm-table code {
  word-break: break-all;
}

.hcm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.hcm-icon {
  flex-shrink: 0;
}

.hcm-icon--lg {
  width: 28px;
  height: 28px;
}

/* Modal */
.hcm-modal-root {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.hcm-modal-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(6, 10, 16, 0.72);
  backdrop-filter: blur(4px);
}

.hcm-modal {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: min(88vh, 900px);
  display: flex;
  flex-direction: column;
  background: var(--hcm-surface);
  border: 1px solid var(--hcm-border);
  border-radius: var(--hcm-radius);
  box-shadow: var(--hcm-shadow);
  overflow: hidden;
}

.hcm-modal--wide {
  width: min(920px, 100%);
}

.hcm-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--hcm-border);
}

.hcm-modal__title {
  margin: 0;
  font-size: 1.05rem;
}

.hcm-modal__body {
  padding: 1rem;
  overflow: auto;
}

.hcm-modal__footer {
  display: flex;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--hcm-border);
  background: rgba(0, 0, 0, 0.12);
}

.hcm-modal__footer--right {
  justify-content: flex-end;
}

.hcm-browser {
  display: grid;
  gap: 0.75rem;
}

.hcm-browser__path {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.88rem;
}

.hcm-browser__list {
  border: 1px solid var(--hcm-border);
  border-radius: 8px;
  max-height: 340px;
  overflow: auto;
  background: #121923;
}

.hcm-browser__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.hcm-browser__row:hover {
  background: rgba(61, 139, 253, 0.12);
}

.hcm-browser__row:last-child {
  border-bottom: none;
}

.hcm-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 720px) {
  .hcm-grid-2 {
    grid-template-columns: 1fr;
  }
}

.hcm-job-form .hcm-field--cron-presets select {
  width: 100%;
}
