/*=== Global CSS ===*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root {
    color-scheme: dark;
    --primary-green: #538d03;
    --secondary-green: #78d504;
    --bg-grad: linear-gradient(135deg, #0f172a 0%, #1a2335 50%, #111827 100%);
    --bg-dark: rgb(17, 25, 40);
    --hover: rgb(27, 38, 60);
    --text-white: #ffffff;
    --text-gray: #cccccc;
    --text-light-gray: #999999;
    --border-color: #555555;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.4);
    --transition: all 0.3s ease;
    --card-radius: 16px;
    --card-border: rgba(255,255,255,.10);
    --card-border-hover: rgba(255,255,255,.18);
    --card-surface: rgba(255,255,255,.04);
    --card-surface-2: rgba(255,255,255,.06);
}
body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-dark);
}
main { padding-top: 5rem; }
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-green);
    font-weight: 600;
    margin-bottom: 0.5rem;
}
a {
    color: var(--primary-green);
    text-decoration: none;
    transition: var(--transition);
}
a:hover { color: var(--primary-green); }
.link { color: var(--primary-green); font-weight: 500; }
.link:hover { color: var(--primary-green); text-decoration: underline; }
.container {
    max-width: 1200px;
    margin: 0 auto;
}
.text-danger{
    color: red;
}

/*=== Auth => Login & Register ===*/
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-dark);
    margin: 3rem auto;
}
.auth-card{
    background: var(--bg-grad);
    border-radius: 14px;
    width: 100%;
    max-width: 37rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 14px 40px rgba(0,0,0,0.45);
    position: relative;
    animation: fadeIn 0.3s ease-in-out;
}
.auth-card::before{
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 16px;
    pointer-events: none;
    opacity: 0.65;
}
.auth-card:hover{
    box-shadow: 0 18px 55px rgba(0,0,0,0.55);
}
.auth-card:hover::before{
    opacity: 1;
}
.auth-header {
    padding: 1.5rem 1rem 1rem;
    text-align: center;
}
.auth-header i {
    font-size: 2rem;
    color: var(--primary-green);
    margin-bottom: 0.5rem;
}
.auth-header h2 {
    margin-bottom: 0.5rem;
    color: var(--primary-green);
    font-weight: 700;
    font-size: 1.8rem;
}
.auth-header p {
    color: var(--text-white);
    margin: 0.2rem;
    font-size: 0.8rem;
}
.auth-form {
    padding: 0.2rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
}
.elandia-span{
    color: var(--primary-green);
    font-weight: bold;
}
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}
.input-group i {
    position: absolute;
    left: 0.9rem;
    color: var(--primary-green);
    font-size: 1rem;
}
.input-group input {
    width: 100%;
    padding: 0.8rem 0.8rem 0.8rem 2.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-dark);
    color: var(--text-white);
    font-size: 1rem;
    transition: all 0.2s ease;
    margin: 0.7rem 0;
}
.input-group input:focus {
    border-color: var(--primary-green);
    background: var(--bg-dark);
    outline: none;
    box-shadow: 0 0 6px rgba(0, 255, 120, 0.25);
}
.password-toggle {
    position: absolute;
    right: 0.8rem;
    background: none;
    border: none;
    color: var(--text-gray, #aaa);
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.2s;
}
.password-toggle:hover {
    color: var(--primary-green);
}
.password-toggle i {
    font-size: 0.8rem;
    line-height: 1;
    width: 100%;
    text-align: center;
    display: block;
    margin: auto;
}
.auth-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    flex-wrap: wrap;
    white-space: normal;
    margin-bottom: 0.4rem;
}
.auth-checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    width: 16px;
    height: 16px;
    border: 1px solid var(--border-color, #ccc);
    border-radius: 3px;
    background: var(--bg-dark, #fff);
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    display: inline-block;
    position: relative;
    transition: all 0.2s ease-in-out;
}
.auth-checkbox-label input[type="checkbox"]:checked {
    background: var(--primary-green);
    border-color: var(--primary-green);
}
.auth-checkbox-label input[type="checkbox"]::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 4px;
    border-left: 2px solid transparent;
    border-bottom: 2px solid transparent;
    transform: translate(-50%, -55%) rotate(-45deg);
}
.auth-checkbox-label input[type="checkbox"]:checked::after {
    border-left-color: #fff;
    border-bottom-color: #fff;
}
.form-options{
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: nowrap;
    width: 100%;
    margin-bottom: 0.5rem;
}
.forget-password-link {
    font-size: 0.7rem;
    font-weight: bold;
    color: var(--primary-green);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}
.forget-password-link:hover,
.forget-password-link:focus {
    color: #5a940a;
    text-decoration: underline;
}
.auth-footer {
    padding: 1.2rem 1rem;
    text-align: center;
    background: var(--bg-dark, #1e1e1e);
    border-top: 1px solid var(--border-color, #333);
}
.auth-footer p {
    color: var(--text-gray, #ddd);
    font-size: 0.9rem;
    margin: 0.4rem 0;
}
.auth-footer .link {
    color: var(--primary-green);
    font-weight: 600;
    text-decoration: none;
}
.auth-footer .link:hover {
    text-decoration: underline;
}
.forget-password-container{
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-dark);
    min-height: 70vh;
    margin-top: 0.5rem;
}
@media (max-width: 768px) {
    .auth-container{
        min-height: 70vh;
    }
    .auth-card {
        max-width: 100%;
        border-radius: 10px;
        margin: 0 1rem;
        box-shadow: 0 0 15px rgba(0, 255, 120, 0.2);
    }
    .auth-header h2 {
        font-size: 1.4rem;
    }
    .input-group input {
        font-size: 0.95rem;
    }
}
@media (max-width: 480px) {
    .auth-container{
        min-height: 70vh;
    }
    .auth-card {
        margin: 0 0.5rem;
    }
    .auth-form {
        padding: 1rem;
    }
    .auth-header i {
        font-size: 1.6rem;
    }
    .btn {
        font-size: 0.95rem;
        padding: 0.8rem;
    }
    .form-options {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    .auth-checkbox-label {
        align-items: flex-start;
        gap: 4px;
        line-height: 1.1;
    }
    .forget-password-link {
        margin-top: 0.2rem;
        align-self: flex-start;
        font-size: 0.7rem;
    }
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*=== Main content & Flash messages ===*/
.main-content {
    margin-top: 4rem;
    padding: 1.5rem;
    min-height: calc(100vh - 5rem);
    transition: margin-left 0.35s ease;
    background: var(--bg-dark);
}
.with-sidebar {
    margin-left: 5rem;
}
.sidebar:hover ~ .main-content {
    margin-left: 17rem;
}
.sidebar.open ~ .main-content {
    margin-left: 17rem;
}
@media (max-width: 62rem) {
    .with-sidebar {
        margin-left: 0 !important;
    }
    .main-content {
        padding: 1.25rem;
    }
}
.flash-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 450px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.flash-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    position: relative;
    opacity: 0.95;
    transform: translateX(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    backdrop-filter: blur(6px);
    pointer-events: auto;
    animation: fadeOut 5s ease forwards;
}
.flash-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid #10b981;
    color: #10b981;
}
.flash-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    color: #ef4444;
}
.flash-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid #f59e0b;
    color: #f59e0b;
}
.flash-info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid #3b82f6;
    color: #3b82f6;
}
.flash-message.fade-out {
    opacity: 0;
    transform: translateX(100%);
}
.flash-close {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.75;
    transition: opacity 0.2s ease;
    color: currentColor;
    z-index: 10;
    pointer-events: auto;
}
.flash-close:hover {
    opacity: 1;
}
.btn-disabled {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}
@keyframes fadeOut {
    0%   { opacity: 1; transform: translateX(0); }
    80%  { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(100%); }
}

