/* ========================
*** Begin replacement for light macOS-like theme ***

/*
   macOS / iOS inspired light theme
   - Default: light
   - Toggle can add .theme-dark on <html> for dark mode overrides
*/

:root {
    --primary: #0b69ff; /* vivid blue */
    --accent: #6b5cff;
    --bg: #f5f7fb;      /* very light gray */
    --surface: #ffffff; /* card background */
    --soft-surface: #f1f5f9;
    --text: #0f1724;    /* dark text */
    --muted-text: #6b7280; /* secondary text */
    --border: #e6eef6;
    --shadow: 0 6px 20px rgba(15,23,42,0.08);
    --radius: 12px;
}

/* Dark theme overrides (optional) */
.theme-dark {
    --primary: #58a6ff;
    --accent: #7c5cff;
    --bg: #0d1117;
    --surface: #0f1720;
    --soft-surface: #0b1220;
    --text: #c9d1d9;
    --muted-text: #8b949e;
    --border: #21262d;
    --shadow: 0 8px 24px rgba(2,6,23,0.45);
}

* { box-sizing: border-box; }
html,body { height: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Inter', sans-serif;
    font-size: 15px;
    -webkit-font-smoothing:antialiased;
}

/* Global page backdrop: subtle radial texture + soft gradient for a pleasant macOS-like canvas */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(circle at 10% 10%, rgba(11,105,255,0.02), transparent 10%),
                      radial-gradient(circle at 90% 90%, rgba(6,74,203,0.02), transparent 12%),
                      linear-gradient(180deg, rgba(245,247,251,1) 0%, rgba(238,243,249,1) 100%);
    background-size: cover;
    -webkit-filter: blur(0.2px);
    filter: blur(0.2px);
}

/* When in dark mode, provide a soft dark canvas (avoid pure black) */
.theme-dark body::before {
    background-image: radial-gradient(circle at 10% 10%, rgba(88,166,255,0.02), transparent 10%),
                      radial-gradient(circle at 90% 90%, rgba(124,92,255,0.02), transparent 12%),
                      linear-gradient(180deg, rgba(10,12,20,1) 0%, rgba(18,22,34,1) 100%);
}

/* Make header slightly translucent so backdrop will be visible */
.site-header { background: rgba(255,255,255,0.7); backdrop-filter: blur(6px); }

