/* =========================================================
   BERITA LIGASB — ADMIN PANEL (MODERN)
   Glassmorphism · background GIF kucing-kicau
   ========================================================= */

:root{
    --green:#3bf21f;
    --green-2:#1fae08;
    --green-glow:rgba(59,242,31,.20);
    --ink:#eaf4ec;
    --ink-2:#9fb4a6;
    --ink-3:#637d6d;
    --panel:rgba(8,20,13,.82);
    --panel-2:rgba(10,24,15,.76);
    --line:rgba(70,255,100,.22);
    --line-2:rgba(70,255,100,.10);
    --radius:16px;
    --radius-sm:10px;
}

*{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
    margin:0;
    min-height:100vh;
    font-family:"Inter","Segoe UI",system-ui,-apple-system,Arial,sans-serif;
    color:var(--ink);
    background:
        radial-gradient(900px 500px at 85% -10%, rgba(59,242,31,.16), transparent 55%),
        linear-gradient(rgba(3,10,6,.40), rgba(3,10,6,.62)),
        url("../img/kucing-kicau.gif") center center / cover fixed no-repeat;
    -webkit-font-smoothing:antialiased;
}

/* =========================================================
   HEADER
   ========================================================= */

.admin-header{
    position:sticky;top:0;z-index:1000;
    height:70px;padding:0 26px;
    display:flex;align-items:center;justify-content:space-between;gap:18px;
    background:rgba(4,14,8,.78);
    backdrop-filter:blur(12px) saturate(140%);
    -webkit-backdrop-filter:blur(12px) saturate(140%);
    border-bottom:1px solid var(--line-2);
    box-shadow:0 8px 30px rgba(0,0,0,.45);
}

.admin-brand{
    color:#fff;text-decoration:none;
    display:flex;flex-direction:column;gap:3px;
}

.admin-brand strong{
    font-size:20px;font-weight:800;letter-spacing:.4px;
    color:var(--green);
    text-shadow:0 0 18px var(--green-glow);
}

.admin-brand small{
    color:#86a48e;font-size:9px;font-weight:700;letter-spacing:1.2px;
}

.admin-user{display:flex;align-items:center;gap:13px}

.admin-date{display:flex;flex-direction:column;align-items:flex-end;line-height:1.3}