/*== Navbar ===*/
.navbar {
    background: var(--bg-dark);
    padding: 0.8rem 0;
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    height: 4rem;
    right: 0;
    z-index: 1000;
    overflow: visible;
}
.nav-container {
    max-width: 75rem;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: visible;
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.brand-logo {
    height: 2rem;
    margin-left: 5rem;
    transition: opacity 0.2s ease;
}
.brand-logo:hover {
    opacity: 0.8;
}
.mobile-menu-btn {
    color: var(--text-white);
    display: none;
    position: relative;
    width: 2rem;
    height: 1.4rem;
    cursor: pointer;
}
.mobile-menu-btn span {
    position: absolute;
    left: 0;
    right: 0;
    height: 0.2rem;
    background: var(--text-white);
    border-radius: 0.2rem;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}
.mobile-menu-btn span:nth-child(1) {
    top: 0;
}
.mobile-menu-btn span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}
.mobile-menu-btn span:nth-child(3) {
    bottom: 0;
}
.mobile-menu-btn.active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}
.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-btn.active span:nth-child(3) {
    bottom: auto;
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
}
@media (max-width: 992px) {
    .mobile-menu-btn {
        display: block;
    }
    .brand-logo {
        margin-left: 0;
    }
}
@media (hover: none), (pointer: coarse) {
    .mobile-menu-btn { display: block; }
    .brand-logo { margin-left: 0; }

    .sidebar {
        width: 17rem;
        transform: translateX(-17rem);
        z-index: 9999;
        height: calc(100dvh - 4rem);
        bottom: auto;
        overflow: hidden;
    }
    .sidebar.open { transform: translateX(0) !important; }
    .sidebar:hover { width: 17rem; }
    .sidebar-menu a span,
    .sidebar-menu a .fa-chevron-right {
        opacity: 1;
        transform: translateX(0);
    }
    .sidebar-item-flyout:hover .flyout-menu {
        opacity: 0;
        visibility: hidden;
        transform: translateX(0.5rem);
    }
    .sidebar-item-flyout.open .flyout-menu {
        position: relative;
        left: 0;
        top: 0;
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
        margin-left: 2.5rem;
        padding-left: 0.5rem;
        border-left: 2px solid var(--primary-green);
    }
}

/*=== Profile dropdown ===*/
.profile-menu {
    position: relative;
    display: flex;
    align-items: center;
}
.profile-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 10px;
    border: 0;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    color: #fff;
}
.profile-trigger:hover {
    background: rgba(255, 255, 255, 0.10);
}
.profile-trigger:focus {
    outline: none;
}
.profile-trigger:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}
.profile-icon i {
    display: block;
    font-size: 1.2rem;
    margin-right: 0.2rem;
    color: var(--primary-green);
    font-weight: bold;
}
.profile-name {
    font-size: 1rem;
    white-space: nowrap;
    font-weight: 600;
}
.profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 200px;
    background: var(--bg-grad);
    color: #e5e7eb;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    z-index: 1000;

    display: none;
}
.profile-dropdown:not(.hidden) {
    display: block;
}
.profile-item {
    display: block;
    padding: 10px 12px;
    color: inherit;
    text-decoration: none;
    border-radius: 10px;
    margin: 6px;
    font-weight: bold;
}
.profile-item:hover {
    background: rgba(255, 255, 255, 0.08);
}
.profile-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.10);
    margin: 6px;
}
#profile-dropdown a.profile-item:last-of-type {
    color: #ff6b6b;
}
#profile-dropdown a.profile-item:last-of-type:hover {
    background: rgba(255, 107, 107, 0.12);
}
@media (max-width: 480px) {
    .profile-name {
        display: none;
    }

    .profile-trigger {
        width: 44px;
        height: 44px;
        padding: 0;
        justify-content: center;
        border-radius: 12px;
    }

    .profile-dropdown {
        position: fixed;
        top: 64px;
        left: 8px;
        right: 8px;
        width: auto;
        z-index: 9999;
    }
}

/*=== Notifications dropdown ===*/
.notif-bell {
    position: relative;
    display: flex;
    align-items: center;
}
.notif-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 12px;
    cursor: pointer;
    color: #fff;
    transition: background 0.15s ease, transform 0.05s ease;
}
.notif-trigger:hover {
    background: rgba(255, 255, 255, 0.10);
}
.notif-trigger:active {
    transform: translateY(1px);
}
.notif-trigger:focus {
    outline: none;
}
.notif-trigger:focus-visible {
    box-shadow: 0 0 0 3px rgba(143, 255, 0, 0.22);
}
.bell-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.bell-icon i {
    display: block;
    color: var(--primary-green);
    font-size: 1.1rem;
    line-height: 1;
}
.notif-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    background: #ff3b30;
    color: #fff;
    transform: translate(30%, -30%);
    box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.95);
}
.notif-badge.hidden {
    display: none !important;
}
.notif-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(360px, 92vw);
    max-height: 60vh;
    overflow: auto;

    background: rgba(17, 24, 39, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    color: #e5e7eb;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.50);
    z-index: 1000;

    display: none;
}
.notif-dropdown:not(.hidden) {
    display: block;
    transform-origin: top right;
    animation: notifPop 140ms ease-out;
}
@keyframes notifPop {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.notif-dropdown::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 14px;
    width: 12px;
    height: 12px;
    background: rgba(17, 24, 39, 0.92);
    border-left: 1px solid rgba(255, 255, 255, 0.10);
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    transform: rotate(45deg);
}
.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px;

    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
}
.notif-header span {
    min-width: 0;
    flex: 1 1 auto;
}
.notif-header a {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 800;
}
.notif-header a:hover {
    color: var(--primary-green);
}
#mark-all-read-nav {
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 7px 10px;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}
#mark-all-read-nav:hover {
    color: var(--primary-green);
}
#mark-all-read-nav:active {
    transform: translateY(1px);
}
.notif-list {
    list-style: none;
    margin: 0;
    padding: 8px;
}
.notif-list li.notif-item {
    position: relative;
    display: block;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}
