/* ==========================================
   DnD Productions CMS
   Main Stylesheet
   ========================================== */

/* ---------- Reset ---------- */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html,
body{
    width:100%;
    height:100%;
}

/* ---------- Theme ---------- */

:root{

    --bg:#111315;

    --sidebar:#181A1F;

    --card:#242830;

    --border:#323741;

    --gold:#D4AF37;

    --text:#F5F5F5;

    --muted:#9CA3AF;

    --success:#36B37E;

    --danger:#D64545;

    --shadow:0 8px 24px rgba(0,0,0,.35);

}

/* ---------- Body ---------- */

body{

    background:var(--bg);

    color:var(--text);

    font-family:'Montserrat',sans-serif;

}

/* ---------- Layout ---------- */

.layout{

    display:grid;

    grid-template-columns:280px 1fr;

    height:100vh;

}

/* ==========================================
   Sidebar
   ========================================== */

.sidebar{

    background:var(--sidebar);

    border-right:1px solid var(--border);

    display:flex;

    flex-direction:column;

}

.logo{

    padding:30px;

    border-bottom:1px solid var(--border);

}

.logo h2{

    font-family:'Cormorant Garamond',serif;

    color:var(--gold);

    font-size:42px;

}

.logo span{

    color:var(--muted);

    font-size:.9rem;

}

/* ---------- Navigation ---------- */

nav{

    padding:20px;

    overflow:auto;

}

.group-title{

    margin:28px 12px 12px;

    color:var(--muted);

    font-size:.72rem;

    letter-spacing:2px;

}

.nav-item{

    width:100%;

    border:none;

    background:none;

    color:var(--text);

    display:flex;

    align-items:center;

    gap:15px;

    padding:14px 16px;

    border-radius:12px;

    cursor:pointer;

    transition:.25s;

    font-size:.95rem;

}

.nav-item:hover{

    background:#2A2F38;

}

.nav-item.active{

    background:var(--gold);

    color:#111;

    font-weight:600;

}

/* ==========================================
   Main Content
   ========================================== */

.main-content{

    display:flex;

    flex-direction:column;

    overflow:hidden;

}

/* ---------- Header ---------- */

.topbar{

    height:80px;

    border-bottom:1px solid var(--border);

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:0 35px;

    background:#17191E;

}

.page-title{

    font-size:1.6rem;

    font-weight:600;

}

.topbar-right{

    display:flex;

    align-items:center;

    gap:25px;

}

.icon-button{

    width:45px;

    height:45px;

    border:none;

    border-radius:50%;

    background:#252A33;

    color:white;

    cursor:pointer;

    transition:.25s;

}

.icon-button:hover{

    background:var(--gold);

    color:#111;

}

/* ---------- User ---------- */

.user{

    display:flex;

    align-items:center;

    gap:12px;

}

.user img{

    width:48px;

    height:48px;

    border-radius:50%;

    object-fit:cover;

    border:2px solid var(--gold);

}

.user strong{

    display:block;

}

.user small{

    color:var(--muted);

}

/* ---------- Logout ---------- */

.logout{

    border:none;

    background:var(--gold);

    color:#111;

    padding:12px 20px;

    border-radius:10px;

    cursor:pointer;

    font-weight:600;

    transition:.25s;

}

.logout:hover{

    transform:translateY(-2px);

    box-shadow:var(--shadow);

}

/* ==========================================
   Content Area
   ========================================== */

#content{

    flex:1;

    overflow:auto;

    padding:35px;

}

/* ==========================================
   Cards
   ========================================== */

.card{

    background:var(--card);

    border:1px solid var(--border);

    border-radius:18px;

    padding:25px;

    box-shadow:var(--shadow);

}

.card h3{

    margin-bottom:15px;

}

/* ==========================================
   Buttons
   ========================================== */

.btn{

    background:var(--gold);

    color:#111;

    border:none;

    border-radius:10px;

    padding:12px 18px;

    cursor:pointer;

    font-weight:600;

    transition:.25s;

}