.admin-date strong{font-size:12px;color:#eef5ef}

.admin-date small{color:#7b9682;font-size:10px}

.admin-avatar{
    width:38px;height:38px;
    display:flex;align-items:center;justify-content:center;
    border-radius:50%;
    background:rgba(59,242,31,.10);
    border:1px solid var(--green);
    color:var(--green);font-size:14px;
}

.admin-account{display:flex;flex-direction:column;line-height:1.3}

.admin-account strong{font-size:12px}

.admin-account small{color:#7b9682;font-size:10px}

.admin-logout{
    margin-left:12px;padding:9px 16px;
    color:#e2ede5;text-decoration:none;
    font-size:11px;font-weight:800;
    border:1px solid rgba(255,255,255,.14);
    border-radius:9px;
    background:rgba(255,255,255,.04);
    transition:.2s;
}

.admin-logout:hover{
    color:var(--green);border-color:var(--green);
    background:rgba(59,242,31,.08);
}

/* =========================================================
   LAYOUT
   ========================================================= */

.admin-layout{min-height:calc(100vh - 70px);display:flex}

.admin-sidebar{
    width:250px;flex:0 0 250px;
    background:rgba(4,14,8,.72);
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
    border-right:1px solid var(--line-2);
}

.admin-sidebar-inner{
    min-height:calc(100vh - 70px);
    position:sticky;top:70px;
    display:flex;flex-direction:column;
}

.admin-menu{padding:20px 14px}

.admin-menu a{
    position:relative;
    min-height:44px;margin-bottom:6px;padding:0 13px;
    display:flex;align-items:center;gap:11px;
    color:#a9bdb0;text-decoration:none;
    font-size:12px;font-weight:700;
    border:1px solid transparent;border-radius:11px;
    transition:.2s;
}

.admin-menu a:hover{
    color:#fff;background:rgba(59,242,31,.07);
    border-color:rgba(59,242,31,.18);
}

.admin-menu a.active{
    color:#041300;
    background:linear-gradient(135deg,var(--green),var(--green-2));
    border-color:var(--green);
    box-shadow:0 8px 22px var(--green-glow);
}

.menu-icon{width:20px;text-align:center;font-size:15px}

.menu-count{
    margin-left:auto;
    min-width:22px;height:22px;
    display:flex;align-items:center;justify-content:center;
    border-radius:50%;
    background:rgba(59,242,31,.12);
    color:var(--green);
    font-size:9px;font-weight:800;
}

.admin-sidebar-bottom{
    margin-top:auto;padding:18px 16px 22px;
    border-top:1px solid var(--line-2);
}

.admin-sidebar-bottom strong{display:block;color:var(--green);font-size:12px;margin-bottom:3px}

.admin-sidebar-bottom small{color:#7b8f80;font-size:9px;line-height:1.6}

.admin-sidebar-bottom p{margin:15px 0}

/* =========================================================
   MAIN
   ========================================================= */

.admin-main{flex:1;min-width:0}

.admin-content{
    width:min(1450px, calc(100% - 44px));
    margin:0 auto;padding:28px 0 52px;
}

/* =========================================================
   PANEL (kaca transparan → GIF terlihat)
   ========================================================= */

.admin-panel{
    margin-bottom:24px;padding:22px;
    background:linear-gradient(150deg, var(--panel), var(--panel-2));
    backdrop-filter:blur(9px);
    -webkit-backdrop-filter:blur(9px);
    border:1px solid var(--line);
    border-radius:var(--radius);
    box-shadow:0 20px 50px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.04);
}

.admin-panel-header{
    min-height:58px;padding-bottom:16px;
    display:flex;align-items:center;justify-content:space-between;gap:15px;
    border-bottom:1px solid var(--line-2);
}

.panel-title-wrap{display:flex;align-items:center;gap:13px}

.panel-icon{
    width:42px;height:42px;flex:0 0 42px;
    display:flex;align-items:center;justify-content:center;
    border-radius:11px;
    background:rgba(59,242,31,.10);
    border:1px solid rgba(59,242,31,.35);
    color:var(--green);font-size:19px;
    box-shadow:inset 0 0 18px rgba(59,242,31,.07);
}

.admin-panel h2{margin:0 0 4px;color:#f0f8f2;font-size:18px;font-weight:800;letter-spacing:.2px}

.admin-panel-header p{margin:0;color:#86a089;font-size:11px}

/* =========================================================
   FORM
   ========================================================= */

.form-group{min-width:0}

.form-group label{
    display:block;margin-bottom:7px;
    color:#c2d2c6;font-size:10px;font-weight:800;letter-spacing:.5px;text-transform:uppercase;
}

.required{color:var(--green)}

input,select,textarea{
    width:100%;
    color:#eef6f0;
    background:rgba(4,10,7,.45);
    border:1px solid rgba(90,130,105,.35);
    border-radius:10px;
    outline:none;
    font-family:inherit;font-size:13px;
    transition:border-color .2s, box-shadow .2s, background .2s;
}

input,select{height:40px;padding:0 13px}

textarea{min-height:280px;padding:13px;resize:vertical;line-height:1.7}

input::placeholder,textarea::placeholder{color:#53705c}

input:focus,select:focus,textarea:focus{
    border-color:var(--green);
    background:rgba(5,14,8,.6);
    box-shadow:0 0 0 3px rgba(59,242,31,.10), 0 0 20px rgba(59,242,31,.05);
}

select{cursor:pointer}

/* =========================================================
   RSS
   ========================================================= */

.rss-form{
    margin-top:18px;
    display:grid;grid-template-columns:280px minmax(250px,1fr) 220px;
    gap:12px;align-items:end;
}

.rss-note{
    margin-top:10px;color:#6f8a79;
    font-size:10px;line-height:1.6;
}

.status{
    min-height:0;margin-top:10px;padding:9px 12px;
    color:#9db4a4;
    border:1px solid transparent;border-radius:9px;
    font-size:11px;line-height:1.5;
}

.status:empty{display:none}

.status.good{
    color:#b8ffb8;
    background:rgba(0,180,50,.14);
    border-color:rgba(59,242,31,.35);
}

.status.bad{
    color:#ffb4b4;
    background:rgba(255,60,60,.12);
    border-color:rgba(255,80,80,.35);
}

.auto-log{
    margin-top:10px;padding:11px 13px;
    background:#0b120e;border:1px solid #24382b;border-radius:9px;
    color:#a9d8b6;font-size:10.5px;line-height:1.55;
    white-space:pre-wrap;max-height:340px;overflow:auto;
}

.rss-results{
    margin-top:14px;max-height:480px;overflow-y:auto;
    padding:8px;
    border:1px solid var(--line-2);border-radius:12px;
    background:rgba(0,0,0,.18);
}

.rss-results::-webkit-scrollbar{width:8px}

.rss-results::-webkit-scrollbar-track{background:rgba(3,10,6,.5);border-radius:10px}

.rss-results::-webkit-scrollbar-thumb{background:rgba(59,242,31,.35);border-radius:10px}

.rss-item{
    min-height:96px;margin-bottom:8px;padding:10px;
    display:grid;grid-template-columns:110px minmax(0,1fr) auto;
    align-items:center;gap:12px;
    background:rgba(10,22,13,.78);
    border:1px solid var(--line-2);border-radius:11px;
    transition:.2s;
}

.rss-item:last-child{margin-bottom:0}

.rss-item:hover{border-color:rgba(59,242,31,.45);background:rgba(10,26,14,.9)}

.rss-thumb{
    width:110px;height:70px;overflow:hidden;
    display:flex;align-items:center;justify-content:center;
    border-radius:8px;background:#05100a;
    border:1px solid var(--line-2);
}

.rss-thumb img{width:100%;height:100%;display:block;object-fit:cover}

.rss-thumb span{color:#55705e;font-size:9px;font-weight:700}

.rss-item-main{min-width:0}

.rss-item-main strong{
    display:block;margin-bottom:8px;
    color:#eaf4ec;font-size:12.5px;line-height:1.45;
}

.rss-item-main small{
    display:block;overflow:hidden;
    color:#5f7c6a;font-size:9px;white-space:nowrap;text-overflow:ellipsis;
}

/* =========================================================
   BUTTON
   ========================================================= */

.btn{
    min-height:38px;padding:0 16px;
    display:inline-flex;align-items:center;justify-content:center;gap:7px;
    color:#e2ede5;background:rgba(15,28,18,.6);
    border:1px solid rgba(130,180,145,.3);border-radius:10px;
    font-family:inherit;font-size:11px;font-weight:800;letter-spacing:.3px;
    text-decoration:none;cursor:pointer;
    transition:transform .15s, background .2s, border-color .2s, box-shadow .2s;
}

.btn:hover{border-color:var(--green);background:rgba(30,54,35,.8)}

.btn:active{transform:translateY(1px)}

.btn:disabled{opacity:.55;cursor:not-allowed}

.btn-green{
    color:#041300;
    background:linear-gradient(135deg,var(--green),var(--green-2));
    border-color:var(--green);
    box-shadow:0 8px 22px var(--green-glow);
}

.btn-green:hover{
    color:#041300;background:linear-gradient(135deg,#57ff37,#2bd312);
    border-color:#7dff64;
}

.btn-ai{
    width:100%;min-height:48px;
    color:#e2fff4;
    background:linear-gradient(135deg,rgba(14,50,36,.9),rgba(9,60,95,.9));
    border-color:rgba(60,160,220,.55);
    box-shadow:0 8px 24px rgba(0,140,255,.12);
}

.btn-ai:hover{border-color:#5bc4ff;background:linear-gradient(135deg,rgba(18,62,44,.95),rgba(12,76,120,.95))}

.btn-delete{color:#ffb4b4;border-color:rgba(255,90,90,.35);background:rgba(40,12,12,.5)}

.btn-delete:hover{color:#fff;background:rgba(180,28,28,.7);border-color:#ff5252}

.btn.small{min-height:34px;padding:0 14px;font-size:10px}

/* =========================================================
   EDITOR
   ========================================================= */

.editor-grid{
    display:grid;
    grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr);
    gap:18px;padding-top:18px;
}

.editor-left,.editor-right{min-width:0}

.editor-left > .form-group,
.editor-left > .editor-row,
.editor-left > .position-row{margin-bottom:14px}

.editor-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}

.position-row{display:grid;grid-template-columns:225px minmax(0,1fr);gap:12px;align-items:end}

.position-help{
    min-height:40px;padding:9px 12px;
    display:flex;align-items:center;
    color:#7f9a88;background:rgba(3,10,6,.3);
    border:1px dashed rgba(90,140,110,.4);border-radius:10px;
    font-size:10px;line-height:1.5;
}

.image-preview{
    width:100%;min-height:250px;overflow:hidden;
    display:flex;align-items:center;justify-content:center;
    background:rgba(3,10,6,.35);
    border:1px dashed rgba(120,170,140,.4);border-radius:12px;
}

.image-preview img{width:100%;height:100%;min-height:250px;display:block;object-fit:cover}

.image-preview span{color:#5f7c6a;font-size:11px}

.editor-actions{margin-top:14px}

.editor-save{margin-top:9px;display:grid;grid-template-columns:1fr 1fr;gap:8px}

.editor-save .btn{width:100%}

/* =========================================================
   PUBLISHED
   ========================================================= */

.published-group{margin-top:18px}

.published-group h3{
    margin:0 0 10px;padding-left:11px;
    color:var(--green);font-size:12px;font-weight:900;letter-spacing:.5px;
    border-left:3px solid var(--green);
}

.published-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}

.published-card{
    overflow:hidden;
    display:flex;flex-direction:column;
    background:rgba(10,20,12,.78);
    border:1px solid var(--line-2);border-radius:11px;
    transition:.2s;
}

.published-card:hover{border-color:rgba(59,242,31,.4);transform:translateY(-2px);box-shadow:0 12px 30px rgba(0,0,0,.35)}

.published-card-image{width:100%;height:150px;background:#04100a}

.published-card-image img{width:100%;height:100%;display:block;object-fit:cover}

.published-card-body{padding:12px}

.published-card-body h3{margin:0 0 7px;padding:0;border:0;color:#e9f3ec;font-size:12.5px;line-height:1.45}

.published-meta{color:#6d8977;font-size:10px;line-height:1.6}

.published-actions{margin-top:11px;display:grid;grid-template-columns:1fr 1fr;gap:7px}

.published-actions .btn{width:100%}

.empty-published{
    grid-column:1 / -1;
    padding:22px;color:#6d8977;
    background:rgba(3,10,6,.35);
    border:1px dashed var(--line-2);border-radius:10px;
    text-align:center;font-size:11px;
}

/* =========================================================
   LOGIN
   ========================================================= */

body.login{
    display:flex;align-items:center;justify-content:center;
    padding:24px;
    background:
        radial-gradient(900px 500px at 80% -10%, rgba(59,242,31,.18), transparent 55%),
        linear-gradient(rgba(3,10,6,.42), rgba(3,10,6,.6)),
        url("../img/kucing-kicau.gif") center center / cover fixed no-repeat;
}

.login-card{
    width:min(100%,400px);
    padding:36px 32px 32px;
    text-align:center;
    background:linear-gradient(150deg, rgba(8,20,13,.88), rgba(9,22,14,.82));
    backdrop-filter:blur(12px);
    -webkit-backdrop-filter:blur(12px);
    border:1px solid var(--line);
    border-radius:var(--radius);
    box-shadow:0 26px 60px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.05);
}

.login-logo{
    width:auto;height:52px;margin:0 auto 14px;
    display:flex;align-items:center;justify-content:center;
    padding:0 6px;
}

.login-logo-img{
    height:52px;width:auto;display:block;
}

.login-card .ls1,.login-card .ls2{display:block}

.login-card .ls1{
    font-family:"Oswald","Inter",sans-serif;
    font-size:26px;font-weight:700;letter-spacing:1px;color:#fff;
}

.login-card .ls2{
    font-size:12px;font-weight:800;letter-spacing:6px;color:var(--green);
}

.login-card h2{
    margin:18px 0 4px;color:#e9f3ec;
    font-size:13px;font-weight:800;letter-spacing:2px;
}

.login-card .sub{margin:0 0 22px;color:#7b9682;font-size:11px}

.login-card label{
    display:block;margin:14px 0 6px;text-align:left;
    color:#b7cabb;font-size:10px;font-weight:800;letter-spacing:.6px;text-transform:uppercase;
}

.login-card input{
    height:46px;padding:0 14px;
    background:rgba(3,10,6,.4);
    border:1px solid rgba(90,130,105,.35);
    border-radius:11px;color:#f0f8f2;font-size:14px;
    transition:.2s;
}

.login-card input:focus{border-color:var(--green);box-shadow:0 0 0 3px rgba(59,242,31,.10)}

.login-card button{
    width:100%;height:48px;margin-top:22px;
    border:0;border-radius:11px;cursor:pointer;
    background:linear-gradient(135deg,var(--green),var(--green-2));
    color:#041300;font-family:inherit;font-size:13px;font-weight:900;letter-spacing:1.5px;
    box-shadow:0 10px 26px var(--green-glow);
    transition:.2s;
}

.login-card button:hover{filter:brightness(1.12);transform:translateY(-1px)}

.login-card .err{
    margin-top:16px;padding:10px 12px;border-radius:9px;
    color:#ffb4b4;background:rgba(255,60,60,.12);
    border:1px solid rgba(255,80,80,.35);font-size:11px;
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width:1100px){
    .admin-sidebar{width:205px;flex-basis:205px}
    .rss-form{grid-template-columns:1fr 1fr}
    .rss-form .btn{grid-column:1 / -1}
    .editor-grid{grid-template-columns:1fr}
    .published-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width:800px){
    .admin-header{height:auto;min-height:64px;padding:10px 14px}
    .admin-brand strong{font-size:17px}
    .admin-date,.admin-account{display:none}
    .admin-avatar{width:32px;height:32px}
    .admin-logout{margin-left:2px;padding:8px 11px}
    .admin-layout{display:block}
    .admin-sidebar{width:100%;border-right:0;border-bottom:1px solid var(--line-2)}
    .admin-sidebar-inner{min-height:auto;position:static}
    .admin-menu{padding:9px;display:grid;grid-template-columns:repeat(4,1fr);gap:5px}
    .admin-menu a{min-height:38px;margin:0;padding:5px;justify-content:center;flex-direction:column;gap:2px;text-align:center;font-size:8px}
    .menu-icon{font-size:12px}
    .menu-count{position:absolute;top:2px;right:3px;min-width:16px;height:16px;font-size:7px}
    .admin-sidebar-bottom{display:none}
    .admin-content{width:calc(100% - 18px);padding:10px 0 32px}
    .admin-panel{padding:13px;border-radius:12px}
    .admin-panel-header{align-items:flex-start}
    .panel-title-wrap{gap:8px}
    .panel-icon{width:34px;height:34px;flex-basis:34px;font-size:15px}
    .admin-panel h2{font-size:15px}
    .admin-panel-header p{font-size:10px}
    .admin-panel-header > .btn{padding:0 10px;min-height:32px;font-size:9px}
    .rss-form{grid-template-columns:1fr}
    .rss-form .btn{grid-column:auto;width:100%}
    .rss-item{grid-template-columns:80px minmax(0,1fr);gap:8px}
    .rss-thumb{width:80px;height:60px}
    .rss-item .select-rss{grid-column:2;justify-self:start;min-height:30px}
    .rss-item-main strong{font-size:11px}
    .rss-item-main small{font-size:8px}
    .editor-row,.position-row{grid-template-columns:1fr}
    .position-help{min-height:auto}
    textarea{min-height:240px}
    .published-grid{grid-template-columns:1fr}
    .published-card-image{height:190px}
}

@media (max-width:480px){
    .admin-menu{grid-template-columns:repeat(3,1fr)}
    .admin-user{gap:6px}
    .admin-content{width:calc(100% - 12px)}
    .admin-panel{padding:11px}
    .editor-save{grid-template-columns:1fr}
    .rss-item{grid-template-columns:68px minmax(0,1fr)}
    .rss-thumb{width:68px;height:55px}
}