:root {
    --navy: #0b1f3a;
    --navy-light: #1f3a5f;
    --gold: #d4af37;
    --gold-hover: #c19b2e;
    --white: #ffffff;
    --bg-light: #f7f9fc;
    --text-primary: #0a0a0a;
    --text-secondary: #5a6473;
    --radius: 12px;
    --shadow: 0 8px 24px rgba(11, 31, 58, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", Roboto, sans-serif;
    color: var(--text-primary);
    background: var(--bg-light);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Playfair Display", Georgia, "Times New Roman", serif;
    letter-spacing: -0.01em;
}

.typing-cursor {
    display: inline-block;
    margin-left: 0.1em;
    color: #0b1f3a;
    animation: blink-cursor 1s steps(1, end) infinite;
}

@keyframes blink-cursor {
    0%,
    50% {
        opacity: 1;
    }
    51%,
    100% {
        opacity: 0;
    }
}

a {
    color: var(--navy);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--gold);
}

/* Gold CTAs: navy text; stay navy on hover (overrides global a:hover) */
a[class*="bg-[#D4AF37]"],
a[class*="bg-[#D4AF37]"]:hover {
    color: var(--navy);
}

.container {
    width: min(1100px, 92%);
    margin: 0 auto;
}

.navbar {
    background: var(--navy);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 20;
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 68px;
    gap: 16px;
}

.brand {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--white);
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.nav-links a {
    color: var(--white);
    font-weight: 500;
}

.btn {
    border: none;
    border-radius: 8px;
    padding: 0.65rem 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--gold);
    color: var(--navy);
}

.btn-primary:hover {
    background: var(--gold-hover);
    color: var(--navy);
}

.btn-secondary {
    background: var(--navy);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--navy-light);
    color: var(--white);
}

.page {
    padding: 2.2rem 0 3rem;
}

.hero {
    background: linear-gradient(125deg, var(--navy), var(--navy-light));
    border-radius: var(--radius);
    padding: 4rem 2rem;
    color: var(--white);
    margin-bottom: 1.8rem;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 0.8rem;
}

.hero p {
    max-width: 700px;
    color: #e8eef8;
}

.hero-actions {
    margin-top: 1.3rem;
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.1rem 1.2rem;
    box-shadow: var(--shadow);
    border: 1px solid #edf1f7;
    transition: all 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
    border-color: rgba(212, 175, 55, 0.45);
}

.muted {
    color: var(--text-secondary);
}

.section-title {
    margin-bottom: 0.85rem;
    font-size: 1.5rem;
}

.form-card {
    max-width: 640px;
    margin: 0 auto;
}

.auth-form input[type="file"] {
    width: 100%;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    border: none;
    background: transparent;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="number"],
.auth-form input[type="url"],
.auth-form select,
.auth-form textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(11, 31, 58, 0.16);
    background: #fff;
    margin-bottom: 0;
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-form input[type="text"]:focus,
.auth-form input[type="email"]:focus,
.auth-form input[type="password"]:focus,
.auth-form input[type="number"]:focus,
.auth-form input[type="url"]:focus,
.auth-form select:focus,
.auth-form textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.auth-form input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--gold);
    vertical-align: middle;
}

.auth-field--checkbox label {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0;
    font-weight: 500;
}

.auth-field ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.65rem 0.7rem;
    border-radius: 8px;
    border: 1px solid #ced6e0;
    background: var(--white);
    margin-bottom: 0.9rem;
    font: inherit;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(212, 175, 55, 0.35);
    border-color: var(--gold);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

th,
td {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 1px solid #edf1f7;
}

th {
    background: var(--navy);
    color: var(--white);
}

.status {
    display: inline-block;
    border-radius: 20px;
    padding: 0.2rem 0.65rem;
    font-size: 0.82rem;
    font-weight: 600;
}

.status-open {
    background: #d8e8ff;
    color: #1a4b8f;
}

.status-assigned,
.status-in_progress {
    background: #fff1cb;
    color: #7a5c00;
}

.status-submitted {
    background: #ebdcff;
    color: #5f2f9e;
}

.status-completed {
    background: #d9f3df;
    color: #1f6c31;
}

.status-cancelled {
    background: #ffe1e1;
    color: #952626;
}

.layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1rem;
}

.sidebar {
    background: var(--navy);
    border-radius: var(--radius);
    padding: 1rem;
    height: fit-content;
}

.sidebar a {
    color: var(--white);
    display: block;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    margin-bottom: 0.35rem;
}

.sidebar a.active,
.sidebar a:hover {
    background: rgba(212, 175, 55, 0.2);
    color: var(--gold);
}

.toast-stack {
    position: fixed;
    top: 1.1rem;
    right: 1rem;
    z-index: 120;
    width: min(92vw, 380px);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    pointer-events: none;
}

.toast-message {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    border-radius: 0.75rem;
    border: 1px solid #dbe4f2;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(11, 31, 58, 0.14);
    padding: 0.72rem 0.8rem;
    color: #0b1f3a;
    transform: translateY(-10px);
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
    pointer-events: auto;
}

.toast-message.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.toast-message.is-leaving {
    opacity: 0;
    transform: translateY(-8px);
}

.toast-message__content {
    flex: 1;
    min-width: 0;
    font-size: 0.86rem;
    font-weight: 500;
    line-height: 1.35;
}

