
/* Avatar News CMS - Clean UI v1 */
:root{
  --red:#e31e24;
  --red-dark:#b9161b;
  --dark:#151922;
  --text:#20242b;
  --muted:#6b7280;
  --bg:#f4f6f8;
  --card:#ffffff;
  --border:#e2e6eb;
  --green:#16834b;
  --shadow:0 8px 24px rgba(15,23,42,.07);
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  background:var(--bg);
  color:var(--text);
  font-family:Arial,"Noto Sans Devanagari",sans-serif;
  font-size:15px;
  line-height:1.55;
}

a{color:#c9181f;text-decoration:none}
a:hover{text-decoration:underline}

.app-header{
  background:var(--dark);
  color:#fff;
  border-bottom:4px solid var(--red);
  box-shadow:0 2px 12px rgba(0,0,0,.12);
}
.header-inner{
  max-width:1180px;
  margin:auto;
  padding:16px 20px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}
.brand{display:flex;align-items:center;gap:10px}
.brand-title{
  font-size:28px;
  line-height:1;
  font-weight:900;
  letter-spacing:.3px;
  text-transform:uppercase;
}
.brand-title .avatar{color:#fff}
.brand-title .news{color:#ff3036}
.brand-subtitle{
  display:block;
  margin-top:4px;
  color:#b8bec8;
  font-size:12px;
  font-weight:600;
}
.nav{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
}
.nav a{
  display:inline-flex;
  align-items:center;
  min-height:36px;
  padding:7px 11px;
  border-radius:7px;
  color:#fff;
  background:rgba(255,255,255,.08);
  font-size:14px;
  font-weight:700;
}
.nav a:hover{
  background:var(--red);
  text-decoration:none;
}
.nav a:last-child{
  background:#fff;
  color:#20242b;
}

.container{
  width:min(1180px,calc(100% - 32px));
  margin:28px auto 50px;
}
.page-title{
  margin:0 0 18px;
  font-size:28px;
  line-height:1.25;
  font-weight:800;
}
.page-title small{
  display:block;
  margin-top:5px;
  color:var(--muted);
  font-size:13px;
  font-weight:500;
}

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:12px;
  padding:24px;
  box-shadow:var(--shadow);
}

form.card{max-width:100%}

label{
  display:block;
  margin:16px 0 7px;
  color:#252a32;
  font-weight:700;
}
label:first-child{margin-top:0}

input,textarea,select{
  width:100%;
  border:1px solid #cfd5dd;
  border-radius:8px;
  background:#fff;
  color:#1f2937;
  font:inherit;
  outline:none;
  transition:border-color .15s,box-shadow .15s;
}
input,select{min-height:44px;padding:9px 12px}
textarea{min-height:130px;padding:11px 12px;resize:vertical}
input:focus,textarea:focus,select:focus{
  border-color:var(--red);
  box-shadow:0 0 0 3px rgba(227,30,36,.10);
}
input[type=file]{
  padding:8px;
  background:#fafbfc;
}

small,.hint{
  color:var(--muted);
  font-size:12px;
}
.hint{margin-top:7px}

button,.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:9px 15px;
  border:0;
  border-radius:8px;
  background:var(--dark);
  color:#fff;
  font:inherit;
  font-weight:700;
  cursor:pointer;
  text-decoration:none;
}
button:hover,.btn:hover{filter:brightness(.95);text-decoration:none}
.btn-primary,button[type=submit]{
  background:var(--red);
}
.btn-primary:hover,button[type=submit]:hover{background:var(--red-dark)}
.btn-green{background:var(--green)}
.btn-light{
  background:#eef1f4;
  color:#252a32;
}
button:disabled{opacity:.6;cursor:not-allowed}

.notice{
  margin:0 0 18px;
  padding:12px 14px;
  border-radius:8px;
  border:1px solid var(--border);
  background:#f8fafc;
}
.notice.ok{
  background:#ecfdf3;
  border-color:#b7e5ca;
  color:#126b3e;
}
.notice.danger{
  background:#fff1f2;
  border-color:#fecdd3;
  color:#a5121a;
}

.editor-wrap{
  border:1px solid #cfd5dd;
  border-radius:9px;
  overflow:hidden;
  background:#fff;
}
.toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  padding:8px;
  background:#f4f5f7;
  border-bottom:1px solid #dfe3e8;
}
.toolbar button{
  min-height:34px;
  padding:5px 9px;
  border:1px solid #d5dae0;
  border-radius:6px;
  background:#fff;
  color:#252a32;
  font-size:13px;
}
.toolbar button:hover{
  background:#fff0f1;
  border-color:#e4a1a5;
  color:var(--red-dark);
}
.editor{
  min-height:280px;
  padding:15px;
  outline:none;
  line-height:1.75;
}
.editor img{
  max-width:100%;
  height:auto;
  display:block;
  margin:14px auto;
  border-radius:7px;
}
.editor h2{font-size:24px;margin:18px 0 8px}
.editor h3{font-size:20px;margin:16px 0 7px}

.actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:20px;
}

.grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}
.grid-3{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}
.full{grid-column:1/-1}

table{
  width:100%;
  border-collapse:collapse;
  background:#fff;
}
th,td{
  padding:11px 12px;
  border-bottom:1px solid var(--border);
  text-align:left;
  vertical-align:top;
}
th{
  background:#f6f7f9;
  font-size:13px;
}
tr:hover td{background:#fafbfc}

footer{
  max-width:1180px;
  margin:0 auto 30px;
  padding:0 16px;
  color:#7a818b;
  font-size:12px;
  text-align:center;
}

/* Login page */
.login-wrap{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}
.login-card{
  width:min(440px,100%);
  background:#fff;
  padding:28px;
  border-radius:14px;
  border:1px solid var(--border);
  box-shadow:var(--shadow);
}
.login-card .brand-title{
  color:var(--dark);
  margin-bottom:4px;
}
.login-card .brand-title .avatar{color:var(--dark)}

@media (max-width:800px){
  .header-inner{
    align-items:flex-start;
    flex-direction:column;
  }
  .nav{width:100%}
  .nav a{flex:1 1 auto;text-align:center}
  .grid,.grid-3{grid-template-columns:1fr}
  .container{width:min(100% - 20px,1180px);margin-top:18px}
  .card{padding:17px}
  .page-title{font-size:23px}
}

@media (max-width:520px){
  .brand-title{font-size:24px}
  .nav{gap:5px}
  .nav a{font-size:12px;padding:6px 8px}
  .toolbar button{font-size:12px;padding:5px 7px}
}



/* Article photos inside the CMS editor */
.editor .article-photo-wrap{
    display:block;
    width:100%;
    max-width:100%;
    margin:18px 0 0;
    padding:0;
    clear:both;
}

.editor .article-photo{
    display:block;
    width:100%;
    max-width:100%;
    height:auto;
    margin:0;
    padding:0;
    object-fit:contain;
    box-sizing:border-box;
}

.editor .article-photo-wrap + p{
    display:block;
    width:100%;
    min-height:1.4em;
    margin:10px 0 14px;
    clear:both;
}

.editor .article-photo-wrap + p:after{
    content:"";
    display:block;
    clear:both;
}