/* Shell */
.app-shell { display:flex; min-height: calc(100vh - 64px); }
.sidebar {
    width: 88px;
    background: linear-gradient(180deg, rgba(255,255,255,0.6), rgba(255,255,255,0.4));
    border-right: 1px solid var(--border);
    display:flex; flex-direction:column; align-items:center; padding: 16px 8px;
}
.logo { width:48px; height:48px; border-radius:10px; display:flex;align-items:center;justify-content:center;font-weight:700;color:var(--primary); background:linear-gradient(180deg,#ffffff,#f0f6ff); box-shadow: var(--shadow); }
.sidebar .nav { margin-top:18px; width:100%; }
.sidebar a { display:block; width:100%; padding:10px; color:var(--muted-text); text-align:center; border-radius:10px; margin-bottom:8px; }
.sidebar a.active, .sidebar a:hover { background: linear-gradient(180deg, rgba(11,105,255,0.06), rgba(11,105,255,0.03)); color:var(--primary); }

/* SVG icons inherit color so they can be themed via CSS */
.icon { width: 1.05em; height: 1.05em; vertical-align: -0.12em; color: var(--muted-text); fill: currentColor; stroke: currentColor; }
.sidebar a .icon { color: var(--muted-text); }
.sidebar a.active .icon, .sidebar a:hover .icon { color: var(--primary); }

.sidebar .bottom { margin-top:auto; margin-bottom:12px; }

.content-area { flex:1; padding:28px; }
.topbar { display:flex; align-items:center; gap:12px; margin-bottom:18px; }
.search input { width:100%; background:var(--soft-surface); border:1px solid var(--border); color:var(--text); padding:10px 14px; border-radius:10px; }

/* Panels */
.panel { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:18px; box-shadow: var(--shadow); }
.panel .panel-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.panel h3, .panel h5 { margin:0; }

/* Cards */
.card { background:var(--surface); border-radius:12px; border:1px solid var(--border); box-shadow: var(--shadow); }
.card-header { background:transparent; border-bottom: none; padding:12px 16px; }
.card-body { padding:16px; }

/* Forms */
.form-control, .form-select { background:var(--soft-surface); color:var(--text); border:1px solid var(--border); border-radius:10px; padding:.5rem .75rem; }
.form-control:focus { outline: none; box-shadow: 0 6px 18px rgba(11,105,255,0.08); border-color: var(--primary); }

/* Buttons */
.btn { border-radius:10px; font-weight:600; }
.btn-primary { background:var(--primary); color:white; border: 1px solid rgba(11,105,255,0.12); }
.btn-outline-secondary { background:transparent; border:1px solid var(--border); color:var(--muted-text); }

/* Badges */
.badge { border-radius:8px; padding:.25rem .5rem; font-weight:600; }

/* Priority */
.priority-urgent { background:#ffe9e9; color:#b91c1c; }
.priority-high { background:#fff4e6; color:#92400e; }
.priority-normal { background:#fff7ed; color:#b45309; }
.priority-low { background:#e6ffef; color:#065f46; }

/* Markdown preview */
.markdown-body { color:var(--text); line-height:1.7; }
.markdown-body pre, .markdown-body code { background:#f3f4f6; color:var(--text); padding:.5rem .75rem; border-radius:8px; }

/* Tables */
.table { background:transparent; }
.table thead th { color:var(--muted-text); border-bottom:1px solid var(--border); }
.table tbody tr:hover { background: rgba(11,105,255,0.03); }

/* Responsive */
@media (max-width: 768px) { .sidebar { display:none; } .sidebar.show-mobile { display:flex; position:absolute; left:0; top:64px; bottom:0; z-index:1200; } }

/* Small utilities */
.muted { color:var(--muted-text); }
.section-title { font-size:1.1rem; font-weight:700; color:var(--text); }
.user-avatar { width:36px; height:36px; border-radius:8px; display:inline-flex; align-items:center; justify-content:center; color:white; background:var(--primary); }
.search-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(15,23,42,0.06);
    z-index: 1400;
    max-height: 320px;
    overflow: auto;
    padding: 8px;
}
.search-suggestion { padding: 8px 10px; border-radius:8px; display:flex; gap:10px; align-items:center; cursor:pointer; }
.search-suggestion:hover, .search-suggestion[aria-selected="true"] { background: rgba(11,105,255,0.04); }
.search-suggestion .meta { color: var(--muted-text); font-size: .9rem; }

/* Entrance animation for cards — subtle fade only (no motion) */
.animate-enter { opacity: 0; }
.animate-enter.animate-enter-active { opacity: 1; transition: opacity .36s cubic-bezier(.2,.8,.2,1); }

/* Improve contrast for readability */
/* Slightly darker text, clearer borders */
:root { --text: #0b1220; --muted-text: #556071; --border: #e1e8f0; }

/* Improve button and link contrast and add gentle hover states */
.btn-primary { background: #0851d1; border-color: rgba(8,81,209,0.12); }
.btn-primary:hover { background: #0646b3; }
a { color: var(--primary); }
a:hover { color: #084acb; text-decoration: underline; }

/* Slightly lift panels and make them more readable */
.panel { background: #ffffff; border-color: #e6eef6; }
.card { background: #ffffff; }

/* Improve headings contrast */
.section-title { color: #071229; }
.panel h5 { color: #071229; }

/* Badges: clearer tones */
.badge { background: #f1f5f9; color: #0b1220; border: 1px solid #e6eef6; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fff7ed; color: #92400e; }

/* Increase focus ring for keyboard users */
button:focus, .form-control:focus, a:focus { box-shadow: 0 0 0 4px rgba(11,105,255,0.08); }

/* larger avatar variant for profile page */
.user-avatar-xl { width:64px; height:64px; border-radius:10px; font-size:22px; font-weight:700; }

/* subtle transitions */
* { transition: background .12s ease, color .12s ease, border-color .12s ease, box-shadow .12s ease; }

/* accessibility */
button:focus, a:focus { outline: 3px solid rgba(11,105,255,0.12); outline-offset: 2px; }

/* end */

*** End replacement for light macOS-like theme ***
.dropdown-menu {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(2,6,23,0.06);
    color: var(--text);
}

.dropdown-item {
    color: var(--text);
    padding: .5rem 1rem;
    transition: background .12s ease, color .12s ease;
}

.dropdown-item:hover {
    background: rgba(11,105,255,0.06);
    color: var(--primary);
    font-weight: 600;
}


/* ========================
   CARDS & CONTAINERS
   ======================== */
.badge { font-weight: 600; font-size: .8rem; border-radius: 6px; padding: .25rem .6rem; }

.card {
    background: var(--dark-bg-3);
.table { color: var(--text); }
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.05);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.15);
    transform: translateY(-2px);
}

.card-header {
    background: linear-gradient(135deg, var(--dark-bg-2) 0%, var(--dark-bg-3) 100%);
    border-bottom: 1px solid var(--primary);
    color: var(--primary) !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-body {
    color: var(--text-light);
}

.card-title {
    color: var(--primary);
    font-weight: 600;
}

.card-text {
    color: var(--text-lighter);
}

/* ========================
   FORMS & INPUTS
   ======================== */

.form-control, .form-select {
    background: var(--dark-bg-2);
    color: var(--text-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    background: var(--dark-bg-2);
    color: var(--text-light);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.form-control::placeholder {
    color: var(--text-lighter);
    opacity: 0.6;
}

.form-control-label {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-check-input {
    background: var(--dark-bg-2);
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.form-check-input:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.form-check-label {
    color: var(--text-light);
    cursor: pointer;
}

/* ========================
   BUTTONS
   ======================== */

.btn {
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: var(--dark-bg);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
    background: var(--secondary);
    color: white;
    box-shadow: 0 0 25px rgba(255, 0, 110, 0.4);
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success);
    color: var(--dark-bg);
    box-shadow: 0 0 15px rgba(0, 240, 132, 0.3);
}

.btn-success:hover {
    background: var(--accent);
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.4);
}

.btn-danger {
    background: var(--danger);
    color: white;
    box-shadow: 0 0 15px rgba(255, 0, 81, 0.3);
}

.btn-danger:hover {
    background: var(--secondary);
    box-shadow: 0 0 25px rgba(255, 0, 110, 0.4);
}

.btn-warning {
    background: var(--warning);
    color: var(--dark-bg);
    box-shadow: 0 0 15px rgba(255, 165, 0, 0.3);
}

.btn-warning:hover {
    background: var(--primary);
    color: var(--dark-bg);
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.4);
}

.btn-info {
    background: var(--info);
    color: var(--dark-bg);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.btn-info:hover {
    background: var(--primary);
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.5);
}

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

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

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
}

/* ========================
   BADGES
   ======================== */

.badge {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
}

.badge-danger {
    background: var(--danger);
    color: white;
    box-shadow: 0 0 10px rgba(255, 0, 81, 0.3);
}

.badge-warning {
    background: var(--warning);
    color: var(--dark-bg);
    box-shadow: 0 0 10px rgba(255, 165, 0, 0.3);
}

.badge-success {
    background: var(--success);
    color: var(--dark-bg);
    box-shadow: 0 0 10px rgba(0, 240, 132, 0.3);
}

.badge-info {
    background: var(--info);
    color: var(--dark-bg);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.badge-secondary {
    background: var(--border-color);
    color: var(--text-light);
}

.badge-light {
    background: var(--text-lighter);
    color: var(--dark-bg);
}

/* ========================
   TABLES
   ======================== */

.table {
    color: var(--text-light);
}

/* ========================
   MARKDOWN PREVIEW
   ======================== */
.markdown-body {
    color: var(--text-light);
    line-height: 1.8;
}
.markdown-body h1, .markdown-body h2, .markdown-body h3 {
    color: var(--primary);
}
.markdown-body pre, .markdown-body code {
    background: #0f1724;
    color: #e6f6ff;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    font-family: "Fira Code", Consolas, Monaco, monospace;
}
.markdown-body table {
    width: 100%;
}
.markdown-body a { color: var(--info); }

/* Priority badges — softer / translucent for list UI */
.priority-urgent { background: rgba(220,38,38,0.08); color: #991b1b; border: 1px solid rgba(220,38,38,0.12); }
.priority-high { background: rgba(245,158,11,0.06); color: #92400e; border: 1px solid rgba(245,158,11,0.10); }
.priority-normal { background: rgba(245,158,11,0.04); color: #b45309; border: 1px solid rgba(245,158,11,0.08); }
.priority-low { background: rgba(16,185,129,0.06); color: #065f46; border: 1px solid rgba(16,185,129,0.10); }

.priority-label { padding: .25rem .5rem; border-radius: 8px; font-weight: 700; font-size: .85rem; }


/* Utility spacing */
.muted { color: var(--muted-text); }
.section-title { font-size: 1.1rem; font-weight:700; margin-bottom: .75rem; color: var(--text); }

.user-avatar { width:36px; height:36px; border-radius:6px; display:inline-flex; align-items:center; justify-content:center; color:white; font-weight:700; }
.task-card { min-height: 180px; }

.table-dark {
    background: var(--dark-bg-2);
    color: var(--primary);
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background: rgba(0, 212, 255, 0.02);
}

.table-hover > tbody > tr:hover {
    background: rgba(0, 212, 255, 0.08);
    transform: translateX(2px);
}

/* ========================
   ALERTS
   ======================== */

.alert {
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    background: var(--dark-bg-3);
    color: var(--text-light);
}

.alert-danger {
    border-left-color: var(--danger);
    background: rgba(255, 0, 81, 0.1);
}

.alert-warning {
    border-left-color: var(--warning);
    background: rgba(255, 165, 0, 0.1);
}

.alert-success {
    border-left-color: var(--success);
    background: rgba(0, 240, 132, 0.1);
}

.alert-info {
    border-left-color: var(--info);
    background: rgba(0, 212, 255, 0.1);
}

/* ========================
   PAGINATION
   ======================== */

.pagination {
    margin: 2rem 0;
}

.page-link {
    background: var(--dark-bg-2);
    border: 1px solid var(--border-color);
    color: var(--primary);
}

.page-link:hover {
    background: var(--primary);
    color: var(--dark-bg);
    border-color: var(--primary);
}

.page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--dark-bg);
}

/* ========================
   TASK CARDS (list style)
   ======================== */

.task-list { margin-top: .25rem; }
.task-card {
    background: transparent; /* let page canvas show through */
    border: 1px solid rgba(11,21,34,0.06);
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
    transition: box-shadow .18s ease, border-color .18s ease;
}

.task-card .card-body { padding: 16px 18px; }

.task-card:hover { box-shadow: 0 8px 30px rgba(2,6,23,0.04); transform: none; }

/* subtle colored accent on the left for priority (still visible but softer) */
.task-card.urgent { border-left: 4px solid rgba(220,38,38,0.18); }
.task-card.high { border-left: 4px solid rgba(245,158,11,0.16); }
.task-card.normal { border-left: 4px solid rgba(245,158,11,0.12); }
.task-card.low { border-left: 4px solid rgba(16,185,129,0.12); }

/* class to disable hover animation for controls/filters */
.card.no-hover:hover { transform: none !important; box-shadow: none !important; }


/* ========================
   LIST GROUPS
   ======================== */

.list-group-item {
    background: var(--dark-bg-3);
    border: 1px solid var(--border-color);
    color: var(--text-light);
}

.list-group-item-action:hover {
    background: var(--dark-bg-2);
    border-color: var(--primary);
    transform: translateX(2px);
}

.list-group-item-action.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--dark-bg);
    font-weight: 600;
}

/* ========================
   MODALS
   ======================== */

.modal-content {
    background: var(--dark-bg-3);
    border: 1px solid var(--border-color);
}

.modal-header {
    background: linear-gradient(135deg, var(--dark-bg-2) 0%, var(--dark-bg-3) 100%);
    border-bottom: 1px solid var(--primary);
    color: var(--primary);
}

.modal-body {
    color: var(--text-light);
}

.modal-footer {
    border-top: 1px solid var(--border-color);
}

.close {
    color: var(--primary);
    opacity: 0.8;
}

.close:hover {
    color: var(--secondary);
    opacity: 1;
}

/* ========================
   CUSTOM CLASSES
   ======================== */

.container {
    background: var(--dark-bg);
}

.content-section {
    background: var(--dark-bg-3);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.05);
}

.content-section:hover {
    border-color: var(--primary);
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.1);
}

.article-title {
    color: var(--primary);
    font-weight: 600;
}

.article-metadata {
    border-bottom: 1px solid var(--border-color);
    color: var(--text-lighter);
}

.admin-card {
    transition: all 0.3s ease;
}

.admin-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.2);
}

/* ========================
   LAYOUT
   ======================== */

main {
    background: var(--dark-bg);
    min-height: 100vh;
    padding-top: 80px;
}

.sticky-top {
    top: 80px;
}

/* ========================
   RESPONSIVE
   ======================== */

@media (max-width: 768px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.4rem; }
    h3 { font-size: 1.1rem; }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .btn {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
}

/* ========================
   ANIMATIONS
   ======================== */

@keyframes glow {
    0%, 100% {
        text-shadow: 0 0 10px var(--primary);
    }
    50% {
        text-shadow: 0 0 20px var(--primary), 0 0 30px var(--secondary);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.glow {
    animation: glow 2s ease-in-out infinite;
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}


h1,
h2,
h3,
h4,
h5,
h6 {
    color: #444444;
}

.bg-steel {
    background-color: #5f788a;
}

.site-header .navbar-nav .nav-link {
    color: #cbd5db;
}

.site-header .navbar-nav .nav-link:hover {
    color: #ffffff;
}

.site-header .navbar-nav .nav-link.active {
    font-weight: 500;
}

.content-section {
    background: #ffffff;
    padding: 10px 20px;
    border: 1px solid #dddddd;
    border-radius: 3px;
    margin-bottom: 20px;
}

.article-title {
    color: #444444;
}

a.article-title:hover {
    color: #428bca;
    text-decoration: none;
}

.article-content {
    white-space: pre-line;
}

.article-img {
    height: 65px;
    width: 65px;
    margin-right: 16px;
}

.article-metadata {
    padding-bottom: 1px;
    margin-bottom: 4px;
    border-bottom: 1px solid #e3e3e3
}

.article-metadata a:hover {
    color: #333;
    text-decoration: none;
}

.article-svg {
    width: 25px;
    height: 25px;
    vertical-align: middle;
}

.account-img {
    height: 125px;
    width: 125px;
    margin-right: 20px;
    margin-bottom: 16px;
}

.account-heading {
    font-size: 2.5rem;
}

/* Admin Styles */
.admin-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.admin-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.list-group-item-action.active {
    background-color: #007bff;
    border-color: #007bff;
}

.badge {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.btn-group-vertical {
    width: 100%;
}

/* Task cards in admin section */
.task-card {
    border-left: 4px solid #007bff;
    margin-bottom: 1rem;
}

/* Dashboard cards */
.card.bg-primary, .card.bg-info, .card.bg-success, .card.bg-warning {
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.display-4 {
    font-weight: 700;
}

/* Navigation styles */
.nav-link.active {
    color: #007bff !important;
    border-bottom: 2px solid #007bff;
}

/* Усиленная видимая подсветка фокуса для accessibility */
.form-control:focus, .form-select:focus {
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(8,81,209,0.18) !important;
    border-color: #0851d1 !important;
}



