* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: #1f2937;
    background: #f5f7fb;
}

a {
    color: #0f766e;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    background: #111827;
    color: #fff;
    padding: 16px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.logo {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
}

.nav {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.nav a {
    color: #fff;
}

.main-content {
    padding: 28px 0 48px;
}

.page-title {
    margin: 0 0 20px;
    font-size: 30px;
}

.breadcrumbs {
    margin-bottom: 18px;
    font-size: 14px;
    color: #6b7280;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0,0,0,.08);
    transition: transform .15s ease;
}

.card:hover {
    transform: translateY(-2px);
}

.card-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: #e5e7eb;
    display: block;
}

.card-body {
    padding: 16px;
}

.card-title {
    margin: 0;
    font-size: 20px;
    line-height: 1.3;
}

.card-title.small {
    font-size: 18px;
}

.list {
    display: grid;
    gap: 14px;
}

.list-item {
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,.06);
}

.detail-wrap {
    display: grid;
    gap: 18px;
}

.content-block {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 4px 18px rgba(0,0,0,.06);
}

.content-block img {
    max-width: 100%;
    border-radius: 10px;
    display: block;
}

.video-frame {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 10px;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.btn,
button,
input[type="submit"] {
    background: #0f766e;
    border: none;
    color: #fff;
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
}

.btn.secondary {
    background: #374151;
}

.btn.danger {
    background: #b91c1c;
}

.form-card {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 4px 18px rgba(0,0,0,.06);
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

label {
    font-weight: 700;
}

input[type="text"],
select,
textarea,
input[type="file"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 14px;
    background: #fff;
}

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

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0,0,0,.06);
}

th, td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

.flash {
    background: #ecfeff;
    border: 1px solid #99f6e4;
    color: #155e75;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
}

.empty-state {
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 4px 18px rgba(0,0,0,.06);
}

.block-builder {
    display: grid;
    gap: 14px;
}

.block-item {
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 14px;
    background: #f9fafb;
}

.block-top {
    display: grid;
    gap: 10px;
}

.thumb-sm {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    background: #e5e7eb;
}

hr.sep {
    border: 0;
    border-top: 1px solid #e5e7eb;
    margin: 24px 0;
}


.is-hidden {
    display: none;
}

.is-hidden-input {
    display: none;
}

.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.toolbar-btn {
    background: #e5e7eb;
    color: #111827;
    border: 1px solid #d1d5db;
    padding: 8px 10px;
    border-radius: 8px;
}

.rich-editor {
    min-height: 180px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    padding: 12px;
}

.rich-editor:focus {
    outline: none;
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.rich-text-output p:first-child {
    margin-top: 0;
}

.rich-text-output p:last-child {
    margin-bottom: 0;
}

.text-block-image-wrap {
    margin-top: 16px;
}