.notif-list li.notif-item + li.notif-item {
    margin-top: 8px;
}
.notif-list li.notif-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.10);
}
.notif-list li.notif-item:active {
    transform: translateY(1px);
}
.notif-list li.notif-item.unread {
    color: white;
    background: darkgreen;
}
.notif-list li.notif-item.unread::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 999px;
}
.notif-item-title {
    font-weight: 900;
    font-size: 0.92rem;
    margin: 0 0 4px 0;
    letter-spacing: 0.15px;
    overflow-wrap: anywhere;
}
.notif-item-message {
    font-size: 0.86rem;
    line-height: 1.4;
    color: rgba(229, 231, 235, 0.86);
    overflow-wrap: anywhere;
}
.notif-item-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    margin-top: 10px;
    font-size: 0.74rem;
    color: rgba(229, 231, 235, 0.62);
}
.notif-badge.dot {
    width: 10px;
    min-width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    font-size: 0;
    transform: translate(40%, -40%);
    box-shadow: 0 0 0 2px var(--bg-dark);
}
.notif-dropdown {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
.notif-dropdown::-webkit-scrollbar {
    width: 10px;
}
.notif-dropdown::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: content-box;
}
.notif-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.22);
    border: 2px solid transparent;
    background-clip: content-box;
}
.notif-mark-read{
    margin-top: 0.3rem;
    background: var(--bg-grad);
    color: white;
    border-radius: 12px;
    padding: 0.4rem 0.9rem;
    font-weight: bold;
    cursor: pointer;
    border: 1px solid var(--bg-grad);
}
.notif-mark-read:hover{
    color: var(--primary-green);
    background: var(--bg-grad);
}
@media (max-width: 480px) {
    .notif-trigger {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }

    .notif-dropdown {
        position: fixed;
        top: 64px;
        left: 8px;
        right: 8px;
        width: auto;
        max-height: 65vh;
        z-index: 9999;
    }

    .notif-dropdown::before {
        display: none;
    }

    #mark-all-read-nav {
        padding: 8px 10px;
    }

    .notif-list li.notif-item {
        padding: 12px;
    }
}
@media (max-width: 768px) {
    .notif-dropdown {
        width: min(360px, 92vw);
    }
}

/*=== Notifications Page ===*/
.dashboard.notifications-page {
    width: min(1280px, 100%);
    margin-inline: auto;
    padding: clamp(1rem, 2.5vw, 2rem);
    box-sizing: border-box;
    color: var(--text-white);
}
.dashboard.notifications-page .hidden {
    display: none !important;
}
.notifications-card {
    width: 100%;
    margin: 1.5rem auto 0;
    background: var(--bg-grad);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: var(--shadow-lg);
    border-radius: 18px;
    padding: 1.25rem;
    backdrop-filter: blur(10px);
}
.notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
}
.notifications-title {
    margin: 0;
    font-weight: bold;
    font-size: 1rem;
    color: var(--primary-green);
}
.notifications-title i { margin-right: 8px; }
.notifications-subtitle{
    color: var(--text-gray);
    font-size: 0.8rem;
}
.notifications-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.notif-count {
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.12);
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
}
.btn-secondary {
    border: 0;
    background: rgba(255,255,255,0.10);
    color: var(--bg-dark);
    padding: 0.55rem 0.9rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    min-height: 44px;
}
.btn-secondary:hover { background: rgba(255,255,255,0.16); }
.btn-secondary:focus { outline: none; }
.btn-secondary:focus-visible { box-shadow: 0 0 0 3px rgba(255,255,255,0.25); }
.notifications-filters {
    display: flex;
    gap: 8px;
    padding: 12px 0;
}
.filter-btn {
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: #fff;
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
}
.filter-btn:hover { background: rgba(255,255,255,0.10); }
.filter-btn.active {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 2px rgba(143,255,0,0.15);
}
.notifications-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}
.notification-item {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;

    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
}
.notification-item.unread {
    color: white;
    background: darkgreen;
}
.notification-main { min-width: 0; }
.notification-title-row{
    margin-bottom: 0.4rem;
}
.notification-title {
    font-weight: bold;
    margin-bottom: 0.4rem;
    overflow-wrap: anywhere;
    color: white;
}
.notification-date{
    color: var(--primary-green);
    font-weight: bold;
    margin-left: 0.5rem;
    font-size: 0.8rem;
}
.notification-message{
    color: var(--text-gray);
}
.notification-body {
    color: var(--text-gray);
    font-size: 0.95rem;
    overflow-wrap: anywhere;
}
.notification-meta {
    margin-top: 8px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
}
.notif-mark-one {
    border: 0;
    background: rgba(255,255,255,0.10);
    color: #fff;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    white-space: nowrap;
}
.notif-mark-one:hover { background: rgba(255,255,255,0.16); }
.notifications-empty {
    text-align: center;
    padding: 30px 12px;
    color: rgba(255,255,255,0.75);
}
.notifications-empty i {
    color: var(--primary-green);
    font-size: 1.4rem;
    margin-bottom: 10px;
    display: inline-block;
}
.btn-secondary.btn-mark-read {
    background: var(--bg-dark);
    border: 1px solid var(--bg-dark);
    color: #ffffff;
    border-radius: 12px;
    padding: 0.4rem 0.9rem;
    font-weight: bold;
    cursor: pointer;
}
.btn-secondary.btn-mark-read:hover {
    color: var(--primary-green);
    background: var(--bg-grad);
}
.notif-link,
.notification-main {
    display: block;
    color: inherit;
    text-decoration: none;
}
.notif-link:hover,
.notification-main:hover {
    text-decoration: none;
}
@media (max-width: 768px) {
    .dashboard.notifications-page { padding: 1rem; }
    .notifications-header { flex-direction: column; align-items: stretch; }
    .notifications-header-actions { width: 100%; }
    .btn-secondary { width: 100%; }
    .notifications-filters { flex-wrap: wrap; }
}
@media (max-width: 576px) {
    .notification-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .notification-main {
        width: 100%;
    }

    .notification-title-row {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        align-items: baseline;
    }

    .notification-date {
        margin-left: 0;
    }

    .notif-mark-one {
        width: 100%;
        text-align: center;
    }
}

