:root {
    --primary-color: #4e7d6b;
    --primary-light: #e8f0ed;
    --accent-color: #8fb1a5;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-grey: #f4f7f6;
    --white: #ffffff;
    --danger: #e74c3c;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: 'Lato', sans-serif; 
    color: var(--text-dark); 
    background: white; 
    line-height: 1.6; 
    overflow-x: hidden; 
}

h1, h2, h3 { font-family: 'Montserrat', sans-serif; font-weight: 700; }

/* Dashboard */
#admin-dashboard {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-grey); z-index: 9999; display: none;
    grid-template-columns: 280px 1fr;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.sidebar { 
    background: #2c3e50; 
    color: white; 
    padding: 40px 0; 
    display: flex; 
    flex-direction: column;
    box-shadow: 4px 0 10px rgba(0,0,0,0.1);
    overflow-y: auto;
}

.sidebar-header { padding: 0 30px 40px; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 20px; }
.sidebar-header h2 { font-size: 1.2rem; color: var(--accent-color); letter-spacing: 1px; }

.sidebar-nav { flex-grow: 1; list-style: none; }
.sidebar li { 
    padding: 15px 30px; 
    margin: 5px 15px; 
    border-radius: 12px; 
    cursor: pointer; 
    transition: var(--transition); 
    display: flex; 
    align-items: center;
    gap: 15px;
    font-weight: 600;
    color: #bdc3c7;
}

.sidebar li i { font-size: 1.1rem; width: 25px; }
.sidebar li:hover { background: rgba(255,255,255,0.05); color: white; }
.sidebar li.active { background: var(--primary-color); color: white; box-shadow: 0 4px 15px rgba(78, 125, 107, 0.3); }

.logout-btn { color: #ff7675 !important; margin-top: auto !important; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px !important; }

.dashboard-main { overflow-y: auto; padding: 40px; }
.dashboard-content { 
    display: none; 
    animation: slideInUp 0.4s ease-out; 
    max-width: 1100px; 
    margin: 0 auto; 
}
.dashboard-content.active { display: block; }

@keyframes slideInUp { 
    from { transform: translateY(20px); opacity: 0; } 
    to { transform: translateY(0); opacity: 1; } 
}

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; margin-bottom: 40px; }
.stat-card { 
    background: white; padding: 25px; border-radius: 20px; 
    box-shadow: var(--shadow); border-bottom: 4px solid var(--primary-color);
}
.stat-card h4 { color: var(--text-light); font-size: 0.8rem; text-transform: uppercase; margin-bottom: 10px; }
.stat-card .value { font-size: 2rem; font-weight: 700; color: var(--primary-color); }

/* Components */
.glass-panel { 
    background: white; padding: 30px; border-radius: 20px; 
    box-shadow: var(--shadow); margin-bottom: 30px; 
}

