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

:root {
    --bg-color: #fcfcfd;
    --text-color: #000000;
    --text-muted: #667085;
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #f3f4f6;
    --card-bg: #ffffff;
    --border-color: #eaecf0;
    --header-bg: rgba(255, 255, 255, 0.8);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Footer (dark in light mode) */
    --footer-bg: #0f172a;
    --footer-text: #94a3b8;
    --footer-heading: #ffffff;
    --footer-border: #1e293b;
    --footer-link-hover: #ffffff;
    --footer-muted: #64748b;
}

:root.dark-theme {
    --bg-color: rgb(25, 28, 29);
    --text-color: #e2e8f0;
    --text-muted: #94a3b8;
    --primary-color: #818cf8;
    --primary-hover: #a5b4fc;
    --secondary-color: #242728;
    --card-bg: #1e2122;
    --border-color: #2d3133;
    --header-bg: rgba(25, 28, 29, 0.85);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.6);

    /* Footer dark variant */
    --footer-bg: #2A2E30;
    --footer-text: #94a3b8;
    --footer-heading: #e2e8f0;
    --footer-border: #3a3f42;
    --footer-link-hover: #ffffff;
    --footer-muted: #78838e;
}

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

html,
body {
    margin: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

main,
header,
footer {
    width: 100%;
}

main {
    flex: 1;
    /* Removed redundant 100vh to avoid forced scroll */
    display: flex;
    flex-direction: column;
}

.container {
    width: 900px;
    /* Enforced 900px as requested */
    margin-left: auto;
    margin-right: auto;
    padding: 1rem 2rem;
}

main.container {
    min-height: 100dvh;
    /* Stretching content block to 100vh as requested */
    display: flex;
    flex-direction: column;
    /* Removed background: white; to match global background */
}

header {
    background-color: var(--header-bg);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-container {
    width: 418px;
    margin: 4rem auto;
    padding: 0 1rem;
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    color: var(--text-color);
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

div.auth-container h1,
div.auth-container h2 {
    margin: 0px !important;
    padding: 0px !important;
    line-height: normal !important;
    display: block !important;
}

h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    background-color: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-admin-outline {
    background-color: var(--card-bg) !important;
    border: 1.5px solid #dc2626 !important;
    color: #dc2626 !important;
}

.btn-admin-outline:hover {
    background-color: #dc2626 !important;
    color: white !important;
}

.btn:hover {
    background-color: var(--primary-hover);
    color: white;
}

.btn-secondary {
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--secondary-color);
    color: var(--text-color);
}

.btn-danger {
    background-color: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.btn-danger:hover {
    background-color: #fef2f2;
    border-color: #dc2626;
    color: #dc2626;
}

.btn-password {
    background: var(--card-bg) !important;
    color: #4f46e5 !important;
    border: 1px solid #4f46e5 !important;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.05) !important;
}

.btn-password:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2) !important;
    background: #4f46e5 !important;
    color: white !important;
}

.btn-danger:hover {
    background-color: #fef2f2;
    border-color: #dc2626;
    color: #dc2626;
}

.card {
    margin-bottom: 2rem;
}

.post-full {
    padding-top: 0;
}

.post-full-title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.post-full-content {
    font-size: 1.15rem;
    line-height: 1.7;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Image wrapper with blurred background */
.img-wrapper {
    position: relative;
    max-height: 450px;
    border-radius: 8px;
    overflow: hidden;
    margin: 1rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary-color);
}

.img-wrapper .img-blur-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(25px) brightness(0.7);
    transform: scale(1.2);
    z-index: 0;
}

.post-full-content img,
.post-preview img {
    max-width: 100%;
    max-height: 450px;
    object-fit: contain;
    display: block;
    position: relative;
    z-index: 1;
}

.ql-align-center {
    text-align: center;
}

.ql-align-right {
    text-align: right;
}

.ql-align-justify {
    text-align: justify;
}

.post-full-content blockquote,
.post-preview blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-muted);
}

.post-full-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 15px;
    align-items: center;
}

.post-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    /* Removed margin as requested */
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-preview {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--primary-color);
}

form div {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--card-bg);
    color: var(--text-color);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

:root.dark-theme input:focus,
:root.dark-theme textarea:focus,
:root.dark-theme select:focus {
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.15);
}

::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

select option {
    background-color: var(--card-bg);
    color: var(--text-color);
}

/* Browser autofill override — dark theme */
:root.dark-theme input:-webkit-autofill,
:root.dark-theme input:-webkit-autofill:hover,
:root.dark-theme input:-webkit-autofill:focus,
:root.dark-theme textarea:-webkit-autofill,
:root.dark-theme select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px var(--card-bg) inset !important;
    -webkit-text-fill-color: var(--text-color) !important;
    border-color: var(--border-color) !important;
    transition: background-color 5000s ease-in-out 0s;
    caret-color: var(--text-color);
}