/*=== Sidebar ===*/
.sidebar {
    position: fixed;
    left: 0;
    top: 4rem;
    bottom: 0;
    width: 5rem;
    height: auto;
    display: flex;
    flex-direction: column;
    transition: width 0.35s ease, transform 0.35s ease;
    z-index: 999;
    overflow: visible;
}
.sidebar::after{
    content:"";
    position:absolute;
    top:0;
    right:0;
    width:1px;
    height:100%;
    background: linear-gradient(
            to bottom,
            rgba(143,255,0,.20),
            rgba(255,255,255,.06),
            rgba(91,154,3,.18)
    );
    opacity: .55;
    pointer-events: none;
}
.sidebar:hover {
    width: 17rem;
}
.sidebar-menu {
    list-style: none;
    background: var(--bg-grad);
    flex: 1;
    margin: 0;
    padding: 2rem 0;
    overflow: visible;
}
.sidebar-menu li {
    margin: 0.4rem 0;
}
.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text-gray);
    background: transparent;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.sidebar-menu a i {
    font-size: 1.4rem;
    color: var(--primary-green);
    min-width: 2rem;
    text-align: center;
    transition: transform 0.25s ease, color 0.25s ease;
}
.sidebar-menu a:hover {
    color: var(--primary-green);
}
.sidebar-menu a:hover i {
    transform: scale(1.1);
    color: var(--primary-green);
}
.sidebar-menu a.active {
    background: var(--primary-green);
    color: white;
    box-shadow: 0 0.3rem 0.5rem rgba(126, 186, 44, 0.3);
}
.sidebar-menu a span,
.sidebar-menu a .fa-chevron-right {
    opacity: 0;
    transform: translateX(-0.4rem);
    transition: opacity .3s ease, transform .3s ease;
}
.sidebar:hover .sidebar-menu a span,
.sidebar:hover .sidebar-menu a .fa-chevron-right {
    opacity: 1;
    transform: translateX(0);
}
.sidebar.open .sidebar-menu a span,
.sidebar.open .sidebar-menu a .fa-chevron-right {
    opacity: 1;
    transform: translateX(0);
}
.sidebar-item-flyout {
    position: relative;
}
.sidebar.hover-open .flyout-menu {
    pointer-events: auto;
}
.flyout-menu {
    position: absolute;
    top: 0;
    left: 100%;
    min-width: 10rem;
    background: var(--bg-grad);
    border-radius: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateX(0.5rem);
    transition: opacity 0.18s ease, transform 0.18s ease;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.25);
    z-index: 2001;
    padding: 0.4rem 0;
}
.flyout-menu a {
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-gray);
}
.flyout-menu a:hover {
    background: var(--hover);
    color: var(--primary-green);
}
.sidebar.hover-open .sidebar-item-flyout .flyout-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateX(0.5rem);
}
.sidebar.hover-open .sidebar-item-flyout:hover > .flyout-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}
@media (max-width: 992px) {
    .sidebar {
        width: 17rem;
        transform: translateX(-17rem);
        z-index: 9999;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        height: calc(100dvh - 4rem);
        bottom: auto;
        overflow: hidden;
    }
    .sidebar.open {
        transform: translateX(0) !important;
    }
    .sidebar-menu{
        height: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    .sidebar-item-flyout:hover .flyout-menu {
        opacity: 0;
        visibility: hidden;
        transform: translateX(0.5rem);
    }
    .sidebar-item-flyout.open .flyout-menu {
        position: relative;
        left: 0;
        top: 0;
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
        margin-left: 2.5rem;
        padding-left: 0.5rem;
        border-left: 2px solid var(--primary-green);
    }
}

/*=== Footer ===*/
.footer {
    background: var(--bg-dark);
    border-top: 1px solid var(--border-color);
    margin-top: 0.2rem;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;

    gap: 2rem;
}
@media (min-width: 768px) {
    .footer-container {
        flex-direction: row;
        justify-content: center;
        text-align: left;
        align-items: flex-start;
    }
    .footer-section {
        flex: 1;
        max-width: 300px;
    }
}
.footer-section h4 {
    color: var(--primary-green);
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}
.footer-section p {
    color: var(--text-gray);
    margin: 0.25rem 0;
    line-height: 1.4;
}
.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-section ul li {
    margin: 0.4rem 0;
}
.footer-section ul li a {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer-section ul li a:hover {
    color: var(--primary-green);
}
.footer-bottom {
    background: var(--bg-dark);
    padding: 1rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
}
.footer-bottom p {
    margin: 0;
    color: var(--text-light-gray);
    font-size: 0.875rem;
}

/*=== Dashboard ===*/
.dashboard-wrapper {
    width: min(clamp(1200px, 80vw, 1400px), 100% - 2rem);
    margin: 2rem auto;
}
.dashboard-header {
    color: white;
    font-weight: bold;
    margin-bottom: 1rem;
    margin-left: 1rem;
    font-size: 1.4rem;
}
.dashboard-header span {
    color: var(--primary-green);
    font-weight: bold;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
    justify-items: center;
}
.stat-card {
    width: 95%;
    min-height: 11vh;
    background: var(--bg-grad);
    border-radius: 12px;
    border: 3px solid var(--primary-green);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
}
.stat-icon {
    font-size: 2rem;
    color: var(--primary-green);
    flex-shrink: 0;
}
.stat-content h3 {
    margin: 0;
    font-size: 1.65rem;
    color: var(--primary-green);
    font-weight: 700;
}
.stat-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--primary-green);
    padding-top: 0.5rem;
}
.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.dashboard-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 2rem auto;
    gap: 4rem;
    width: min(clamp(1200px, 80vw, 1400px), 100% - 2rem);
    justify-content: center;
}
.dashboard-content .dashboard-section {
    grid-column: 1 / -1;
}
.dashboard-section{
    background: var(--bg-grad);
    border-radius: 12px;
    padding: 1.2rem;
    border: 2px solid rgba(255, 255, 255, 0.08);
    transition: border-color 0.3s ease;
    width: 100%;
}
.dashboard-section:hover,
.dashboard-create-section:hover {
    border-color: rgba(255, 255, 255, 0.18);
}
.dashboard-section {
    background: var(--bg-grad);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.08);
    transition: border-color 0.3s;
}
.dashboard-section:hover {
    border-color: var(--primary-green);
}
.dashboard-section.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.dashboard-section h2 {
    margin: 0;
    color: white;
}
.dashboard-create-section {
    padding: 1.5rem;
    width: 100%;
    border: 2px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    background: var(--bg-grad);
    transition: border-color 0.3s ease;
    margin: 1rem 0;
}
.dashboard-create-section:hover {
    border-color: var(--primary-green);
}
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
}
.section-header h2 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--primary-green);
    font-weight: bold;
}
.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.ticket-item, .research-item {
    padding: 1rem;
    background: var(--bg-dark);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
    cursor: pointer;
}
.ticket-item:hover, .research-item:hover {
    background: rgba(255, 255, 255, 0.05);
}
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.2rem;
}
.quick-action {
    background: var(--bg-dark);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 1.4rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    color: var(--text-gray);
    text-decoration: none;
    text-align: center;
    transition: all 0.25s ease;
}
.quick-action i {
    font-size: 1.8rem;
    color: var(--primary-green);
    transition: 0.25s ease;
}
.quick-action span {
    font-size: 0.95rem;
    font-weight: 600;
}
.quick-action:hover {
    background: var(--primary-green);
    border-color: var(--primary-green);
    color: black;
    transform: translateY(-4px);
}
.quick-action:hover i {
    color: black;
    transform: scale(1.15);
}
.invisible {
    display: none !important;
}
.statsBtn-create{
    padding: 0.7rem;
    background-color: var(--primary-green);
    color: white;
    font-weight: bold;
    border-radius: 8px;
    border: 1px solid var(--primary-green);
}
.statsBtn-create:hover{
    opacity: 0.8;
    color: var(--bg-dark);
}
.stats-text{
    margin-bottom: 2rem;
}
@media (max-width: 992px) {
    .dashboard-content {
        grid-template-columns: 1fr;
        justify-items: center;
        max-width: 600px;
    }
    .dashboard-create-section,
    .dashboard-section {
        width: 100%;
        max-width: 600px;
        margin-top: 1rem;
    }
}
@media (max-width: 600px) {
    .dashboard-content {
        padding: 0 1rem;
        width: 100%;
        max-width: 100%;
        margin: 1rem auto;
        gap: 1rem;
        box-sizing: border-box;
    }
    .stats-grid {
        grid-template-columns: 1fr;
        justify-items: center;
    }
    .stat-card {
        width: 100%;
        max-width: none;
        margin: 0 auto;
    }
    .stat-icon {
        font-size: 1.4rem;
    }
    .stat-content h3 {
        font-size: 1.25rem;
    }
    .dashboard-section,
    .dashboard-create-section {
        padding: 1rem;
        margin-top: 1rem;
    }
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .quick-action {
        padding: 1rem 0.6rem;
        border-radius: 10px;
    }
    .quick-action i {
        font-size: 1.4rem;
    }
    .quick-action span {
        font-size: 0.85rem;
    }
    .section-header {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    .ticket-item, .research-item {
        flex-direction: column;
        align-items: center;
        text-align: left;
        padding: 0.9rem;
        gap: 0.5rem;
    }
    .statsBtn-create{
        width: 100%;
        display: block;
        padding: 0.9rem 1rem;
        border-radius: 10px;
        font-size: 1rem;
        text-align: center;
    }
    .stats-text{
        margin-bottom: 1rem;
    }
}

/*=== Mention Wrap ===*/
.mention-wrap {
    position: relative;
    flex: 1 1 320px;
    min-width: 0;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
}
.message-preview {
    position: absolute;
    inset: 0;
    padding: .7rem;
    border-radius: 8px;
    pointer-events: none;
    white-space: pre-wrap;
    overflow: hidden;
    font: inherit;
    line-height: normal;
    color: var(--text-white);
    z-index: 1;
    width: 100%;
    min-width: 0;
}
.chat-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
}
.chat-input-overlay {
    position: relative;
    z-index: 2;
    background: transparent;
    border: none;
    color: transparent;
    caret-color: var(--text-white);
    outline: none;
    width: 100%;
    min-width: 0;
}
.mention-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    z-index: 2000;
    max-height: 240px;
    overflow: auto;
    background: var(--bg-grad);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.35);
    padding: 8px;
    backdrop-filter: blur(6px);
}
.mention-dropdown::-webkit-scrollbar { width: 8px; }
.mention-dropdown::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.18);
    border-radius: 10px;
}
.mention-item {
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--text-white);
    border: 1px solid transparent;
}
.mention-item:hover,
.mention-item.is-active {
    background: #fff;
    border-color: rgba(255,255,255,0.12);
}
.mention-item strong {
    font-weight: 700;
    font-size: 14px;
    line-height: 1.2;
    color: var(--text-white);
}
.mention-item small {
    font-size: 12px;
    opacity: 0.78;
    color: rgba(255,255,255,0.78);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mention-item:hover strong,
.mention-item.is-active strong { color: #111; }
.mention-item:hover small,
.mention-item.is-active small { color: rgba(0,0,0,0.65); }
.mention-pill{
  display: inline;
  padding: 0;
  border: 0;
  border-radius: .4em;
  font-weight: 700;
}
.message-preview .mention-pill,
.message-text .mention-pill {
    color: #3b82f6;
    background: rgba(59,130,246,0.16);
    border: 1px solid rgba(59,130,246,0.28);
}
.mention {
    color: #0d6efd;
    font-weight: 600;
    background: rgba(13,110,253,0.08);
    padding: 1px 4px;
    border-radius: 4px;
}
@media (max-width: 768px) {
    .mention-dropdown {
        max-height: 200px;
        top: calc(100% + 6px);
    }
    .mention-item { padding: 9px; }
    .mention-item strong { font-size: 13px; }
    .mention-item small { font-size: 11px; }
}
@media (max-width: 480px) {
    .mention-dropdown {
        max-height: 180px;
        border-radius: 10px;
    }
}

/*=== Create Product ===*/
.create-product-page {
    max-width: 700px;
    margin:3rem auto;
    background: var(--bg-dark);
    padding: 35px;
    border-radius: 12px;
    color: var(--text-white);
    border: 1px solid rgba(255,255,255,0.1);
}
.create-product-page h1 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-green);
}
.create-product-page h1 i {
    color: var(--primary-green);
    font-size: 1.7rem;
}
fieldset {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px 25px;
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.04);
    transition: var(--transition);
}
fieldset:hover {
    border-color: var(--secondary-green);
    box-shadow: var(--shadow);
}
legend {
    font-weight: bold;
    color: var(--secondary-green);
    padding: 0 8px;
}
label {
    display: block;
    margin-top: 15px;
    color: var(--text-gray);
    font-size: 0.95rem;
}
input,
textarea {
    width: 100%;
    padding: 10px 12px;
    margin-top: 6px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #0f1624;
    color: var(--text-white);
    font-size: 1rem;
    transition: var(--transition);
}
input:focus,
textarea:focus {
    border-color: var(--secondary-green);
    outline: none;
    box-shadow: 0 0 8px rgba(165, 227, 81, 0.4);
}
fieldset label input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
    accent-color: var(--primary-green);
}
.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
}
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.7rem 1.3rem;
    border-radius: 10px;
    font-weight: bold;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
}
.btn-secondary {
    background: var(--hover);
    color: var(--text-white);
}
.btn-secondary:hover {
    background: var(--border-color);
}
.btn-primary i,
.btn-secondary i {
    font-size: 1rem;
}
@media (max-width: 768px) {
    .create-product-page {
        margin: 20px 16px;
        padding: 20px;
    }

    .create-product-page h1 {
        font-size: 1.5rem;
    }

    fieldset {
        padding: 16px 18px;
    }

    .form-actions {
        gap: 12px;
    }
}
@media (max-width: 480px) {
    .create-product-page {
        margin: 16px 10px;
        padding: 18px;
        border-radius: 10px;
    }

    .create-product-page h1 {
        font-size: 1.3rem;
        flex-direction: row;
        align-items: flex-start;
        gap: 6px;
    }

    .create-product-page h1 i {
        font-size: 1.4rem;
        margin-top: 2px;
    }

    fieldset {
        padding: 14px 14px;
        margin-bottom: 18px;
    }

    label {
        font-size: 0.9rem;
    }

    input,
    textarea {
        font-size: 0.95rem;
        padding: 8px 10px;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 10px;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/*=== Impressum & Datenschutzerklärung ===*/
.legal-section,
.legal-section * {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
.legal-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    color: var(--text-white);
}
.legal-header {
    text-align: left;
    margin-bottom: 2rem;
}
.legal-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-green);
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
    position: relative;
    display: inline-block;
}
.legal-header h1::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 55%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-green), #a4ff5a);
    border-radius: 2px;
}
.legal-header p {
    font-size: 1.05rem;
    color: var(--text-gray);
}
.legal-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.legal-section {
    background: var(--bg-grad);
    padding: 1.75rem 2rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}
