/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #0f172a; /* Deep blue/slate */
    --primary-hover: #1e293b;
    --accent-color: #2563eb; /* Royal blue */
    --accent-hover: #1d4ed8;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #334155;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --error-color: #ef4444;
    --success-color: #10b981;
    --sidebar-width: 250px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Public Header Image */
.public-header-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

/* Admin Layout with Sidebar */
.admin-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--primary-color);
    color: #fff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background-color: rgba(255,255,255,0.1);
    color: #fff;
    border-left: 4px solid var(--accent-color);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.top-navbar {
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 30px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.content-area {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
}

.bg-light { background-color: var(--bg-color); }

.container {
    width: 100%;
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.container-lg {
    max-width: 1200px;
}

/* Typography */
h1, h2, h3 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-3 { margin-top: 1.5rem; }

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
}

.card-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 25px;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-main);
    transition: all 0.2s ease;
    background-color: #fcfcfc;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background-color: #fff;
}

input[type="file"] {
    display: block;
    width: 100%;
    padding: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-main);
    background: #f8fafc;
    border: 1px dashed var(--border-color);
    border-radius: 6px;
    cursor: pointer;
}

/* Checkboxes */
.checkbox-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 10px;
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    max-height: 400px;
    overflow-y: auto;
}

@media (min-width: 600px) {
    .checkbox-list {
        grid-template-columns: 1fr 1fr;
    }
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.checkbox-item:hover {
    background: #f1f5f9;
}

.checkbox-item input[type="checkbox"] {
    margin-top: 4px;
    margin-right: 12px;
    width: 16px;
    height: 16px;
    accent-color: var(--accent-color);
    cursor: pointer;
}

.checkbox-item span {
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Buttons */
.btn {
    display: inline-block;
    font-family: inherit;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 6px;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    width: 100%;
    text-decoration: none;
}

@media (min-width: 600px) {
    .btn { width: auto; }
}

.btn-primary {
    color: #fff;
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.btn-block { width: 100%; display: block; }

.btn-outline {
    color: var(--text-main);
    background-color: transparent;
    border-color: var(--border-color);
}
.btn-outline:hover {
    background-color: #f1f5f9;
}

.btn-danger {
    color: white;
    background-color: var(--error-color);
}

/* Header/Nav (Public) */
header {
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.9rem;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: #f8fafc;
    font-weight: 600;
    color: var(--primary-color);
    white-space: nowrap;
}

tr:hover {
    background-color: #f1f5f9;
}

.badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 0.75em;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 9999px;
    background-color: #e2e8f0;
    color: var(--text-main);
    margin: 2px;
}

/* Alerts */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 6px;
}
.alert-success {
    color: #065f46;
    background-color: #d1fae5;
    border-color: #34d399;
}
.alert-danger {
    color: #991b1b;
    background-color: #fee2e2;
    border-color: #f87171;
}

/* Image preview container */
.img-preview {
    margin-top: 10px;
    max-width: 200px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}
