/* ========================================
   아이비전 블로그 — 관리자(백오피스) 스타일
   (write.php · categories.php · auth.php 전용)
   공개 페이지는 /assets/css/blog.css 사용
   ======================================== */
:root{
	--bg: #f1f5f9;
	--surface: #ffffff;
	--ink: #0f172a;
	--mute: #64748b;
	--line: #e2e8f0;
	--brand: #0B3D91;
	--brand-2: #1e5fd0;
	--navy: #0a1d44;
	--navy-2: #050f25;
	--gold: #FFC43D;
	--shadow-sm: 0 4px 14px -6px rgba(15,23,42,0.10);
	--shadow-md: 0 14px 40px -16px rgba(15,23,42,0.18);
	--shadow-lg: 0 28px 60px -20px rgba(15,23,42,0.25);
}
*,*::before,*::after{ box-sizing:border-box; }
html,body{ margin:0; padding:0; background:var(--bg); color:var(--ink); font-family:'Pretendard','Noto Sans KR','Malgun Gothic',sans-serif; line-height:1.7; word-break:keep-all; }
a{ color:var(--brand); text-decoration:none; }
img{ max-width:100%; height:auto; display:block; }

/* ── 상단 헤더 ── */
.bhead{
	background:linear-gradient(135deg,#0a1d44 0%,#0B3D91 60%,#13316a 100%);
	color:#fff; padding:50px 24px 60px; position:relative; overflow:hidden;
}
.bhead::before{
	content:""; position:absolute; inset:0;
	background:radial-gradient(800px 400px at 20% 10%, rgba(255,196,61,0.20), transparent 60%);
	pointer-events:none; z-index:1;
}
.bhead .wrap{ max-width:1240px; margin:0 auto; position:relative; z-index:2; }
.bhead-top{ display:flex; align-items:center; justify-content:space-between; margin-bottom:30px; flex-wrap:wrap; gap:14px; }
.bhead-brand{ display:flex; align-items:center; gap:12px; color:#fff; font-weight:900; font-size:18px; letter-spacing:-0.01em; }
.bhead-brand .b-logo{ width:42px; height:42px; border-radius:10px; background:rgba(255,255,255,0.15); display:flex; align-items:center; justify-content:center; font-size:20px; }
.bhead-nav{ display:flex; gap:18px; flex-wrap:wrap; }
.bhead-nav a{ color:rgba(255,255,255,0.85); font-size:14px; font-weight:600; transition:color .2s; }
.bhead-nav a:hover{ color:var(--gold); }
.bhead h1{ font-size:clamp(28px, 4vw, 44px); font-weight:900; margin:0 0 12px; letter-spacing:-0.02em; line-height:1.2; }
.bhead p.sub{ font-size:clamp(14px, 1.4vw, 17px); color:rgba(255,255,255,0.85); margin:0; max-width:700px; }

/* ── 관리자 화면 ── */
.b-admin{ max-width:1100px; margin:-30px auto 60px; padding:0 24px; position:relative; z-index:3; }
.b-admin-card{ background:#fff; border-radius:16px; padding:30px 36px; box-shadow:var(--shadow-md); }
.b-admin h2{ margin:0 0 8px; font-size:24px; font-weight:900; }
.b-admin .sub{ color:var(--mute); margin:0 0 24px; }

/* ── 폼 ── */
.b-form .row{ display:grid; gap:16px; margin-bottom:18px; }
.b-form .row.row-2{ grid-template-columns:1fr 1fr; }
@media(max-width:640px){ .b-form .row.row-2{ grid-template-columns:1fr; } }
.b-form label{ display:block; font-size:13px; font-weight:800; color:var(--ink); margin-bottom:6px; }
.b-form input,.b-form select,.b-form textarea{
	width:100%; padding:12px 14px; border:1.5px solid var(--line); border-radius:9px;
	font-size:14px; font-family:inherit; color:var(--ink); background:#fff;
}
.b-form input:focus,.b-form select:focus,.b-form textarea:focus{ outline:none; border-color:var(--brand); box-shadow:0 0 0 3px rgba(11,61,145,0.12); }
.b-form textarea{ min-height:200px; line-height:1.7; resize:vertical; font-family:Consolas,'Malgun Gothic',monospace; }

/* ── 언어 탭 ── */
.b-lang-tabs{ display:flex; gap:5px; flex-wrap:wrap; padding:6px; background:#f1f5f9; border-radius:10px; margin-bottom:18px; }
.b-lang-tabs button{
	border:none; background:transparent; padding:9px 14px; border-radius:7px;
	font-size:13px; font-weight:700; color:var(--mute); cursor:pointer; transition:all .2s;
	display:inline-flex; align-items:center; gap:5px;
}
.b-lang-tabs button:hover{ background:#fff; color:var(--ink); }
.b-lang-tabs button.active{ background:#fff; color:var(--ink); box-shadow:var(--shadow-sm); }
.b-lang-tabs button .has-content{ display:inline-block; width:6px; height:6px; border-radius:50%; background:#10b981; margin-left:4px; }
.b-lang-tabs button .auto-mark{ display:inline-block; padding:1px 6px; border-radius:4px; background:#fef3c7; color:#92400e; font-size:9px; font-weight:900; margin-left:3px; }
.b-lang-pane{ display:none; }
.b-lang-pane.active{ display:block; }

/* ── 버튼 ── */
.b-btn{ display:inline-flex; align-items:center; gap:8px; padding:12px 24px; border-radius:9px; font-size:14px; font-weight:800; border:none; cursor:pointer; text-decoration:none; transition:all .2s; }
.b-btn-primary{ background:linear-gradient(135deg,var(--brand),var(--brand-2)); color:#fff; box-shadow:0 8px 20px -6px rgba(11,61,145,0.4); }
.b-btn-primary:hover{ transform:translateY(-2px); box-shadow:0 12px 28px -6px rgba(11,61,145,0.55); }
.b-btn-ghost{ background:transparent; color:var(--mute); border:1.5px solid var(--line); }
.b-btn-ghost:hover{ border-color:var(--mute); color:var(--ink); }
.b-btn-warn{ background:#fef3c7; color:#92400e; border:1.5px solid #fcd34d; }
.b-btn-warn:hover{ background:#fde68a; }
.b-btn-danger{ background:#fee2e2; color:#991b1b; border:1.5px solid #fecaca; }
.b-btn-danger:hover{ background:#fecaca; }

.b-actions{ display:flex; gap:10px; flex-wrap:wrap; margin-top:24px; padding-top:24px; border-top:1px solid var(--line); }

/* ── 로그인 화면 ── */
.b-login{ max-width:420px; margin:80px auto; padding:36px 32px; background:#fff; border-radius:16px; box-shadow:var(--shadow-md); }
.b-login h2{ margin:0 0 6px; font-size:22px; font-weight:900; }
.b-login .err{ background:#fee2e2; color:#991b1b; padding:10px 14px; border-radius:8px; font-size:13px; margin-bottom:14px; }

/* ── 자동 번역 진행 표시 ── */
.b-translating{ display:none; align-items:center; gap:10px; padding:14px 18px; background:#dbeafe; color:#1e40af; border-radius:10px; font-size:13px; font-weight:700; margin-bottom:14px; }
.b-translating.show{ display:flex; }
.b-translating .spin{ width:16px; height:16px; border:2px solid #1e40af; border-right-color:transparent; border-radius:50%; animation:bspin 0.7s linear infinite; }
@keyframes bspin{ to{transform:rotate(360deg);} }