.legal-section:hover {
    transform: translateY(-3px);
    border-color: rgba(126, 255, 90, 0.25);
    box-shadow: 0 0 20px rgba(126, 255, 90, 0.15);
}
.legal-section h2 {
    color: var(--primary-green);
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
    font-weight: 700;
    position: relative;
}
.legal-section h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 35%;
    height: 2px;
    background: var(--primary-green);
}
.legal-section h3 {
    color: var(--text-white);
    margin-bottom: 0.5rem;
}
.legal-section p,
.legal-section span {
    font-size: 1rem;
    color: var(--text-gray);
}
.legal-section strong {
    color: var(--primary-green);
    font-weight: 600;
}
.legal-section a {
    font-weight: 600;
    color: var(--primary-green);
    word-break: break-all;
    transition: 0.25s;
}
.legal-section a:hover {
    color: #a4ff5a;
}
.legal-section h4 {
    color: var(--text-white);
    font-size: 1.15rem;
    margin-bottom: .6rem;
    font-weight: 600;
}
.legal-section ul {
    margin-left: 1.2rem;
    margin-bottom: 1rem;
    list-style: disc;
}
.legal-section li {
    margin-bottom: 0.5rem;
    line-height: 1.4;
    color: var(--text-gray);
}
.contact-box {
    background: rgba(17, 25, 40, 0.6);
    padding: 1rem 1.2rem;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    margin-top: 1rem;
    line-height: 1.5;
    color: var(--text-white);
}
.company-info {
    background: var(--bg-grad);
    padding: 1.4rem 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    width: 100%;
    box-sizing: border-box;
}
.info-item {
    width: 100%;
    overflow-wrap: anywhere;
}
.company-info h3 {
    color: var(--primary-green);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}