.btn:hover{

    transform:translateY(-2px);

}

/* ==========================================
   Inputs
   ========================================== */

input,
textarea,
select{

    width:100%;

    padding:14px;

    border-radius:10px;

    border:1px solid var(--border);

    background:#20242B;

    color:white;

    font-family:inherit;

}

input:focus,
textarea:focus,
select:focus{

    outline:none;

    border-color:var(--gold);

}

/* ==========================================
   Scrollbar
   ========================================== */

::-webkit-scrollbar{

    width:10px;

}

::-webkit-scrollbar-thumb{

    background:#3B4049;

    border-radius:20px;

}

::-webkit-scrollbar-thumb:hover{

    background:var(--gold);

}

/* ==========================================
   Responsive
   ========================================== */

@media(max-width:1000px){

.layout{

    grid-template-columns:90px 1fr;

}

.logo span{

    display:none;

}

.nav-item{

    justify-content:center;

}

.nav-item span{

    display:none;

}

.group-title{

    display:none;

}

}

/* =====================================
Dashboard
===================================== */

.stats{

    display:grid;

    grid-template-columns:repeat(4,1fr);

    gap:25px;

}

.stat-card{

    text-align:center;

}

.stat-card h4{

    color:var(--muted);

    margin-bottom:15px;

}

.stat-card h2{

    font-size:2.7rem;

    color:var(--gold);

}

@media(max-width:1200px){

.stats{

grid-template-columns:repeat(2,1fr);

}

}

@media(max-width:700px){

.stats{

grid-template-columns:1fr;

}

}

.page{

    max-width:900px;

}

.subtitle{

    color:var(--muted);

    margin:10px 0 35px;

}

label{

    display:block;

    margin-top:20px;

    margin-bottom:8px;

    font-weight:600;

}

textarea{

    resize:vertical;

    min-height:120px;

}

/* ========================================
   HOMEPAGE FEATURED IMAGES
   ======================================== */

.featured-image-editor {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #333;
}

.featured-image-editor h3 {
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.field-help {
    color: #888;
    font-size: 0.75rem;
    margin-top: 6px;
    margin-bottom: 18px;
}

.image-upload-area {
    display: grid;
    grid-template-columns: minmax(250px, 400px) 1fr;
    gap: 30px;
    align-items: start;
}

.image-preview {
    width: 100%;
    min-height: 240px;
    border: 1px dashed #555;
    background: #15171b;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.image-preview img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
}

.image-placeholder {
    width: 100%;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #777;
    font-size: 0.8rem;
}

.image-upload-controls {
    padding-top: 5px;
}

.image-upload-controls input[type="file"] {
    width: 100%;
    padding: 14px;
    border: 1px solid #3a3d44;
    border-radius: 8px;
    background: #1f2228;
    color: #ddd;
    cursor: pointer;
}

.image-upload-controls input[type="file"]:hover {
    border-color: #dcb532;
}

@media (max-width: 800px) {

    .image-upload-area {
        grid-template-columns: 1fr;
    }

}

/* ==========================================
Homepage Editor
========================================== */

.editor-layout{

    display:grid;

    grid-template-columns:1fr 420px;

    gap:40px;

}

.page-header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-bottom:25px;

}

.save-status{

    font-size:.9rem;

    font-weight:600;

}

.saved{

    color:#36B37E;

}

.unsaved{

    color:#D4AF37;

}

.preview{

    position:sticky;

    top:30px;

}

.preview-phone{

    background:#181A1F;

    border:1px solid var(--border);

    border-radius:18px;

    padding:40px;

    min-height:500px;

}

.preview-phone h1{

    margin-top:25px;

    font-family:'Cormorant Garamond', serif;

    font-size:2.5rem;

}

.preview-phone p{

    margin:25px 0;

    color:var(--muted);

    line-height:1.7;

}

@media(max-width:1200px){

.editor-layout{

grid-template-columns:1fr;

}

.preview{

position:relative;

top:0;

}

}