.toast-message__close {
    border: none;
    background: transparent;
    color: inherit;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0.1rem;
    cursor: pointer;
    opacity: 0.72;
}

.toast-message__close:hover {
    opacity: 1;
}

.toast-success {
    border-color: #bde5c7;
    background: #f1fbf4;
}

.toast-error {
    border-color: #f4c6c6;
    background: #fff4f4;
}

.toast-warning {
    border-color: #f5dfad;
    background: #fff9ec;
}

.toast-info {
    border-color: #dbe4f2;
    background: #f6f9ff;
}

.footer {
    background: var(--white);
    border-top: 1px solid #edf1f7;
    padding: 1rem 0 1.2rem;
    margin-top: 2.4rem;
}

@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
    }
}

.article-rich img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 1rem 0;
}

.article-rich ul,
.article-rich ol {
    padding-left: 1.25rem;
}

.article-rich iframe,
.article-rich video {
    max-width: 100%;
}

/* TinyMCE / rich HTML inside blog body */
.article-rich.tinymce-body {
    overflow-x: auto;
}

/* Tailwind preflight removes list bullets; restore for editor content */
.article-rich.tinymce-body ul {
    list-style-type: disc;
    list-style-position: inside;
    margin: 0.75rem 0 1rem;
    padding-left: 0.25rem;
}

.article-rich.tinymce-body ol {
    list-style-type: decimal;
    list-style-position: inside;
    margin: 0.75rem 0 1rem;
    padding-left: 0.25rem;
}

.article-rich.tinymce-body li {
    display: list-item;
    margin: 0.35rem 0;
    padding-left: 0.35rem;
}

.article-rich.tinymce-body li > p {
    display: inline;
    margin: 0;
}

.article-rich.tinymce-body li > p + p {
    display: block;
    margin-top: 0.35rem;
}

.article-rich.tinymce-body ul ul {
    list-style-type: circle;
    margin-top: 0.35rem;
    margin-bottom: 0.35rem;
    padding-left: 1rem;
}

.article-rich.tinymce-body ol ol,
.article-rich.tinymce-body ul ol,
.article-rich.tinymce-body ol ul {
    margin-top: 0.35rem;
    margin-bottom: 0.35rem;
}

.article-rich.tinymce-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95em;
}

.article-rich.tinymce-body th,
.article-rich.tinymce-body td {
    border: 1px solid #e5eaf2;
    padding: 0.55rem 0.75rem;
    text-align: left;
    vertical-align: top;
}

.article-rich.tinymce-body th {
    background: #f7f9fc;
    font-weight: 600;
    color: #0b1f3a;
}

.article-rich.tinymce-body tr:nth-child(even) td {
    background: #fbfcff;
}

.article-rich.tinymce-body blockquote {
    margin: 1.25rem 0;
    padding: 0.75rem 0 0.75rem 1.1rem;
    border-left: 4px solid #d4af37;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.08), transparent);
    color: #4a5568;
    font-style: italic;
}

.article-rich.tinymce-body pre {
    margin: 1.25rem 0;
    padding: 1rem 1.1rem;
    border-radius: 0.65rem;
    background: #0b1f3a;
    color: #f1f5f9;
    font-size: 0.88rem;
    line-height: 1.55;
    overflow-x: auto;
}

.article-rich.tinymce-body pre code {
    background: transparent;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

.article-rich.tinymce-body hr {
    margin: 2rem 0;
    border: 0;
    border-top: 1px solid #e5eaf2;
}

.article-rich.tinymce-body .alignleft {
    float: left;
    margin: 0.25rem 1.25rem 1rem 0;
    max-width: min(50%, 22rem);
}

.article-rich.tinymce-body .alignright {
    float: right;
    margin: 0.25rem 0 1rem 1.25rem;
    max-width: min(50%, 22rem);
}

.article-rich.tinymce-body .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.article-rich.tinymce-body::after {
    content: "";
    display: table;
    clear: both;
}

.article-rich.tinymce-body h1,
.article-rich.tinymce-body h2,
.article-rich.tinymce-body h3,
.article-rich.tinymce-body h4 {
    scroll-margin-top: 5rem;
}

.article-rich.tinymce-body figure {
    margin: 1.5rem 0;
}

.article-rich.tinymce-body figcaption {
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: #5a6473;
    text-align: center;
}

.blog-detail__figure img {
    display: block;
}

@media (max-width: 640px) {
    a.inline-flex.rounded-xl,
    button.inline-flex.rounded-xl {
        font-size: 0.82rem !important;
        padding: 0.56rem 0.94rem !important;
        line-height: 1.15 !important;
        gap: 0.36rem !important;
    }

    a.inline-flex.rounded-xl svg,
    button.inline-flex.rounded-xl svg {
        width: 0.88rem !important;
        height: 0.88rem !important;
    }

    a.rounded-xl,
    button.rounded-xl,
    .dash-btn {
        font-size: 0.82rem !important;
    }

    a[class*="px-6"][class*="py-3"],
    button[class*="px-6"][class*="py-3"] {
        padding: 0.56rem 0.94rem !important;
    }

    a[class*="px-5"][class*="py-3"],
    button[class*="px-5"][class*="py-3"] {
        padding: 0.56rem 0.9rem !important;
    }
}
