/* ============================================================
   MY TEPPANYAKI - Admin Dashboard CSS
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;600;700&family=Noto+Sans+JP:wght@300;400;700&display=swap');

:root {
  --red: #C0392B; --red-dark: #922B21; --red-light: #E74C3C;
  --black: #111111; --black-soft: #1E1E1E;
  --gray-dark: #2C2C2C; --gray-mid: #3a3a3a; --gray-light: #AAAAAA;
  --white: #FFFFFF; --green: #27AE60; --gold: #D4AC0D;
  --shadow: 0 4px 24px rgba(0,0,0,0.35);
  --transition: all 0.3s ease;
  --sidebar-w: 240px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body { font-family: 'Noto Sans JP', sans-serif; background: var(--black); color: var(--white); display: flex; min-height: 100vh; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ---- SIDEBAR ---- */
.sidebar { width: var(--sidebar-w); background: var(--black-soft); border-right: 1px solid #2a2a2a; height: 100vh; position: fixed; top: 0; left: 0; z-index: 100; display: flex; flex-direction: column; transition: var(--transition); overflow-y: auto; }
.sidebar-logo { padding: 18px 20px; border-bottom: 1px solid #2a2a2a; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.sidebar-logo img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--red); flex-shrink: 0; }
.sidebar-logo span { font-family: 'Oswald', sans-serif; font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; line-height: 1.2; }
.sidebar-logo span em { color: var(--red); font-style: normal; display: block; font-size: 0.7rem; }
.sidebar-nav { flex: 1; padding: 16px 0; }
.nav-section-label { font-family: 'Oswald', sans-serif; font-size: 0.65rem; letter-spacing: 2px; text-transform: uppercase; color: var(--gray-light); padding: 0 20px; margin: 14px 0 4px; }
.sidebar-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 20px; font-size: 0.87rem; color: var(--gray-light); border-left: 3px solid transparent; transition: var(--transition); position: relative; }
.sidebar-nav a:hover, .sidebar-nav a.active { background: rgba(192,57,43,0.1); color: var(--white); border-left-color: var(--red); }
.sidebar-nav a span:first-child { font-size: 1.05rem; flex-shrink: 0; }
.sidebar-badge { background: var(--red); color: var(--white); font-size: 0.65rem; font-weight: 700; padding: 1px 6px; border-radius: 20px; margin-left: auto; }
.sidebar-footer { padding: 14px 20px; border-top: 1px solid #2a2a2a; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.sidebar-footer a { color: var(--gray-light); font-size: 0.78rem; }
.sidebar-footer a:hover { color: var(--red); }

/* ---- MAIN ---- */
.main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.topbar { background: var(--black-soft); border-bottom: 1px solid #2a2a2a; padding: 0 24px; height: 62px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 50; }
.topbar-title { font-family: 'Oswald', sans-serif; font-size: 1.05rem; font-weight: 600; letter-spacing: 1px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-badge { background: var(--red); color: var(--white); font-size: 0.72rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.topbar-user { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--gray-light); }
.topbar-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--red); display: flex; align-items: center; justify-content: center; font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 0.85rem; cursor: pointer; flex-shrink: 0; }
.sidebar-toggle-btn { background: none; border: none; color: var(--white); font-size: 1.3rem; cursor: pointer; padding: 4px; }

/* ---- PAGE CONTENT ---- */
.page-content { padding: 24px; flex: 1; }
.page-header { margin-bottom: 24px; }
.page-header h1 { font-family: 'Oswald', sans-serif; font-size: 1.6rem; font-weight: 700; margin-bottom: 4px; }
.page-header p { color: var(--gray-light); font-size: 0.88rem; }
.empty-cell { text-align: center; color: #666; padding: 28px !important; }

/* ---- STATS ---- */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--black-soft); border: 1px solid #2a2a2a; border-radius: 6px; padding: 20px; display: flex; align-items: center; gap: 14px; transition: var(--transition); }
.stat-card:hover { border-color: var(--red); }
.stat-icon { width: 50px; height: 50px; border-radius: 8px; background: rgba(192,57,43,0.12); border: 1px solid rgba(192,57,43,0.25); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.stat-info strong { display: block; font-family: 'Oswald', sans-serif; font-size: 1.7rem; font-weight: 700; line-height: 1.1; }
.stat-info span { font-size: 0.75rem; color: var(--gray-light); text-transform: uppercase; letter-spacing: 1px; }

/* ---- PANELS ---- */
.panel { background: var(--black-soft); border: 1px solid #2a2a2a; border-radius: 6px; overflow: hidden; margin-bottom: 22px; }
.panel-header { padding: 14px 20px; border-bottom: 1px solid #2a2a2a; display: flex; align-items: center; justify-content: space-between; }
.panel-header h2 { font-family: 'Oswald', sans-serif; font-size: 0.92rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.panel-body { padding: 20px; }
.panel-body.hidden { display: none; }

/* ---- ALERTS ---- */
.alert { padding: 12px 16px; border-radius: 4px; margin-bottom: 18px; font-size: 0.88rem; }
.alert-success { background: rgba(39,174,96,0.1); border: 1px solid rgba(39,174,96,0.3); color: #2ecc71; }
.alert-error   { background: rgba(192,57,43,0.1); border: 1px solid rgba(192,57,43,0.3); color: #E74C3C; }

/* ---- BUTTONS ---- */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 4px; font-family: 'Oswald', sans-serif; font-size: 0.82rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; border: none; transition: var(--transition); white-space: nowrap; }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-dark); }
.btn-outline { background: transparent; color: var(--white); border: 1px solid #444; }
.btn-outline:hover { border-color: var(--red); color: var(--red); }
.btn-sm { padding: 5px 11px; font-size: 0.75rem; }
.btn-green { background: var(--green); color: var(--white); }
.btn-green:hover { background: #219a52; }
.btn-danger { background: transparent; color: var(--red); border: 1px solid var(--red); }
.btn-danger:hover { background: var(--red); color: var(--white); }

/* ---- TABLES ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
thead tr { border-bottom: 2px solid var(--red); }
th { padding: 11px 14px; text-align: left; font-family: 'Oswald', sans-serif; font-size: 0.73rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gray-light); }
td { padding: 12px 14px; border-bottom: 1px solid #222; color: #ddd; vertical-align: middle; }
tr:hover td { background: rgba(255,255,255,0.02); }
.badge { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.5px; }
.badge-green { background: rgba(39,174,96,0.15); color: var(--green); border: 1px solid rgba(39,174,96,0.3); }
.badge-red { background: rgba(192,57,43,0.15); color: var(--red-light); border: 1px solid rgba(192,57,43,0.3); }
.badge-gold { background: rgba(212,172,13,0.15); color: var(--gold); border: 1px solid rgba(212,172,13,0.3); }
.badge-gray { background: rgba(170,170,170,0.1); color: var(--gray-light); border: 1px solid rgba(170,170,170,0.2); }

/* ---- FORMS ---- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-full { grid-column: 1 / -1; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 0.77rem; text-transform: uppercase; letter-spacing: 1px; color: var(--gray-light); }
.form-group input, .form-group textarea, .form-group select { background: var(--gray-dark); border: 1px solid #333; color: var(--white); padding: 9px 13px; border-radius: 4px; font-family: 'Noto Sans JP', sans-serif; font-size: 0.87rem; transition: var(--transition); outline: none; width: 100%; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--red); box-shadow: 0 0 0 2px rgba(192,57,43,0.15); }
.form-group select option { background: var(--gray-dark); }
.form-group textarea { resize: vertical; min-height: 90px; }

/* ---- FILE UPLOAD ---- */
.file-upload-area { border: 2px dashed #444; border-radius: 6px; padding: 28px; text-align: center; cursor: pointer; transition: var(--transition); }
.file-upload-area:hover { border-color: var(--red); background: rgba(192,57,43,0.04); }
.file-upload-area p { color: var(--gray-light); font-size: 0.84rem; margin-top: 8px; }
.file-upload-area span { font-size: 2rem; }

/* ---- IMAGE GRID ---- */
.img-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(160px,1fr)); gap: 12px; }
.img-item { position: relative; border-radius: 4px; overflow: hidden; background: var(--gray-dark); }
.img-item.img-inactive { opacity: 0.45; }
.img-item img { width: 100%; height: 120px; object-fit: cover; display: block; }
.img-item-actions { position: absolute; top: 5px; right: 5px; display: flex; gap: 3px; }
.img-btn { width: 26px; height: 26px; border-radius: 3px; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 700; transition: var(--transition); }
.img-del { background: rgba(192,57,43,0.85); color: var(--white); }
.img-del:hover { background: var(--red); }

/* ---- TOAST ---- */
.toast { position: fixed; bottom: 20px; right: 20px; z-index: 9999; background: var(--black-soft); border: 1px solid var(--red); color: var(--white); padding: 12px 20px; border-radius: 6px; font-size: 0.88rem; box-shadow: var(--shadow); transform: translateY(60px); opacity: 0; transition: var(--transition); }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-color: var(--green); }

/* ---- RESPONSIVE ---- */
@media (max-width:768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 20px rgba(0,0,0,0.5); }
  .main { margin-left: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .page-content { padding: 16px; }
}
