/* Root brand tokens (fallbacks) */
:root{
  --vfcms-primary:#00AEEF;
  --vfcms-secondary:#FF1493;
  --vfcms-accent:#ECFD23;
  --vfcms-dark:#0F0F1A;
  --vfcms-radius:16px;
}
.vfcms-container{max-width:1200px;margin:24px auto;padding:0 16px;font-family:Montserrat,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Arial;}
.vfcms-topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;}
.vfcms-logo img{max-height:38px;display:block;}

/* Toolbar */
.vfcms-toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:12px;}

/* List */
.vfcms-list{border:1px solid #e5e5e5;border-radius:var(--vfcms-radius);overflow:hidden;background:#fff;}
.vfcms-row{display:grid;grid-template-columns:80px 1fr 160px 160px 140px;gap:8px;padding:12px;border-bottom:1px solid #eee;align-items:center;}
.vfcms-row:nth-child(odd){background:#fbfdff;}
.vfcms-row .title{font-weight:600;}
.vfcms-row .thumb{width:70px;height:50px;border-radius:8px;overflow:hidden;background:#f8fafc;display:flex;align-items:center;justify-content:center;}
.vfcms-row .thumb img{width:100%;height:100%;object-fit:cover;}

/* Buttons */
.vfcms-btn{display:inline-flex;align-items:center;justify-content:center;text-align:center;gap:8px;padding:10px 14px;border-radius:var(--vfcms-radius);border:1px solid #d7e3ef;background:#fff;color:#111;cursor:pointer;min-height:38px;min-width:90px;}
.vfcms-btn:hover{filter:brightness(0.98);}
.vfcms-btn.primary{background:var(--vfcms-primary);border-color:#0094cc;color:#fff;}
.vfcms-btn.danger{background:#e02424;border-color:#b91c1c;color:#fff;}
.vfcms-btn.ghost{background:#fff;color:#111;}

/* Pager */
.vfcms-pager{display:flex;justify-content:center;gap:8px;padding:12px;}

/* Editor layout */
.vfcms-edit-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
.vfcms-two-col-line{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
.vfcms-col{min-width:0;}
.vfcms-field{display:flex;flex-direction:column;gap:6px;margin-bottom:10px;}
.vfcms-field>input[type="text"],.vfcms-field>input[type="time"],.vfcms-field>input[type="date"],.vfcms-field>input[type="datetime-local"],.vfcms-field>input[type="number"],.vfcms-field>select,.vfcms-field>textarea{padding:10px 12px;border:1px solid #e2e8f0;border-radius:12px;}
.vfcms-tax{margin-bottom:8px;}
.vfcms-meta-field{display:flex;flex-direction:column;gap:4px;margin-bottom:8px;}
.vfcms-chip{display:inline-flex;align-items:center;gap:8px;padding:6px 10px;border:1px solid #ddd;border-radius:999px;background:#fff;box-shadow:0 1px 0 rgba(0,0,0,.05);}
.vfcms-chip::before{content:"●";color: var(--vfcms-secondary);}

/* Modals */
.vfcms-modal{position:fixed;inset:0;z-index:9999;display:none;align-items:center;justify-content:center;background:rgba(0,0,0,.4);}
.vfcms-modal.active{display:flex;}
.vfcms-modal-dialog{width:min(100%,900px);max-height:85vh;overflow:auto;background:#fff;border-radius:var(--vfcms-radius);border:1px solid #e5e5e5;box-shadow:0 10px 30px rgba(0,0,0,.15);}
.vfcms-modal-header,.vfcms-modal-footer{padding:12px 16px;border-bottom:1px solid #eee;}
.vfcms-modal-footer{border-top:1px solid #eee;border-bottom:none;display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;}
.vfcms-modal-body{padding:16px;}
.vfcms-modal-title{font-weight:600;}
.vfcms-login-inline{text-align:center;padding:20px 0;}

/* Login overlay */
#vfcms-login-modal{display:flex !important;background:rgba(0,0,0,0.85) !important;backdrop-filter: blur(6px);}
#vfcms-login-modal .vfcms-modal-dialog{max-width:400px;width:100%;margin:auto;}

/* Summary cards */
.vfcms-card{border:1px solid #e5e5e5;border-radius:var(--vfcms-radius);background:#fff;overflow:hidden;}
.vfcms-card-header{padding:12px 16px;font-weight:700;background:#f3f9ff;border-bottom:1px solid #e5e5e5;display:flex;align-items:center;justify-content:space-between;}
.vfcms-card-body{padding:0;}
.vfcms-card-footer{padding:12px 16px;border-top:1px solid #e5e5e5;display:flex;justify-content:flex-end;}
.vfcms-summary-row{display:grid;grid-template-columns:80px 1fr;gap:12px;padding:12px;border-bottom:1px solid #eee;align-items:center;}
.vfcms-summary-row:nth-child(odd){background:#fbfdff;}
.vfcms-summary-title{font-weight:600;}
.vfcms-summary-date{font-size:12px;color:#666;margin-top:4px;}

/* Force 2x2 grid in summary */
#vfcms-summary .vfcms-grid{display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:16px !important;align-items:stretch;}
#vfcms-summary .vfcms-card{height:100%;display:flex;flex-direction:column;}
#vfcms-summary .vfcms-card-body{flex:1 1 auto;}

@media (max-width: 1000px){
  .vfcms-edit-grid,.vfcms-two-col-line{grid-template-columns:1fr;}
  .vfcms-row{grid-template-columns:60px 1fr 120px 120px 120px;}
}


/* Editor full-page layout */
.vfcms-editor-layout{display:grid;grid-template-columns:3fr 1fr;gap:20px;}
.vfcms-editor-main{min-width:0;}
.vfcms-editor-side{min-width:0;}
@media (max-width: 1000px){
  .vfcms-editor-layout{grid-template-columns:1fr;}
}


/* Lock page behind login modal */
body.vfcms-locked { overflow:hidden; }
body.vfcms-locked > *:not(#vfcms-login-modal) { filter: blur(6px) brightness(0.4); pointer-events:none !important; user-select:none !important; }
