/* =====================================================
   RUSIK WORK MASTER — Shared Global CSS
   Единый источник стилей для всех страниц платформы.
   Содержит: переменные, шапку, лого-анимацию, user-pill.
   ===================================================== */

/* -- CSS Variables -- */
:root {
    --primary:      #059669;
    --primary-l:    #10b981;
    --primary-grad: linear-gradient(135deg, #059669, #10b981);
    --dark:         #1a1a2e;
    --bg:           #f5f5f5;
    --border:       #e5e7eb;
}

/* -- Header Accent Bar -- */
.header-accent,
.accent-bar {
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-l), #34d399);
    flex-shrink: 0;
}

/* -- Header -- */
.header {
    background: var(--dark);
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 14px rgba(0, 0, 0, .35);
    flex-shrink: 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 12px;
}

/* -- Header Left & Right -- */
.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex-shrink: 1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* -- Logo Text (fallback) -- */
.logo-text {
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1px;
    text-decoration: none;
    flex-shrink: 0;
}

/* -- Logo Image Animation (паттерн из DIKARSHINA, зелёная гамма) -- */
.logo-ink {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    cursor: pointer;
    text-decoration: none;
    overflow: hidden;
    max-height: 46px;
}
.logo-ink img {
    display: block;
    height: 56px;
    width: auto;
    margin-top: -3px;
    position: relative;
    z-index: 1;
}
.logo-ink::after {
    content: "";
    position: absolute;
    left: 0; top: -3px; right: 0;
    height: 56px;
    z-index: 2;
    background: linear-gradient(90deg,
        transparent 0%, transparent 40%,
        rgba(16, 185, 129, .9) 50%,
        transparent 60%, transparent 100%);
    background-size: 300% 100%;
    background-position: 100% 0;
    opacity: 0;
    will-change: background-position;
    -webkit-mask-image: url("/shared/logo.png");
    mask-image: url("/shared/logo.png");
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    -webkit-mask-position: center; mask-position: center;
    -webkit-mask-size: contain; mask-size: contain;
    mix-blend-mode: screen;
    transition: opacity .12s ease;
}
.logo-ink.sweep::after {
    opacity: 1;
    animation: logo-sweep 1.4s ease-out;
}
@keyframes logo-sweep {
    from { background-position: 100% 0; }
    to   { background-position: -50% 0; }
}
@media (prefers-reduced-motion: reduce) {
    .logo-ink.sweep::after { animation: none; opacity: 0; }
}

/* -- Page title after logo -- */
.header-title {
    color: rgba(255, 255, 255, .42);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .10em;
    white-space: nowrap;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, .12);
    margin-left: 4px;
}

/* -- Navigation links -- */
.header-nav {
    display: flex;
    align-items: center;
    gap: 2px;
}

.header-nav a {
    color: rgba(255, 255, 255, .52);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 11px;
    border-radius: 6px;
    transition: color .16s, background .16s;
    white-space: nowrap;
    letter-spacing: .01em;
}

.header-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

.header-nav a.active {
    color: #fff;
    background: rgba(255, 255, 255, .10);
}

/* -- Admin badge -- */
.admin-badge {
    background: rgba(5, 150, 105, .28);
    color: #6ee7b7;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    flex-shrink: 0;
}

/* -- Login button (shown when not logged in) -- */
.btn-login {
    background: var(--primary-grad);
    color: #fff;
    text-decoration: none;
    padding: 7px 18px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    transition: filter .16s, transform .16s;
    white-space: nowrap;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.btn-login:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
}

/* -- Logout button -- */
.btn-logout {
    background: transparent;
    color: rgba(255, 255, 255, .52);
    border: 1px solid rgba(255, 255, 255, .16);
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all .16s;
    white-space: nowrap;
    font-family: inherit;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
    border-color: rgba(255, 255, 255, .32);
}

/* -- Notification Bell -- */
.notif-bell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .16);
    color: rgba(255, 255, 255, .55);
    transition: background .16s, color .16s, border-color .16s;
    flex-shrink: 0;
}

.notif-bell:hover {
    background: rgba(255, 255, 255, .10);
    color: #fff;
    border-color: rgba(255, 255, 255, .36);
}

.notif-bell svg {
    width: 16px;
    height: 16px;
    pointer-events: none;
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 17px;
    height: 17px;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
    border: 2px solid var(--dark);
    pointer-events: none;
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 340px;
    max-height: 420px;
    background: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .55);
    z-index: 999;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.notif-dropdown-head {
    padding: 12px 16px 10px;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, .42);
    text-transform: uppercase;
    letter-spacing: .08em;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    flex-shrink: 0;
}

.notif-list {
    overflow-y: auto;
    flex: 1;
}

.notif-item {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    transition: background .12s;
}

.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: rgba(255, 255, 255, .04); }

.notif-dot {
    width: 8px;
    min-width: 8px;
    height: 8px;
    min-height: 8px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}

.notif-dot.info    { background: #3b82f6; }
.notif-dot.warning { background: #f59e0b; }
.notif-dot.success { background: #22c55e; }

.notif-item-body { flex: 1; min-width: 0; }

.notif-item-title {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 2px;
}

.notif-item-text {
    font-size: 12px;
    color: rgba(255, 255, 255, .52);
    line-height: 1.4;
    margin-bottom: 4px;
}

.notif-item-date {
    font-size: 10px;
    color: rgba(255, 255, 255, .28);
}

.notif-empty {
    padding: 24px 16px;
    text-align: center;
    color: rgba(255, 255, 255, .28);
    font-size: 13px;
}

/* -- Password Toggle -- */
.pwd-wrap {
    position: relative;
}

.pwd-wrap .form-input {
    padding-right: 42px;
    margin-bottom: 0 !important;
}

.pwd-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    transition: color .16s;
}

.pwd-toggle:hover {
    color: #6b7280;
}

.pwd-toggle svg {
    width: 18px;
    height: 18px;
    pointer-events: none;
}

/* -- Responsive -- */
@media (max-width: 600px) {
    .header-title { display: none; }
    .header-nav a { padding: 6px 8px; font-size: 12px; }
    .btn-login, .btn-logout { padding: 6px 12px; font-size: 12px; }
}