.company-address p {
    color: var(--text-white);
    margin-bottom: 1rem;
}
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}
.info-item span {
    font-size: 0.8rem;
    color: var(--text-light-gray);
}
.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 1rem 0;
}
.contact-item i {
    color: var(--primary-green);
    font-size: 1.2rem;
}
.contact-item a {
    color: var(--text-white);
    text-decoration: none;
    transition: 0.25s;
}
.contact-item a:hover {
    color: var(--primary-green);
}
.contact-item div {
    overflow-wrap: anywhere;
    max-width: 100%;
}
.legal-lawNum{
    color:var(--primary-green);
    font-weight: bold;
}
@media (max-width: 768px) {
    .legal-page {
        padding: 1.5rem 1rem;
    }

    .legal-header {
        text-align: center;
        margin-bottom: 1.5rem;
        padding: 0 1rem;
    }

    .legal-header h1 {
        font-size: 1.6rem;
    }

    .legal-section {
        padding: 1.2rem;
    }

    .company-info {
        padding: 1rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .legal-section h2 {
        font-size: 1.25rem;
    }

    .legal-section p,
    .legal-section span,
    .info-item span,
    .company-address p {
        font-size: 0.95rem;
    }
}
@media (max-width: 480px) {
    .legal-header h1 {
        font-size: 1.4rem;
    }
    .legal-section {
        padding: 1rem 0.9rem;
    }
    .legal-section h2 {
        font-size: 1rem;
    }
    .company-info h3 {
        font-size: 1rem;
    }
    .legal-section p,
    .company-address p,
    .info-item span {
        font-size: 0.88rem;
    }
}

/* Buttons */
.btn {
    border: none;
    border-radius: 8px;
    padding: 0.9rem 1.2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}
.btn-primary {
    background: var(--primary-green);
    color: var(--text-white);
}
.btn-primary:hover {
    background: var(--primary-green);
    color: var(--bg-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.btn-secondary {
    background: var(--bg-dark);
    color: var(--text-white);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background: var(--hover);
    color: var(--primary-green);
}
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}
.btn.full-width {
    width: 100%;
    justify-content: center;
}
.btn.btn-md {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn.btn-md i {
    font-size: 1rem;
    line-height: 1;
}
.btn-next,
.btn-prev,
.btn-submit {
    border-radius: 10px;
    padding: 0.8rem 1.6rem;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.019rem;
    cursor: pointer;
    transition: all 0.25s ease;
}
.btn-next,
.btn-submit {
    background: linear-gradient(135deg, var(--primary-green), #a8e03e);
    color: #000;
    box-shadow: 0 4px 10px rgba(126, 186, 44, .3);
}
.btn-next:hover,
.btn-submit:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #a8e03e, var(--primary-green));
    box-shadow: 0 6px 16px rgba(126, 186, 44, .45);
}
.btn-prev {
    background: transparent;
    border: 0.094rem solid var(--primary-green);
    color: var(--primary-green);
}
.btn-prev:hover {
    background: var(--primary-green);
    color: #000;
    box-shadow: 0 4px 10px rgba(126, 186, 44, 0.3);
}

/*=== Captcha ===*/
.cap-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    z-index: 9999;
}
.cap-overlay.is-open {
    display: flex;
}
.cap-modal {
    width: 460px;
    max-width: 92vw;
    border-radius: 14px;
    padding: 16px;
    background: var(--bg-grad);
    color: white;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}
.cap-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.cap-title {
    font-weight: bold;
    font-size: 14px;
    color: var(--primary-green);
    opacity: 0.95;
}
.cap-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.10);
    background: red;
    color: white;
    cursor: pointer;
}
.cap-close:hover {
    color: var(--bg-dark);
}
.cap-prompt {
    font-weight: 600;
    margin: 8px 0 12px;
    color: rgba(243,244,246,0.92);
}
.cap-image-wrap {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.03);
}
.cap-image {
    display: block;
    width: 100%;
    height: auto;
}
.cap-actions {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.cap-btn {
    flex: 1 1 140px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: var(--primary-green);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
    margin-top: 0.2rem;
}
.cap-btn:hover {
    color: var(--primary-green);
    background-color: var(--bg-grad);
    border: 1px solid var(--primary-green);
    transform: translateY(-1px);
}
.cap-btn:active {
    transform: translateY(0);
}
.cap-btn:focus-visible,
.cap-close:focus-visible {
    outline: 2px solid rgba(99, 102, 241, 0.9);
    outline-offset: 2px;
}
.cap-error {
    margin-top: 10px;
    color: #fca5a5;
    font-weight: 600;
    min-height: 20px;
}

/*=== Article (JTL) ===*/
.products-page-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 1rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid color-mix(in srgb, var(--border-color) 55%, transparent);
    flex-wrap: wrap;
    row-gap: 0.75rem;
}
.products-page-header h1 {
    margin: 0;
    line-height: 1.1;
    font-weight: bold;
    font-size: 1.6rem;
    flex: 1 1 220px;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.search-bar {
    display: flex;
    gap: 0.5rem;
    padding: 0.4rem;
    flex: 1 1 420px;
    min-width: 260px;
    align-items: center;
    border-radius: 14px;
    background: color-mix(in srgb, var(--bg-dark) 75%, #0b1220);
    border: 1px solid color-mix(in srgb, var(--border-color) 60%, transparent);
    box-shadow: var(--shadow);
}
.search-bar input {
    width: auto;
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--border-color) 55%, transparent);
    background: color-mix(in srgb, var(--bg-dark) 85%, #0b1220);
    color: var(--text-white);
    outline: none;
    transition: var(--transition);
}
.search-bar input::placeholder {
    color: color-mix(in srgb, var(--text-light-gray) 90%, transparent);
}
.search-bar input:focus {
    border-color: color-mix(in srgb, var(--primary-green) 75%, var(--border-color));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-green) 22%, transparent);
}
.search-bar label{
    display: contents;
}
.search-bar button {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 0.95rem;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    color: #081107;
    background: var(--primary-green);
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.search-bar button:hover {
    box-shadow: var(--shadow-lg);
    color: var(--primary-green);
    background-color: var(--bg-dark);
    border: 1px solid var(--primary-green);
}
.btn-create {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    font-weight: 700;
    color: var(--primary-green);
    border: 1px solid color-mix(in srgb, var(--primary-green) 55%, var(--border-color));
    background: color-mix(in srgb, var(--bg-dark) 75%, #0b1220);
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.btn-create:hover {
    background: var(--primary-green);
    color: var(--bg-dark);
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}
.products-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1rem 2rem;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
}
.product-card {
    grid-column: span 4;
    padding: 1rem;
    border-radius: 18px;
    background: var(--bg-grad);
    border: 1px solid color-mix(in srgb, var(--border-color) 55%, transparent);
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.product-card:hover {
    background: color-mix(in srgb, var(--hover) 65%, var(--bg-dark));
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.product-card h2 {
    margin: 0 0 0.75rem 0;
    font-size: 1.05rem;
    line-height: 1.25;
    color: var(--primary-green);
}
.product-details {
    display: grid;
    gap: 0.55rem;
    padding-top: 0.75rem;
    border-top: 1px solid color-mix(in srgb, var(--border-color) 50%, transparent);
    color: var(--text-gray);
    font-size: 0.95rem;
}
.product-details strong {
    color: var(--text-white);
    font-weight: 600;
}
.empty-state {
    grid-column: 1 / -1;
    padding: 2.25rem 1.5rem;
    border-radius: 18px;
    background: color-mix(in srgb, var(--bg-dark) 72%, #0b1220);
    border: 1px dashed color-mix(in srgb, var(--border-color) 65%, transparent);
    box-shadow: var(--shadow);
    text-align: center;
}
.empty-state i {
    font-size: 2.25rem;
    color: color-mix(in srgb, var(--primary-green) 80%, #ffffff);
    margin-bottom: 0.75rem;
}
.empty-state h3 {
    margin: 0;
    color: var(--text-white);
    font-weight: 700;
}
@media (max-width: 1100px) {
    .product-card { grid-column: span 6; }
}
@media (max-width: 820px) {
    .products-page-header {
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .btn-create {
        flex: 0 0 auto;
    }

    .product-card { grid-column: span 12; }
}
@media (max-width: 480px) {
    .search-bar {
        flex: 1 1 100%;
        min-width: 0;
        padding: 0.5rem;
    }
    .search-bar button,
    .btn-create {
        width: 100%;
        justify-content: center;
    }
    .search-bar {
        flex-direction: column;
        align-items: stretch;
    }
}

/*=== Errors pages ===*/
.error-page{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem 1rem;
    margin-right: 5rem;
}

.cap-prompt {
  white-space: pre-line;
}

.error-content{
    width: min(720px, 100%);
    text-align: center;
    padding: clamp(1.5rem, 4vw, 3rem);
    border-radius: 18px;
    backdrop-filter: blur(10px);
}
.error-content h1 {
    margin: 0;
    font-size: clamp(4rem, 10vw, 7.5rem);
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--primary-green);
}
.error-content p {
    margin: 0.75rem auto 1.75rem;
    max-width: 52ch;
    font-size: clamp(1rem, 2.2vw, 1.15rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.78);
}
.errorPage-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
    background-color: var(--primary-green);
    color: white;
}
.errorPage-btn:hover{
    color: var(--bg-dark)
}

/*=== Workspaces pages ===*/
.workspace-page-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 2rem 1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1rem;
}
.workspace-page-header h1{
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-green);
    display: flex;
    align-items: center;
    gap: .6rem;
}

.workspace-card-grid{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(12px, 2vw, 18px);
}
.workspace-card{
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    overflow: hidden;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
    padding: 1rem;
    margin: 1rem 2rem;
    display: flex;
    flex-direction: column;
}
.workspace-card:hover{
    transform: translateY(-2px);
    border-color: rgba(143,255,0,0.45);
    box-shadow: 0 14px 44px rgba(91,154,3,0.18);
}

.workspace-card-body{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.workspace-card-body h3{
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    font-weight: 750;
    color: var(--text-white);
    overflow-wrap: anywhere;
}
.workspace-card-actions{
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.workspace-card > form{
    margin-top: auto;
}
.workspace-form-row{
    display: flex;
    gap: 12px;
    align-items: center;
}
.workspace-form-row .workspace-form-input{
    flex: 1;
    margin: 0;
}
.workspace-form-row .btn-create-workspace{
    margin-left: auto;
}

.btn-create-workspace{
    display: inline-flex;
    align-items: flex-end;
    cursor: pointer;
    gap: 0.6rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-green);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    white-space: nowrap;
    transition: background .3s ease, color .3s ease, transform .3s ease, box-shadow .3s ease, border-color .3s ease;
    border: 1px solid transparent;
}
.btn-create-workspace:hover{
    background: var(--bg-dark);
    color: var(--primary-green);
    border-color: var(--primary-green);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}
.btn-create-workspace i{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: transform .3s ease;
    transform-origin: 50% 50%;
    will-change: transform;
}

.workspace-card-actions .btn-edit-workspace,
.btn-delete-workspace,
.btn-open-workspace{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1;
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.btn-open-workspace:hover,
.btn-edit-workspace:hover,
.btn-delete-workspace:hover{
    color: white;
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.btn-open-workspace{
    background-color: #2a7704;
    color: white;
}
.btn-edit-workspace{
    background: #ea860d;
    color: var(--text-white);
}
.btn-delete-workspace{
    border: 1px solid rgba(255,90,90,0.40);
    background: rgba(255,90,90,0.12);
    color: var(--text-white, #fff);
    padding-inline: 0.85rem;
}
.workspace-muted{
    color: var(--text-gray, rgba(255,255,255,0.65));
    margin-top: 1rem;
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.workspace-form-card{
    width: min(720px, calc(100% - 4rem));
    margin: 2rem auto 0;
    padding: 1.25rem 1.25rem 1.15rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    box-shadow: 0 10px 34px rgba(0,0,0,0.28);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-sizing: border-box;
}
.workspace-form-group{
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin: 0 0 1rem 0;
}
.workspace-form-group label{
    color: var(--text-gray);
    font-weight: 650;
}
.workspace-form-group .text-danger{
    color: #ff5a5a;
}
.workspace-form-input{
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.12);
    padding: 0.9rem 1rem;
    border-radius: 12px;
    color: var(--text-white);
    outline: none;
    min-height: 46px;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
    box-sizing: border-box;
    margin: 1rem 0;
}
.workspace-form-input::placeholder{
    color: rgba(255,255,255,0.45);
}
.workspace-form-input:focus{
    border-color: rgba(143,255,0,0.78);
    box-shadow: 0 0 0 4px rgba(143,255,0,0.12);
    background: rgba(255,255,255,0.06);
}

.workspace-form-actions{
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-cancel-workspace,
.btn-save-workspace{
    flex: 1;
    max-width: 220px;
    width: 100%;
    display: inline-flex;
    justify-content: center;
    align-content: center;
    font-size: 0.9rem;
    border: 0;
    gap: 8px;
    line-height: 1;
    border-radius: 8px;
    padding: 0.8rem 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform var(--transition), filter var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition);
    min-height: 44px;
}

.btn-cancel-workspace:hover,
.btn-save-workspace:hover{
    filter: brightness(1.08);
    transform: translateY(-1px);
    color: var(--text-white);
}

.btn-save-workspace{
    background-color: #2a7704;
    color: white;
}
.btn-cancel-workspace{
    background: #c80c00;
    color: white;
}

@media (max-width: 768px){
    .error-page{
        margin-right: 0;
        padding: 1.5rem 1rem;
    }
    .errorPage-btn{
        width: 100%;
        max-width: 420px;
    }

    .workspace-page-header{
        margin: 1rem;
        align-items: flex-start;
        justify-content: center;
    }
    .workspace-page-header h1{
        font-size: 1.4rem;
    }

    .workspace-card-grid{
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding-inline: 1rem;
    }
    .workspace-card{
        margin: 1rem;
        padding: 0.5rem;
    }

    .workspace-form-card{
        width: calc(100% - 2rem);
        margin: 1.5rem auto 0;
    }
    .workspace-form-actions{
        flex-direction: column;
    }
    .btn-cancel-workspace,
    .btn-save-workspace{
        max-width: none;
        width: 100%;
    }
}
@media (max-width: 480px){
    .workspace-card-grid{
        grid-template-columns: 1fr;
    }

    .workspace-form-row{
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .workspace-form-row .btn-create-workspace{
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }

    .workspace-card-actions{
        flex-direction: column;
        align-items: stretch;
    }
    .workspace-card-actions .btn-edit-workspace,
    .btn-delete-workspace,
    .btn-open-workspace{
        width: 100%;
    }
}

/*=== Research page ===*/
.research-card{
    max-width: 64rem;
    margin: 1.25rem auto;
    padding: 1.25rem;
    background: linear-gradient(180deg, var(--card-surface), rgba(255,255,255,.02));
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition);
}
.research-card:hover{
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--card-border-hover);
}
.research-card__header{
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
.research-card__left{
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.research-card__title{
    margin: 0;
    font-size: 1.35rem;
    color: var(--primary-green);
    font-weight: bold;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.research-card__meta{
    margin: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    justify-content: flex-end;
}
.research-card__dates{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: .65rem;
}
.research-card__dates .date-row{
    display: grid;
    gap: .15rem;
    padding: .65rem .8rem;
    border-radius: 12px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    text-align: left;
}
.research-card__dates .date-label{
    font-size: .7rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-light-gray);
}
.research-card__dates .date-main{
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--primary-green);
    line-height: 1.2;
}
.research-card__dates .date-sub{
    font-size: .82rem;
    color: var(--text-gray);
    opacity: .9;
}
.rch-header h1{
    margin: 0;
    display: flex;
    align-items: center;
    gap: .6rem;
    color: var(--primary-green);
    font-weight: 800;
    font-size: clamp(1.2rem, 2.2vw, 1.85rem);
    line-height: 1.15;
    overflow-wrap: anywhere;
}
.rch-header{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding-bottom: .9rem;
    margin-bottom: 1rem;
    margin-top: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.pill{
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .6rem;
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.10);
    color: var(--text-gray);
    white-space: nowrap;
    font-weight: bold;
}
.pill--status{
    color: #4caf50;
}
.research-hero{
    margin-top: 1rem;
    overflow: hidden;
    border-radius: calc(var(--card-radius) - 2px);
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: var(--shadow);
}
.research-hero img{
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
    transform: scale(1.01);
}
.research-section{
    margin-top: 1.15rem;
}
.section-title{
    margin: 0 0 .75rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--primary-green);
}
.attachments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
}
.attachment-tile{
    position: relative;
    display: block;
    border-radius: calc(var(--card-radius) - 2px);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.10);
    background: linear-gradient(180deg, var(--card-surface-2), rgba(255,255,255,.02));
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: var(--transition);
}
.attachment-tile:hover{
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255,255,255,.18);
}
.attachment-tile--image img{
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
    transition: transform .25s ease;
}
.attachment-tile--image:hover img{
    transform: scale(1.05);
}
.attachment-tile__overlay{
    position: absolute;
    inset: auto 0 0 0;
    padding: .6rem .75rem;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,.65));
}
.attachment-tile__name{
    display: block;
    font-size: .85rem;
    color: var(--text-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.attachment-tile--file{
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: center;
    gap: .65rem;
    padding: .85rem;
}
.file-icon{
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.10);
}
.file-name{
    font-weight: 700;
    font-size: .92rem;
    color: var(--text-white);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.file-sub{
    margin-top: .2rem;
    font-size: .8rem;
    color: var(--text-light-gray);
}
.research-content .kv{
    padding: .9rem;
    border-radius: calc(var(--card-radius) - 2px);
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    margin-bottom: .75rem;
}
.kv__k{
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-light-gray);
    margin-bottom: .35rem;
}
.kv__v{
    color: var(--text-gray);
    line-height: 1.55;
    font-size: .95rem;
    white-space: pre-wrap;
}
.ticket-id,
.ticket-status,
.ticket-priority {
    padding: .45rem .6rem;
    border-radius: .55rem;
    font-size: .85rem;
    text-align: center;
    background: rgba(255,255,255,0.06);
    transition: .2s;
    font-weight: bold;
}
.ticket-id:hover,
.ticket-status:hover,
.ticket-priority:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.status-open {
    color: #4caf50;
}
.status-in_progress {
    color: #ff9800;
}
.status-close {
    color: #f44336;
}
@media (max-width: 900px){
    .research-card__dates{
        grid-template-columns: 1fr;
    }
}
@media (max-width: 640px){
    .research-card{
        padding: 1rem;
    }

    .research-card__header{
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }
    .research-card__dates{
        width: 100%;
        order: 1;
        grid-template-columns: 1fr;
    }

    .research-card__dates .date-row{
        text-align: center;
    }
    .research-card__left{
        order: 2;
        width: 100%;
        flex-direction: column;
        align-items: center;
        padding-bottom: 0;
        border-bottom: none;
        gap: 1rem;
    }

    .research-card__title{
        text-align: center;
    }
    .research-card__meta{
        justify-content: center;
    }

    .research-hero img{
        height: 220px;
    }

    .attachments-grid{
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}