.table-custom { width: 100%; border-collapse: separate; border-spacing: 0 10px; }
.table-custom tr:hover { transform: scale(1.01); transition: var(--transition); }
.table-custom td { padding: 20px; background: white; border-top: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0; }
.table-custom td:first-child { border-left: 1px solid #f0f0f0; border-radius: 12px 0 0 12px; }
.table-custom td:last-child { border-right: 1px solid #f0f0f0; border-radius: 0 12px 12px 0; text-align: right; }

.dash-btn { padding: 10px 20px; border-radius: 8px; border: none; cursor: pointer; font-weight: 600; transition: var(--transition); }
.btn-view { background: var(--primary-light); color: var(--primary-color); }
.btn-delete { background: #fee2e2; color: var(--danger); }

.admin-input { 
    width: 100%; padding: 15px; margin-bottom: 20px; 
    border: 2px solid #eee; border-radius: 12px; font-family: inherit; 
    transition: var(--transition);
}
.admin-input:focus { border-color: var(--primary-color); outline: none; background: #fafdfc; }

/* Website Sections */
#hero { height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; background: radial-gradient(circle, #fff 0%, #f0f4f2 100%); text-align: center; padding: 20px; }
#hero h1 { font-size: 3.5rem; margin-bottom: 10px; }
.subtitle { font-size: 1.1rem; color: var(--primary-color); font-weight: bold; letter-spacing: 2px; text-transform: uppercase; }

.section { padding: 80px 10%; }
.bg-grey { background: var(--bg-grey); }

.btn { padding: 12px 25px; border-radius: 50px; border: none; cursor: pointer; font-weight: bold; text-transform: uppercase; transition: var(--transition); text-decoration: none; display: inline-block; text-align: center; }
.btn-primary { background: var(--primary-color); color: white; box-shadow: 0 4px 15px rgba(78,125,107,0.4); }
.btn-light { background: #eee; color: var(--text-dark); }

/* Bio Section */
#bio { padding: 80px 10%; background: var(--primary-color); color: white; }
.bio-container { display: flex; align-items: center; gap: 40px; max-width: 1000px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
.bio-img { width: 200px; height: 200px; border-radius: 50%; object-fit: cover; border: 5px solid rgba(255,255,255,0.2); }
.bio-text { flex: 1; min-width: 300px; }

/* Blog Grid */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
.blog-card { background: white; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); height: 100%; display: flex; flex-direction: column; }
.blog-card img { width: 100%; height: 220px; object-fit: cover; }
.blog-card-body { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; }

/* Modals & Auth */
#universal-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255,0.98); z-index: 10001; display: none;
    padding: 40px 20px; overflow-y: auto;
}
.close-modal { position: fixed; top: 20px; right: 20px; font-size: 2rem; cursor: pointer; color: var(--primary-color); z-index: 10002; }

#admin-auth-overlay {
    position:fixed; top:0; left:0; width:100%; height:100%; 
    background:rgba(44, 62, 80, 0.95); display:none; z-index:20000; 
    align-items:center; justify-content:center; padding: 20px;
}
.auth-card { background:white; padding:50px; border-radius:30px; text-align:center; width: 100%; max-width: 380px; box-shadow: 0 20px 50px rgba(0,0,0,0.3); }
.auth-card i { font-size: 3rem; color: var(--primary-color); margin-bottom: 20px; }
.cancel-auth { margin-top: 20px; cursor: pointer; color: var(--text-light); font-size: 0.9rem; }

/* Toast */
#toast-container { position: fixed; bottom: 30px; right: 30px; z-index: 99999; }
.toast {
    background: white; color: var(--text-dark); padding: 16px 24px; border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); margin-top: 10px; display: flex;
    align-items: center; gap: 12px; min-width: 280px; border-left: 5px solid var(--primary-color);
}

/* File Upload */
.file-upload-wrapper { margin-bottom: 20px; border: 2px dashed #ccc; padding: 20px; border-radius: 12px; text-align: center; }
.file-upload-wrapper i { font-size: 1.5rem; color: var(--primary-color); }
#image-preview { width: 100%; max-height: 250px; object-fit: cover; border-radius: 12px; margin-top: 15px; display: none; box-shadow: var(--shadow); }

/* Footer */
footer { padding: 40px 20px; background: #2c3e50; color: white; text-align: center; }
.social-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 20px; }
.social-links a { color:white; font-size: 1.5rem; }
.admin-trigger { font-size: 0.6rem; margin-top: 20px; opacity: 0.5; cursor: pointer; }

/* Responsive */
@media (max-width: 992px) {
    #admin-dashboard { grid-template-columns: 1fr; }
    .sidebar { position: fixed; bottom: 0; left: 0; width: 100%; height: 70px; flex-direction: row; padding: 0; z-index: 1000; }
    .sidebar-header { display: none; }
    .sidebar-nav { display: flex; width: 100%; justify-content: space-around; align-items: center; }
    .sidebar li { margin: 0; padding: 10px; flex-direction: column; gap: 5px; font-size: 0.7rem; }
    .sidebar li i { font-size: 1.2rem; width: auto; }
    .logout-btn { border-top: none !important; margin-top: 0 !important; padding-top: 10px !important; }
    .dashboard-main { padding: 20px 20px 100px 20px; }
    .stats-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
#contact-form-container { max-width:600px; margin:0 auto; background:white; padding:40px; border-radius:30px; box-shadow: var(--shadow); }
.form-sub { text-align: center; color: var(--text-light); margin-bottom: 30px; }
