/* CMS Canarias Cocina — cms.cocineroscanarias.com */
:root {
  --brand: #1D1D1B;
  --gold: #C8962A;
  --cream: #F5F0E8;
  --green: #2D7A4F;
  --yellow: #C8962A;
  --red: #C0392B;
  --grey: #8A8A8A;
  --border: #E0DAD0;
  --bg: #FAF8F5;
  --panel: #FFFFFF;
  --text: #1D1D1B;
  --muted: #8A8A8A;
  --radius: 6px;
  --font: Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--sans); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; }

/* NAV */
.nav { display: flex; align-items: center; gap: 24px; background: var(--brand); color: #fff; padding: 0 24px; height: 52px; position: sticky; top: 0; z-index: 100; }
.nav-brand { display: flex; align-items: center; gap: 10px; margin-right: 8px; }
.nav-logo-link { display: flex; align-items: center; text-decoration: none; }
.nav-logo-img { height: 30px; width: auto; filter: brightness(0) invert(1); opacity: 0.92; }
.nav-tag { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; background: var(--gold); color: #fff; padding: 2px 7px; border-radius: 3px; }
.nav-links { display: flex; gap: 4px; list-style: none; }
.nav-links a { color: #bbb; text-decoration: none; padding: 6px 12px; border-radius: var(--radius); font-size: 13px; transition: background 0.15s, color 0.15s; }
.nav-links a:hover, .nav-links a.active { background: rgba(255,255,255,0.12); color: #fff; }
.nav-logout { margin-left: auto; color: #888; text-decoration: none; font-size: 13px; }
.nav-logout:hover { color: #fff; }

/* MAIN */
.main { max-width: 1200px; margin: 0 auto; padding: 28px 24px 60px; }
.page-header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 24px; }
.page-header h1 { font-family: var(--font); font-size: 26px; font-weight: normal; }

/* PANELS */
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 20px; overflow: hidden; }
.panel-header { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); background: #FDFCF9; }
.panel-header h2 { font-size: 14px; font-weight: 600; }
.panel-header .btn { margin-left: auto; }
.panel > p { padding: 14px 18px; }
.panel-warn { border-color: #E6C068; }
.panel-warn .panel-header { background: #FDF9EC; }
.panel-success { border-color: #7EC8A0; }
.panel-success .panel-header { background: #F0FAF5; }
.panel-error { border-color: #E8A0A0; }
.panel-error .panel-header { background: #FDF5F5; }

/* STATS */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; }
.stat-num { font-family: var(--font); font-size: 36px; line-height: 1; margin-bottom: 6px; }
.stat-label { font-size: 12px; color: var(--muted); }
.stat-green .stat-num { color: var(--green); }
.stat-yellow .stat-num { color: var(--yellow); }
.stat-grey .stat-num { color: var(--grey); }
.stat-orange .stat-num { color: #C87820; }

/* GRIDS */
.grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* BADGES */
.badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; background: #E8E4DC; color: #555; }
.badge-production, .badge-ok { background: #D4EDDA; color: #155724; }
.badge-staging { background: #FFF3CD; color: #856404; }
.badge-warn { background: #FFF3CD; color: #856404; }
.badge-error { background: #F8D7DA; color: #721C24; }
.badge-yellow { background: #FFF3CD; color: #856404; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--radius); border: 1px solid transparent; font-size: 13px; font-family: inherit; cursor: pointer; text-decoration: none; transition: background 0.15s; }
.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-primary:hover { background: #333; }
.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:hover { background: #A93226; }
.btn-warning { background: #C87820; color: #fff; border-color: #C87820; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--cream); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-xs { padding: 2px 7px; font-size: 11px; }
.btn-full { width: 100%; justify-content: center; }

/* TABLES */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.table th { background: #FDFCF9; border-bottom: 1px solid var(--border); padding: 10px 14px; text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #FDFCF9; }
.center { text-align: center; }

/* DOTS */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.dot-green { background: #2D7A4F; }
.dot-yellow { background: #C8962A; }
.dot-grey { background: #D0CCc4; }

/* TAGS */
.tag { font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.04em; }
.tag-new { background: #D4EDDA; color: #155724; }
.tag-warn { background: #FFF3CD; color: #856404; }

/* ARTICLE LISTS */
.article-list { list-style: none; padding: 0; }
.article-list li { padding: 10px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.article-list li:last-child { border-bottom: none; }
.article-title { flex: 1; font-size: 13px; }
.article-date { font-size: 12px; }
.article-row { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.article-meta { display: flex; align-items: center; gap: 8px; }
.article-list-full li { padding: 12px 18px; }

/* BRAND CHIPS */
.brand-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 18px; }
.chip { padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.chip-production { background: #D4EDDA; color: #155724; }
.chip-staging { background: #FFF3CD; color: #856404; }
.chip-draft { background: #E8E4DC; color: #555; }

/* BRAND TABLE */
.brand-name { font-weight: 500; }

/* INLINE FORM */
.inline-form { display: flex; align-items: center; gap: 6px; }
.note-input { border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 8px; font-size: 12px; font-family: inherit; width: 180px; background: #FAFAF8; }
.note-input:focus { outline: none; border-color: var(--gold); }

/* FILE LIST */
.file-list { list-style: none; padding: 10px 18px; }
.file-item { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--border); }
.file-item:last-child { border-bottom: none; }
.file-icon { width: 18px; text-align: center; font-size: 12px; }
.file-modified .file-icon { color: var(--yellow); }
.file-new .file-icon { color: var(--green); font-weight: 700; }

/* DEPLOY */
.deploy-form { display: flex; align-items: flex-end; gap: 16px; padding: 14px 18px; }
.deploy-form .field { flex: 1; }
.mb-1 { margin-bottom: 8px; }
.excludes-detail { padding: 10px 18px; }
.excludes-detail summary { cursor: pointer; font-size: 12px; }
.exclude-list { list-style: none; padding: 8px 0; }
.exclude-list li { font-size: 12px; padding: 2px 0; }
.output-pre { background: #1D1D1B; color: #C8E6C9; font-size: 12px; padding: 16px 18px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; max-height: 400px; overflow-y: auto; }
.cmd-line { padding: 8px 18px; font-size: 12px; background: #F5F5F0; border-bottom: 1px solid var(--border); }

/* IMAGE GRID */
.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; padding: 16px 18px; }
.image-item { text-align: center; }
.image-item img { width: 100%; height: 100px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); }
.image-name { font-size: 11px; margin-top: 4px; word-break: break-all; }
.image-size { font-size: 11px; }

/* FILTER FORM */
.filter-form { display: flex; align-items: center; gap: 12px; padding: 14px 18px; }
.filter-form select { border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 10px; font-family: inherit; font-size: 13px; background: #FAFAF8; }
.filter-form select:focus { outline: none; border-color: var(--gold); }

/* MISC */
.muted { color: var(--muted); }
.mono { font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace; font-size: 12px; }
.panel-deploy { margin-top: 4px; }

/* LOGIN */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--brand); }
.login-box { background: var(--panel); border-radius: 10px; overflow: hidden; width: 360px; box-shadow: 0 8px 32px rgba(0,0,0,0.3); }
.login-header { text-align: center; margin-bottom: 28px; }
.login-brand { background: var(--brand); padding: 24px 24px 20px; display: flex; align-items: center; justify-content: center; gap: 12px; }
.login-logo-img { display: block; height: 40px; width: auto; max-width: 180px; }
.login-cms-tag { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; background: var(--gold); color: #fff; padding: 2px 7px; border-radius: 3px; align-self: center; }
.login-form-area { padding: 28px 32px 32px; }
.login-subtitle { color: var(--muted); font-size: 13px; margin-top: 4px; }
.login-form .field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.04em; }
.field input { width: 100%; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; font-family: inherit; font-size: 14px; background: #FAFAF8; }
.field input:focus { outline: none; border-color: var(--brand); }

/* ALERTS */
.alert { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 14px; font-size: 13px; }
.alert-error { background: #F8D7DA; color: #721C24; border: 1px solid #F5C6CB; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .grid-2col { grid-template-columns: 1fr; }
  .deploy-form { flex-direction: column; align-items: stretch; }
}
@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .main { padding: 16px; }
}
