:root {
    /* Brand Colors */
    --color-brand-primary: #424242;
    --color-brand-accent: #FF8A00;
    --color-brand-accent-light: #FFC700;


    /* UI Colors */
    --color-surface-bg: #F5F5F7;
    --color-surface-card: #FFFFFF;
    --color-border-subtle: #D2D2D7;

    /* Text Colors */
    --color-text-main: #3a3a3a;
    --color-text-secondary: #86868B;
    --color-text-inverse: #FFFFFF;

    /* Spacing & Borders */
    --transition-base: all 0.2s ease-in-out;
    --border-radius-base: 8px;
    --border-radius-sm: 6px;

    /* Header & Navigation */
    --header-bg: rgba(255, 255, 255, 0.98);
    --header-height: 80px;
    --nav-link-color: #333;
    --nav-link-hover: var(--color-brand-accent);
    --btn-primary-bg: #111;
    --btn-primary-text: #fff;
    --btn-secondary-border: #e0e0e0;
    --accent-color: var(--color-brand-accent);
}

/* Global resets */
html {
    scrollbar-gutter: stable;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--color-text-main);
    background: transparent;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Auth Module */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}

.auth-card {
    background-color: var(--color-surface-card);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--border-radius-base);
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.auth-logo {
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
}

.auth-logo__brand {
    color: var(--color-brand-primary);
    text-decoration: none;
}

.auth-logo__accent {
    color: var(--color-brand-accent);
}

/* Form Components */
.c-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
}

.c-form-input {
    width: 100%;
    background-color: transparent;
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--border-radius-sm);
    padding: 0.625rem 0.875rem;
    font-size: 0.95rem;
    color: var(--color-text-main);
    transition: var(--transition-base);
}

.c-form-input:focus {
    border-color: var(--color-brand-primary);
    outline: none;
    background-color: #fff;
}

/* Fix for Input Groups (Eye Icon) */
.auth-card .input-group {
    flex-wrap: nowrap;
}

.auth-card .input-group .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-color: var(--color-border-subtle);
    background-color: #fff;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    padding: 0 1rem; /* Remove vertical padding to let it stretch */
    border-left: none; /* Combine borders */
}

.auth-card .input-group .c-form-input {
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    margin-bottom: 0 !important; /* Fix potential margin shift */
}

.auth-card .input-group .btn:hover {
    background-color: var(--color-surface-bg);
    color: var(--color-brand-primary);
}

.c-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--border-radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition-base);
}

.c-btn--primary {
    background-color: var(--color-brand-primary);
    color: var(--color-text-inverse);
    text-decoration: none;
}

.c-btn--primary:hover {
    background-color: #323236;
    color: var(--color-text-inverse);
}



.u-mt-lg {
    margin-top: 2rem;
}

.u-mb-md {
    margin-bottom: 1rem;
}

.u-text-muted {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

.u-link {
    color: var(--color-brand-primary);
    text-decoration: underline;
    font-size: 0.875rem;
    cursor: pointer;
}

.u-link:hover {
    color: var(--color-brand-accent);
}

.small {
    font-size: 0.875rem;
}

/* Footer (simple personal blog) */
footer {
    background: #111111;
    color: #ffffff;
    padding: 60px 0 40px;
}

.footer-title {
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 14px;
}

.footer-text {
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.6;
    margin-bottom: 0;
}

.footer-link {
    display: block;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    margin: 6px 0;
}

.footer-link:hover {
    color: #ffffff;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.footer-social__link {
    color: #ffffff;
    font-size: 1.25rem;
    text-decoration: none;
    opacity: 0.9;
}

.footer-social__link:hover {
    opacity: 1;
}

.footer-divider {
    margin: 28px 0 0;
    border-color: rgba(255, 255, 255, 0.12);
    opacity: 1;
}

.footer-bottom {
    padding-top: 18px;
    color: rgba(255, 255, 255, 0.7);
}

/* 
==========================================================================
   GLOBAL RICH TEXT CONTENT (CKEDITOR 5)
   Applied via .ck-content class throughout the project
========================================================================== 
*/

.ck-content {
    word-wrap: break-word;
}

/* 1. Responsive Images & Figures */
.ck-content img,
.ck-content figure img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin-left: auto;
    margin-right: auto;
    border-radius: 8px;
}

.ck-content figure {
    max-width: 100% !important;
    margin: 1.5rem auto !important;
    display: table;
    /* Giúp figure co theo ảnh */
    clear: both;
}

.ck-content figure figcaption {
    font-size: 0.85rem;
    color: #666;
    background-color: #f9f9f9;
    padding: 0.5rem;
    text-align: center;
    border-radius: 0 0 8px 8px;
}

/* 2. Tables & Media */
.ck-content table {
    width: 100% !important;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
    color: #444;
}

.ck-content table th,
.ck-content table td {
    border: 1px solid var(--color-border-subtle, #D2D2D7);
    padding: 6px 15px;
    text-align: left;
}

.ck-content table th {
    background-color: #f8f9fa;
    color: var(--color-brand-primary, #424242);
    font-weight: 700;
}

.ck-content table tr:nth-child(even) {
    background-color: #fcfcfd;
}

.ck-content .media {
    max-width: 100% !important;
    margin: 1rem 0;
}

.ck-content .media iframe {
    width: 100% !important;
    aspect-ratio: 16 / 9;
    height: auto !important;
}

/* 3. Typography & Tags fix */
.ck-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
    text-align: justify;
}

.ck-content h2,
.ck-content h3,
.ck-content h4 {
    color: #4b4b4b;
    font-weight: 700;
    margin-top: 1.6rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.ck-content h2 {
    font-size: 1.6rem;
}

.ck-content h3 {
    font-size: 1.4rem;
}

.ck-content h4 {
    font-size: 1.2rem;
}

.ck-content ul,
.ck-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.ck-content li {
    margin-bottom: 0.5rem;
}

.ck-content blockquote {
    border-left: 4px solid #000;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background-color: #f8f9fa;
    font-style: italic;
    font-size: 1.1rem;
    color: #444;
}

.ck-content hr {
    margin: 3rem 0;
    border: 0;
    border-top: 1px solid #eee;
    opacity: 1;
}

.ck-content a {
    color: #007bff;
    text-decoration: underline;
}

.ck-content a:hover {
    color: #0056b3;
}