/* Vote component */
.vote-block {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    user-select: none;
    font-family: var(--font-body);
}

.vote-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 6px;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text-muted);
    transition: color 0.15s ease;
}

.vote-btn:hover:not(.vote-disabled) {
    color: var(--text-color);
}

.vote-btn.vote-up.active {
    color: #059669;
}

.vote-btn.vote-down.active {
    color: #dc2626;
}

.vote-btn.vote-disabled {
    cursor: default;
    opacity: 0.35;
}

.vote-score {
    font-weight: 700;
    font-size: 0.95rem;
    min-width: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    padding: 0 2px;
}

.vote-score.score-high {
    color: #059669;
}

.vote-score.score-negative {
    color: #dc2626;
}

:root.dark-theme .vote-btn.vote-up.active {
    color: #34d399;
}

:root.dark-theme .vote-btn.vote-down.active {
    color: #f87171;
}

:root.dark-theme .vote-score.score-high {
    color: #34d399;
}

:root.dark-theme .vote-score.score-negative {
    color: #f87171;
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: 1.25rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background-color: var(--secondary-color);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.hidden {
    display: none !important;
}

.container-wide {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

/* Editor Specific Styles */
.editor-toolbar {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px 8px 0 0;
    padding: 0.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    position: sticky;
    top: 70px;
    z-index: 900;
}


.ql-editor {
    font-family: var(--font-body) !important;
    color: var(--text-color) !important;
    line-height: 1.6 !important;
    font-size: 1.1rem !important;
}

.ql-editor.ql-blank::before {
    font-family: var(--font-body) !important;
    font-style: normal !important;
    color: var(--text-muted) !important;
}

.ql-toolbar {
    border-radius: 8px 8px 0 0 !important;
    border-color: var(--border-color) !important;
    background: var(--secondary-color) !important;
    margin-bottom: 0 !important;
    /* Ensure no gap at the bottom of the toolbar */
}

.ql-container {
    border-radius: 0 0 8px 8px !important;
    border-color: var(--border-color) !important;
    font-size: 1.1rem !important;
    min-height: calc(100vh - 320px);
    margin-top: 0 !important;
    background: var(--card-bg) !important;
}

.ql-editor {
    min-height: calc(100vh - 320px);
}

.editor-drop-overlay {
    position: absolute;
    inset: 0;
    background: rgba(99, 102, 241, 0.08);
    border: 2px dashed var(--primary-color);
    border-radius: 0 0 8px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 10;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Quill toolbar icon colors for dark theme */
.ql-toolbar .ql-stroke {
    stroke: var(--text-color) !important;
}

.ql-toolbar .ql-fill {
    fill: var(--text-color) !important;
}

.ql-toolbar .ql-picker-label {
    color: var(--text-color) !important;
}

.ql-toolbar .ql-picker-options {
    background: var(--card-bg) !important;
    border-color: var(--border-color) !important;
}

.ql-toolbar .ql-active .ql-stroke {
    stroke: var(--primary-color) !important;
}

.ql-toolbar .ql-active .ql-fill {
    fill: var(--primary-color) !important;
}

.ql-toolbar button:hover .ql-stroke {
    stroke: var(--primary-color) !important;
}

.ql-toolbar button:hover .ql-fill {
    fill: var(--primary-color) !important;
}

input.title-input {
    font-size: 2rem !important;
    font-weight: 700 !important;
    border: none !important;
    border-bottom: 1px solid transparent !important;
    /* Reserve space for border */
    padding: 1rem 0 !important;
    margin-bottom: 1rem !important;
    background: transparent !important;
    font-family: var(--font-heading) !important;
    border-radius: 4px !important;
}

input.title-input:focus {
    box-shadow: none !important;
    border-bottom-color: var(--border-color) !important;
    /* Show border without shifting */
    border-radius: 4px !important;
    outline: none !important;
}

.delete-confirm-container {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    background: #fef2f2;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid #fee2e2;
}

@keyframes slideInDown {
    from {
        transform: translate(-50%, -20px);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

.alert-toast {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    background: var(--card-bg);
    color: #dc2626;
    border: 1px solid #fecaca;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    min-width: 320px;
    justify-content: center;
}

.alert-toast::before {
    content: '!';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    flex-shrink: 0;
    background: #dc2626;
    color: #fff;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
}

.validation-toast {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    background: var(--card-bg);
    color: #ea580c;
    /* Orange 600 */
    border: 1px solid #ffedd5;
    /* Orange 100 */
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    min-width: 320px;
    justify-content: center;
}

.validation-toast::before {
    content: '!';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    flex-shrink: 0;
    background: #ea580c;
    color: #fff;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
}

input.input-error,
textarea.input-error {
    border-color: #ea580c !important;
    box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.1) !important;
}

@keyframes blink-border {
    0% {
        border-bottom-color: #ea580c;
    }

    50% {
        border-bottom-color: transparent;
    }

    100% {
        border-bottom-color: #ea580c;
    }
}

input.title-input.input-error {
    border-bottom: 2px solid #ea580c !important;
    animation: blink-border 0.8s infinite;
    box-shadow: none !important;
}

/* Auth Message Area Styles */
div.auth-message-area {
    min-height: 80px !important;
    max-height: 80px !important;
    height: 80px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    overflow: hidden !important;
    margin: 8px 0px !important;
    padding: 0px !important;
    visibility: visible !important;
}

.auth-message-area .alert-toast,
.auth-message-area .validation-toast {
    position: static !important;
    transform: none !important;
    margin-bottom: 0 !important;
    min-width: 100% !important;
    box-shadow: none !important;
    animation: none !important;
    border-radius: 8px !important;
    z-index: auto !important;
}

.auth-message-area .alert-toast {
    background-color: #fef2f2 !important;
    border-color: #fee2e2 !important;
}

.auth-message-area .validation-toast {
    background-color: #fffaf0 !important;
    border-color: #ffedd5 !important;
}

/* Footer Styles */
.main-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 2rem 0 0;
    margin-top: 2rem;
    width: 100%;
    transition: background 0.3s, color 0.3s;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 1.5rem;
}

.footer-col h4 {
    color: var(--footer-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
}

.footer-col p {
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: var(--footer-text);
}

.footer-links a {
    color: var(--footer-text);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--footer-link-hover);
}

.footer-bottom {
    border-top: 1px solid var(--footer-border);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--footer-muted);
}

/* Theme Toggle */
.hidden {
    display: none;
}

.btn-theme-toggle {
    background: transparent;
    border: 1px solid var(--footer-border);
    color: var(--footer-muted);
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    vertical-align: middle;
}

.btn-theme-toggle:hover {
    color: var(--footer-heading);
    border-color: var(--footer-heading);
}

/* User Profile & Bio Styles */
.user-bio h1,
.user-bio h2 {
    font-size: 1.5rem;
    margin: 1.5rem 0 0.75rem;
}

.user-bio p {
    margin-bottom: 1rem;
}

.social-links a {
    text-decoration: none;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 99px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.social-links a:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    background: var(--card-bg);
    color: var(--primary-color);
}

.social-links div,
.social-links span {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Auth Message Area Styles */
div.auth-message-area {
    min-height: 80px !important;
    max-height: 80px !important;
    height: 80px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    overflow: hidden !important;
    margin: 0px !important;
    padding: 0px !important;
    visibility: visible !important;
}

.auth-message-area .alert-toast,
.auth-message-area .validation-toast {
    position: static !important;
    transform: none !important;
    margin-bottom: 0 !important;
    min-width: 100% !important;
    box-shadow: none !important;
    animation: none !important;
    border-radius: 8px !important;
    z-index: auto !important;
}

.auth-message-area .alert-toast {
    background-color: #fef2f2 !important;
    border-color: #fee2e2 !important;
}

.auth-message-area .validation-toast {
    background-color: #fffaf0 !important;
    border-color: #ffedd5 !important;
}

/* --- ULTIMATE AUTH UI OVERRIDES --- */
body div.auth-container h1,
body div.auth-container h2 {
    margin: 0px !important;
    margin-bottom: 0px !important;
    padding: 0px !important;
    line-height: 1 !important;
}

body div.auth-message-area {
    min-height: 80px !important;
    height: 80px !important;
    max-height: 80px !important;
    margin: 8px 0px !important;
    padding: 0px !important;
    display: flex !important;
}

body div.auth-message-area .alert-toast,
body div.auth-message-area .validation-toast {
    margin: 0px !important;
    margin-bottom: 0px !important;
}

/* Modern Checkbox */
.modern-checkbox-container {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    padding: 8px 0;
}

.modern-checkbox-container input {
    display: none;
}

.checkbox-custom {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    position: relative;
    transition: all 0.2s ease;
    background: var(--card-bg);
}

.modern-checkbox-container input:checked+.checkbox-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-custom::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 48%;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: translate(-50%, -50%) rotate(45deg);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.modern-checkbox-container input:checked+.checkbox-custom::after {
    opacity: 1;
}

.modern-checkbox-label {
    font-size: 1rem;
    color: var(--text-color);
    font-weight: 500;
}

.btn-group-row {
    display: flex;
    gap: 12px;
    width: 100%;
}

.btn-group-row>* {
    flex: 1;
}

/* Ultra-specific success toast overrides to beat auth-message-area defaults */
body div.auth-message-area .alert-toast.success-toast {
    background-color: #ecfdf5 !important;
    background: #ecfdf5 !important;
    color: #059669 !important;
    border: 1px solid #10b981 !important;
}

.success-toast::before {
    content: '✓' !important;
    background: #059669 !important;
}

/* ========== Dark Theme: Notification Palette ========== */

/* Critical (alert-toast) — dark red tint */
:root.dark-theme .alert-toast {
    background: #2d1b1b;
    color: #f87171;
    border-color: #5c2b2b;
}

:root.dark-theme .alert-toast::before {
    background: #ef4444;
}

/* Informational / Validation (validation-toast) — dark amber tint */
:root.dark-theme .validation-toast {
    background: #2d2418;
    color: #fb923c;
    border-color: #5c4a28;
}

:root.dark-theme .validation-toast::before {
    background: #f97316;
}

/* Success (success-toast) — dark green tint */
:root.dark-theme .success-toast {
    background: #162520 !important;
    color: #34d399 !important;
    border-color: #1d5a3e !important;
}

:root.dark-theme .success-toast::before {
    background: #10b981 !important;
}

/* Auth message area: dark theme overrides */
:root.dark-theme .auth-message-area .alert-toast {
    background-color: #2d1b1b !important;
    border-color: #5c2b2b !important;
}

:root.dark-theme .auth-message-area .validation-toast {
    background-color: #2d2418 !important;
    border-color: #5c4a28 !important;
}

:root.dark-theme body div.auth-message-area .alert-toast.success-toast {
    background-color: #162520 !important;
    background: #162520 !important;
    color: #34d399 !important;
    border: 1px solid #1d5a3e !important;
}

/* Input error glow — dark theme */
:root.dark-theme input.input-error,
:root.dark-theme textarea.input-error {
    border-color: #f97316 !important;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.15) !important;
}

:root.dark-theme input.title-input.input-error {
    border-bottom-color: #f97316 !important;
}

/* Delete confirm container — dark theme */
:root.dark-theme .delete-confirm-container {
    background: #2d1b1b;
    border-color: #5c2b2b;
}

/* btn-danger — dark theme */
:root.dark-theme .btn-danger {
    background-color: #3b1c1c;
    color: #f87171;
    border: 1px solid #5c2b2b;
}

:root.dark-theme .btn-danger:hover {
    background-color: #4a2222;
    border-color: #dc2626;
    color: #f87171;
}

/* btn-admin-outline — dark theme */
:root.dark-theme .btn-admin-outline {
    background-color: var(--card-bg) !important;
    border: 1.5px solid #f87171 !important;
    color: #f87171 !important;
}

:root.dark-theme .btn-admin-outline:hover {
    background-color: #dc2626 !important;
    color: #fff !important;
}

/* btn-password — dark theme */
:root.dark-theme .btn-password {
    background: var(--card-bg) !important;
    color: #a5b4fc !important;
    border: 1px solid #6366f1 !important;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.1) !important;
}

:root.dark-theme .btn-password:hover {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3) !important;
    background: #6366f1 !important;
    color: white !important;
}

/* ========== Status Badges ========== */
.badge-status {
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-banned {
    background: #fee2e2;
    color: #dc2626;
}

.badge-deleted {
    background: #f1f5f9;
    color: #475569;
}

.badge-active {
    background: #ecfdf5;
    color: #059669;
}

:root.dark-theme .badge-banned {
    background: #3b1c1c;
    color: #f87171;
}

:root.dark-theme .badge-deleted {
    background: #2a2d30;
    color: #94a3b8;
}

:root.dark-theme .badge-active {
    background: #162520;
    color: #34d399;
}

/* ========== Delete Confirm Elements ========== */
.delete-confirm-text {
    font-weight: 600;
    color: #dc3545;
}

.btn-confirm-danger {
    background: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
}

:root.dark-theme .delete-confirm-text {
    color: #f87171;
}

:root.dark-theme .btn-confirm-danger {
    background: #dc2626 !important;
    border-color: #7f1d1d !important;
}

/* Admin delete-posts confirm container — dark theme */
:root.dark-theme .delete-posts-confirm {
    background: #2d1b1b !important;
    border-color: #5c2b2b !important;
}

.delete-posts-confirm {
    background: #fff1f2;
    border: 1px solid #fee2e2;
}

/* Admin logs error badge — dark theme */
:root.dark-theme .log-status-error {
    background: #3b1c1c !important;
    color: #f87171 !important;
    border-color: #5c2b2b !important;
}