/* ==========================================================================
   ARUIX Yönetim Paneli
   ========================================================================== */
:root {
    --bg: #0a0e1a;
    --panel: #111726;
    --panel-2: #0d1220;
    --line: rgba(255,255,255,0.07);
    --muted: #7f8496;
    --text: #eef1f8;
    --blue: #0066ff;
    --cyan: #00d4ff;
    --purple: #9d00ff;
    --ok: #00d492;
    --warn: #ffb020;
    --err: #ff4d6d;
    --sidebar: 260px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: var(--bg); color: var(--text); font-family: 'Inter', system-ui, sans-serif; font-size: 15px; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #070a12; }
::-webkit-scrollbar-thumb { background: #26304a; border-radius: 8px; }

/* ---------- LOGIN ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
    background: radial-gradient(1000px 500px at 50% -10%, rgba(0,102,255,0.15), transparent 60%), var(--bg); }
.login-card { width: 100%; max-width: 400px; background: linear-gradient(160deg, #131a2b, #0c1120); border: 1px solid var(--line); border-radius: 20px; padding: 40px 34px; box-shadow: 0 30px 60px rgba(0,0,0,0.5); }
.login-card .brand { text-align: center; margin-bottom: 28px; }
.login-card .brand img { height: 64px; filter: drop-shadow(0 0 14px rgba(0,102,255,0.4)); }
.login-card h1 { font-family: 'Rajdhani', sans-serif; font-size: 1.5rem; text-align: center; margin-bottom: 6px; letter-spacing: 1px; }
.login-card .sub { text-align: center; color: var(--muted); font-size: 0.9rem; margin-bottom: 28px; }

/* ---------- LAYOUT ---------- */
.admin { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar); background: linear-gradient(180deg, #0e1424, #0a0e1a); border-right: 1px solid var(--line); position: fixed; top: 0; bottom: 0; left: 0; display: flex; flex-direction: column; z-index: 50; transition: transform .3s; }
.sidebar .logo { padding: 24px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.sidebar .logo img { height: 40px; filter: drop-shadow(0 0 10px rgba(0,102,255,0.4)); }
.sidebar .logo span { font-family: 'Rajdhani', sans-serif; font-weight: 700; letter-spacing: 1px; font-size: 1.1rem; }
.nav { padding: 16px 12px; flex: 1; overflow-y: auto; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; color: var(--muted); font-weight: 500; margin-bottom: 4px; transition: .2s; }
.nav a svg { width: 20px; height: 20px; flex-shrink: 0; }
.nav a:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.nav a.active { background: linear-gradient(90deg, rgba(0,102,255,0.18), rgba(157,0,255,0.12)); color: #fff; box-shadow: inset 2px 0 0 var(--cyan); }
.nav .nav-badge { margin-left: auto; background: var(--err); color: #fff; font-size: 0.72rem; font-weight: 700; padding: 1px 8px; border-radius: 20px; }
.sidebar .foot { padding: 14px 18px; border-top: 1px solid var(--line); font-size: 0.82rem; color: var(--muted); }
.sidebar .foot a { color: var(--cyan); }

.main { flex: 1; margin-left: var(--sidebar); display: flex; flex-direction: column; min-width: 0; }
.topbar { height: 66px; border-bottom: 1px solid var(--line); background: rgba(13,18,32,0.8); backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: space-between; padding: 0 26px; position: sticky; top: 0; z-index: 40; }
.topbar h2 { font-family: 'Rajdhani', sans-serif; font-size: 1.35rem; letter-spacing: 0.5px; }
.topbar .right { display: flex; align-items: center; gap: 16px; }
.topbar .user { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.9rem; }
.topbar .avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--purple)); display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; }
.hamburger { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 8px; cursor: pointer; }
.content { padding: 28px 26px 60px; }

/* ---------- CARDS / GRID ---------- */
.grid { display: grid; gap: 18px; }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 26px; }
.metric { background: linear-gradient(160deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: flex; align-items: center; gap: 16px; }
.metric .ic { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.metric .ic.blue { background: rgba(0,102,255,0.14); color: var(--cyan); }
.metric .ic.purple { background: rgba(157,0,255,0.14); color: #c07bff; }
.metric .ic.green { background: rgba(0,212,146,0.14); color: var(--ok); }
.metric .ic.orange { background: rgba(255,176,32,0.14); color: var(--warn); }
.metric h3 { font-size: 1.9rem; font-family: 'Rajdhani', sans-serif; line-height: 1; }
.metric p { color: var(--muted); font-size: 0.88rem; margin-top: 4px; }

.card { background: linear-gradient(160deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-bottom: 22px; }
.card-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-head h3 { font-family: 'Rajdhani', sans-serif; font-size: 1.2rem; letter-spacing: 0.5px; }
.card-body { padding: 22px; }

/* ---------- TABLE ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.tbl th { text-align: left; padding: 13px 16px; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); white-space: nowrap; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.5px; }
table.tbl td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tr:hover td { background: rgba(255,255,255,0.02); }
table.tbl .thumb { width: 54px; height: 42px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
table.tbl .thumb.ph { display:flex; align-items:center; justify-content:center; color: var(--cyan); background: rgba(0,102,255,0.08); }
.row-title { font-weight: 600; color: #fff; }
.row-sub { color: var(--muted); font-size: 0.82rem; margin-top: 3px; }
.unread td { background: rgba(0,102,255,0.05); }
.unread .row-title::before { content:''; display:inline-block; width:8px; height:8px; background: var(--cyan); border-radius:50%; margin-right:8px; box-shadow:0 0 8px var(--cyan); }

/* ---------- BADGES ---------- */
.badge2 { display: inline-block; padding: 3px 11px; border-radius: 20px; font-size: 0.76rem; font-weight: 600; }
.badge2.on { background: rgba(0,212,146,0.14); color: var(--ok); }
.badge2.off { background: rgba(127,132,150,0.14); color: var(--muted); }

/* ---------- BUTTONS ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 10px; font-weight: 600; font-size: 0.92rem; cursor: pointer; border: 1px solid transparent; transition: .2s; font-family: 'Inter', sans-serif; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; }
.btn-p { background: linear-gradient(90deg, var(--blue), var(--purple)); color: #fff; box-shadow: 0 8px 20px rgba(0,38,255,0.25); }
.btn-p:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(157,0,255,0.35); }
.btn-g { background: rgba(255,255,255,0.05); border-color: var(--line); color: var(--text); }
.btn-g:hover { background: rgba(255,255,255,0.09); }
.btn-d { background: rgba(255,77,109,0.12); border-color: rgba(255,77,109,0.3); color: #ff8fa3; }
.btn-d:hover { background: var(--err); color: #fff; }
.btn-sm { padding: 7px 13px; font-size: 0.85rem; border-radius: 8px; }
.btn-icon { padding: 8px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- FORMS ---------- */
.form-row { margin-bottom: 20px; }
.form-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 0.9rem; }
label .hint { font-weight: 400; color: var(--muted); font-size: 0.82rem; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=date], input[type=number], select, textarea {
    width: 100%; padding: 12px 14px; background: #0b1120; border: 1px solid var(--line); border-radius: 10px; color: var(--text); font-family: inherit; font-size: 0.95rem; transition: .2s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0,212,255,0.12); }
textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237f8496' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.form-actions { display: flex; gap: 12px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.checkbox { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--blue); }
.checkbox label { margin: 0; }

/* Görsel yükleme önizleme */
.img-preview { width: 100%; max-width: 260px; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 12px; display: none; }
.img-preview.show { display: block; }
.current-img { width: 120px; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 10px; }

/* İkon seçici */
.icon-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 10px; }
.icon-opt { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--muted); cursor: pointer; transition: .2s; background: #0b1120; }
.icon-opt:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }
.icon-opt.sel { border-color: var(--cyan); color: var(--cyan); background: rgba(0,212,255,0.08); box-shadow: 0 0 0 2px rgba(0,212,255,0.15); }
.icon-opt svg { width: 24px; height: 24px; }

/* Ayar bölümleri */
.repeat-item { border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 14px; background: #0b1120; }
.repeat-item .rh { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.repeat-item .rh strong { color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: .5px; }

/* ---------- ALERT ---------- */
.alert { padding: 14px 18px; border-radius: 12px; margin-bottom: 20px; font-size: 0.92rem; border: 1px solid; display: flex; align-items: center; gap: 10px; }
.alert svg { width: 20px; height: 20px; flex-shrink: 0; }
.alert.success { background: rgba(0,212,146,0.1); border-color: rgba(0,212,146,0.35); color: #62e6bd; }
.alert.error { background: rgba(255,77,109,0.1); border-color: rgba(255,77,109,0.35); color: #ff90a4; }
.alert.info { background: rgba(0,102,255,0.1); border-color: rgba(0,102,255,0.3); color: #74a9ff; }

.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty svg { width: 54px; height: 54px; opacity: 0.4; margin-bottom: 14px; }

.msg-detail p { line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.msg-meta { display: grid; grid-template-columns: 130px 1fr; gap: 10px 16px; margin-bottom: 22px; }
.msg-meta dt { color: var(--muted); font-weight: 600; }
.msg-meta dd a { color: var(--cyan); }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 24px; flex-wrap: wrap; }
.tabs a { padding: 11px 18px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.active { color: #fff; border-bottom-color: var(--cyan); }

.section-title { font-family: 'Rajdhani', sans-serif; font-size: 1.05rem; color: var(--cyan); letter-spacing: .5px; margin: 6px 0 16px; padding-bottom: 8px; border-bottom: 1px solid var(--line); text-transform: uppercase; }

@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; }
    .hamburger { display: inline-flex; }
    .form-row.two { grid-template-columns: 1fr; }
    .content { padding: 20px 16px 50px; }
}
