/* ═══════════════════════════════════════════════════════
   Hill King Admin — CSS Module
   Standalone styles for Rey de la Colina management.
   Inherits admin.css custom properties (--bg, --card, etc.)
   ═══════════════════════════════════════════════════════ */

/* ── Layout ── */
.hk-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 20px 48px;
    font-family: 'Outfit', sans-serif;
}

.hk-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.hk-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text, #e5e7eb);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.hk-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted, #9ca3af);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid var(--border, #374151);
    transition: all .15s;
}
.hk-back:hover {
    color: var(--text, #e5e7eb);
    border-color: var(--accent, #f59e0b);
}

/* ── Stats Row ── */
.hk-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.hk-stat {
    background: var(--card, #1e2030);
    border: 1px solid var(--border, #374151);
    border-radius: 14px;
    padding: 16px;
    text-align: center;
}

.hk-stat-value {
    font-size: 28px;
    font-weight: 800;
    color: #f59e0b;
    font-feature-settings: 'tnum';
}

.hk-stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted, #9ca3af);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* ── Season Cards ── */
.hk-seasons {
    display: grid;
    gap: 16px;
}

.hk-season {
    background: var(--card, #1e2030);
    border: 1px solid var(--border, #374151);
    border-radius: 14px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}
.hk-season.active {
    border-color: #f59e0b44;
    box-shadow: 0 0 20px #f59e0b10;
}

.hk-season-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.hk-season-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--text, #e5e7eb);
    display: flex;
    align-items: center;
    gap: 8px;
}

.hk-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.hk-badge.active { background: #f59e0b22; color: #f59e0b; }
.hk-badge.visible { background: #22c55e22; color: #22c55e; }
.hk-badge.ended { background: #6b728022; color: #6b7280; }

.hk-season-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.hk-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hk-field-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted, #9ca3af);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hk-field-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text, #e5e7eb);
    font-feature-settings: 'tnum';
}

.hk-season-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 14px;
    border-top: 1px solid var(--border, #374151);
}

/* ── Buttons ── */
.hk-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 8px;
    border: 1px solid var(--border, #374151);
    background: transparent;
    color: var(--text, #e5e7eb);
    cursor: pointer;
    transition: all .15s;
}
.hk-btn:hover { border-color: var(--text-muted); }
.hk-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.hk-btn.primary {
    background: #f59e0b;
    color: #000;
    border-color: #f59e0b;
}
.hk-btn.primary:hover { background: #d97706; border-color: #d97706; }

.hk-btn.danger {
    color: #ef4444;
    border-color: #ef444433;
}
.hk-btn.danger:hover { background: #ef444411; border-color: #ef4444; }

.hk-btn.success {
    color: #22c55e;
    border-color: #22c55e33;
}
.hk-btn.success:hover { background: #22c55e11; border-color: #22c55e; }

.hk-btn .material-icons-outlined { font-size: 16px; }

/* ── Create Season Form ── */
.hk-form {
    background: var(--card, #1e2030);
    border: 1px solid var(--border, #374151);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
}

.hk-form h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text, #e5e7eb);
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hk-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.hk-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hk-form-group label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted, #9ca3af);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hk-form-group input,
.hk-form-group textarea,
.hk-form-group select {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border, #374151);
    background: var(--bg, #111318);
    color: var(--text, #e5e7eb);
    outline: none;
    transition: border-color .15s;
}
.hk-form-group input:focus,
.hk-form-group textarea:focus,
.hk-form-group select:focus {
    border-color: #f59e0b;
}

.hk-form-group textarea {
    min-height: 70px;
    resize: vertical;
}

.hk-form-group.full { grid-column: 1 / -1; }

/* ── Toast ── */
.hk-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    background: #1e293b;
    border: 1px solid #334155;
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
    z-index: 9999;
    transform: translateY(20px);
    opacity: 0;
    animation: hkToastIn .25s ease forwards;
}
.hk-toast.success { border-color: #22c55e44; }
.hk-toast.error { border-color: #ef444444; }

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

/* ── Empty state ── */
.hk-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted, #9ca3af);
}
.hk-empty .material-icons-outlined {
    font-size: 48px;
    opacity: 0.3;
    margin-bottom: 12px;
}

/* ── King info row ── */
.hk-king-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f59e0b0a;
    border-radius: 10px;
    margin-bottom: 14px;
}
.hk-king-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f59e0b;
}
.hk-king-name { font-weight: 600; }
.hk-king-since {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: auto;
}

/* ── Clock info ── */
.hk-clock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 20px;
    font-weight: 800;
    color: #f59e0b;
    font-feature-settings: 'tnum';
    font-variant-numeric: tabular-nums;
}
.hk-clock.expired { color: #6b7280; }

/* ── Responsive ── */
@media (max-width: 640px) {
    .hk-header { flex-direction: column; align-items: flex-start; }
    .hk-stats { grid-template-columns: 1fr 1fr; }
    .hk-season-grid { grid-template-columns: 1fr; }
    .hk-form-grid { grid-template-columns: 1fr; }
}
