/* Портал АРМИКОН — модульные стили v2.0 (визуальное обновление) */
:root {
    --au-module: #e85d75;
}

/* === ГРАДИЕНТНАЯ ПОЛОСА СВЕРХУ === */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #e85d75, #ff8c00, #3b82f6, #22c55e, #a855f7, #e85d75);
    background-size: 200% 100%;
    animation: gradient-slide 8s linear infinite;
    z-index: 9999;
}

@keyframes gradient-slide {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* === ЛОГИН === */
.password-wrap {
    position: relative;
    width: 100%;
}
.password-wrap input {
    padding-right: 48px;
}
.eye-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 20px;
    opacity: 0.4;
    transition: opacity 0.2s;
    user-select: none;
    margin-bottom: 16px;
}
.eye-toggle:hover { opacity: 0.8; }

/* === КАРТОЧКИ МОДУЛЕЙ (переопределяем au-card для портала) === */
.portal-grid .au-card {
    position: relative;
    overflow: hidden;
    border-left: 3px solid transparent;
    padding: 28px 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.portal-grid .au-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    border-radius: inherit;
}

.portal-grid .au-card:hover::before {
    opacity: 1;
}

.portal-grid .au-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}

/* Цветовые акценты по модулям */
.portal-grid .au-card[data-module="hr"] { border-left-color: #e85d75; }
.portal-grid .au-card[data-module="hr"]::before { background: radial-gradient(ellipse at top left, rgba(232,93,117,0.08), transparent 70%); }
.portal-grid .au-card[data-module="hr"] .module-icon-wrap { background: rgba(232,93,117,0.12); color: #e85d75; }

.portal-grid .au-card[data-module="crm"] { border-left-color: #3b82f6; }
.portal-grid .au-card[data-module="crm"]::before { background: radial-gradient(ellipse at top left, rgba(59,130,246,0.08), transparent 70%); }
.portal-grid .au-card[data-module="crm"] .module-icon-wrap { background: rgba(59,130,246,0.12); color: #3b82f6; }

.portal-grid .au-card[data-module="production"] { border-left-color: #f59e0b; }
.portal-grid .au-card[data-module="production"]::before { background: radial-gradient(ellipse at top left, rgba(245,158,11,0.08), transparent 70%); }
.portal-grid .au-card[data-module="production"] .module-icon-wrap { background: rgba(245,158,11,0.12); color: #f59e0b; }

.portal-grid .au-card[data-module="warehouse"] { border-left-color: #8b5cf6; }
.portal-grid .au-card[data-module="warehouse"]::before { background: radial-gradient(ellipse at top left, rgba(139,92,246,0.08), transparent 70%); }
.portal-grid .au-card[data-module="warehouse"] .module-icon-wrap { background: rgba(139,92,246,0.12); color: #8b5cf6; }

.portal-grid .au-card[data-module="finance"] { border-left-color: #22c55e; }
.portal-grid .au-card[data-module="finance"]::before { background: radial-gradient(ellipse at top left, rgba(34,197,94,0.08), transparent 70%); }
.portal-grid .au-card[data-module="finance"] .module-icon-wrap { background: rgba(34,197,94,0.12); color: #22c55e; }

.portal-grid .au-card[data-module="security"] { border-left-color: #ef4444; }
.portal-grid .au-card[data-module="security"]::before { background: radial-gradient(ellipse at top left, rgba(239,68,68,0.08), transparent 70%); }
.portal-grid .au-card[data-module="security"] .module-icon-wrap { background: rgba(239,68,68,0.12); color: #ef4444; }

.portal-grid .au-card[data-module="sales"] { border-left-color: #14b8a6; }
.portal-grid .au-card[data-module="sales"]::before { background: radial-gradient(ellipse at top left, rgba(20,184,166,0.08), transparent 70%); }
.portal-grid .au-card[data-module="sales"] .module-icon-wrap { background: rgba(20,184,166,0.12); color: #14b8a6; }

.portal-grid .au-card[data-module="docs"] { border-left-color: #64748b; }
.portal-grid .au-card[data-module="docs"]::before { background: radial-gradient(ellipse at top left, rgba(100,116,139,0.08), transparent 70%); }
.portal-grid .au-card[data-module="docs"] .module-icon-wrap { background: rgba(100,116,139,0.12); color: #64748b; }

.portal-grid .au-card[data-module="monitor"] { border-left-color: #06b6d4; }
.portal-grid .au-card[data-module="monitor"]::before { background: radial-gradient(ellipse at top left, rgba(6,182,212,0.08), transparent 70%); }
.portal-grid .au-card[data-module="monitor"] .module-icon-wrap { background: rgba(6,182,212,0.12); color: #06b6d4; }

.portal-grid .au-card[data-module="pto"] { border-left-color: #ff8c00; }
.portal-grid .au-card[data-module="pto"]::before { background: radial-gradient(ellipse at top left, rgba(255,140,0,0.08), transparent 70%); }
.portal-grid .au-card[data-module="pto"] .module-icon-wrap { background: rgba(255,140,0,0.12); color: #ff8c00; }

.portal-grid .au-card[data-module="admin"] { border-left-color: #e94560; }
.portal-grid .au-card[data-module="admin"]::before { background: radial-gradient(ellipse at top left, rgba(233,69,96,0.08), transparent 70%); }
.portal-grid .au-card[data-module="admin"] .module-icon-wrap { background: rgba(233,69,96,0.12); color: #e94560; }

.portal-grid .au-card[data-module="marketing"] { border-left-color: #a855f7; }
.portal-grid .au-card[data-module="marketing"]::before { background: radial-gradient(ellipse at top left, rgba(168,85,247,0.08), transparent 70%); }
.portal-grid .au-card[data-module="marketing"] .module-icon-wrap { background: rgba(168,85,247,0.12); color: #a855f7; }

/* Иконка модуля */
.module-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
    transition: transform 0.3s;
}

.portal-grid .au-card:hover .module-icon-wrap {
    transform: scale(1.1);
}

/* Статус-индикатор */
.module-status {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-active .status-dot {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34,197,94,0.5);
    animation: pulse-dot 2s infinite;
}
.status-active { color: #22c55e; }

.status-soon .status-dot {
    background: #f59e0b;
}
.status-soon { color: #f59e0b; }

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Название и описание */
.module-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--au-text);
    margin-bottom: 6px;
}

.module-desc {
    font-size: 12px;
    color: var(--au-text-muted);
    line-height: 1.5;
}

/* Disabled карточки */
.portal-grid .au-card.au-disabled {
    opacity: 0.35;
    pointer-events: none;
    border-left-color: rgba(255,255,255,0.06) !important;
}

/* === INFO СЕКЦИЯ === */
.info-section {
    margin-top: 48px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.info-card {
    background: var(--au-bg-card);
    border: 1px solid var(--au-border);
    border-radius: var(--au-radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.info-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--au-module);
    opacity: 0.5;
}

.info-label {
    font-size: 12px;
    color: var(--au-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.info-value {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--au-module), #ff8c00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.info-sub {
    font-size: 12px;
    color: var(--au-text-muted);
    margin-top: 4px;
}

/* === HEADER УЛУЧШЕНИЯ === */
.au-header {
    padding-top: 17px !important; /* место для gradient bar */
}

@media (max-width: 768px) {
    .portal-grid.au-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .info-section { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .portal-grid.au-grid { grid-template-columns: 1fr; }
    .info-section { grid-template-columns: 1fr; }
}

/* Модуль Система */
.portal-grid .au-card[data-module="system"] { border-left-color: #06b6d4; }
.portal-grid .au-card[data-module="system"]::before { background: radial-gradient(ellipse at top left, rgba(6,182,212,0.08), transparent 70%); }
.portal-grid .au-card[data-module="system"] .module-icon-wrap { background: rgba(6,182,212,0.12); color: #06b6d4; }

/* Системная секция — меньше карточки */
.system-grid.au-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

/* === Рацуха #5: SVG-иконки === */
.module-icon-wrap svg {
    width: 28px;
    height: 28px;
}

/* === Рацуха #18: Кнопка темы === */
.theme-btn {
    font-size: 18px;
    padding: 6px 10px !important;
    line-height: 1;
}

/* Светлая тема — корректировки для портала */










/* === СВЕТЛАЯ ТЕМА — портал === */
[data-theme="light"] .portal-grid .au-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
[data-theme="light"] .portal-grid .au-card:hover {
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-color: #d1d5db;
}
[data-theme="light"] .module-title { color: #111827; }
[data-theme="light"] .module-desc { color: #6b7280; }
[data-theme="light"] .info-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
[data-theme="light"] .info-value {
    -webkit-text-fill-color: unset;
    background: none;
    color: var(--au-module);
}
[data-theme="light"] .info-label { color: #6b7280; }
[data-theme="light"] .info-sub { color: #9ca3af; }
[data-theme="light"] body::before { height: 4px; }
[data-theme="light"] .status-active .status-dot {
    box-shadow: 0 0 6px rgba(34,197,94,0.4);
}
[data-theme="light"] .au-skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: au-shimmer 1.5s infinite;
}

/* ГРАНДАДМИН секция */
.grandadmin-title {
    color: #f59e0b;
    display: flex;
    align-items: center;
    gap: 10px;
}
.grandadmin-title svg {
    width: 22px;
    height: 22px;
    stroke: #f59e0b;
}
#grandadmin-grid .au-card {
    border-color: rgba(245,158,11,0.15);
}
#grandadmin-grid .au-card:hover {
    border-color: rgba(245,158,11,0.3);
}
