/* =========================================================
   PUBLICORUM SYSTEM.CSS
   Корпоративный системный слой PUBLICORUM
   ========================================================= */

/* APP ROOT */

.app,
.publicorum-app,
.owner-boot {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 12% 18%, rgba(55, 35, 92, .42), transparent 34%),
        radial-gradient(circle at 82% 14%, rgba(18, 72, 132, .28), transparent 42%),
        linear-gradient(135deg, var(--bg-primary), #06101d 62%, #04101b);
    color: var(--text-main);
}

/* SYSTEM VIEWPORT */

.viewport,
.owner-main {
    width: min(var(--container), calc(100% - 48px));
    margin: 0 auto;
    padding: 32px 0 56px;
    flex: 1;
}

/* CORPORATE GRID */

.system-grid {
    display: grid;
    gap: 18px;
}

.system-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.system-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.system-grid-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

/* PUBLICORUM PANEL */

.system-panel,
.owner-panel,
.shell-block,
.card {
    position: relative;
    background:
        linear-gradient(145deg, rgba(18,34,56,.92), rgba(8,17,31,.92));
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    padding: 22px;
    overflow: hidden;
}

.system-panel::before,
.owner-panel::before,
.shell-block::before,
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(212,175,55,.18), transparent 18%, transparent 82%, rgba(45,120,255,.10));
    opacity: .45;
}

/* TYPOGRAPHY */

.doctrine-title,
.owner-title,
.system-title {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(36px, 5vw, 74px);
    line-height: .98;
    font-weight: 800;
    letter-spacing: -.035em;
    color: var(--text-main);
}

.system-subtitle,
.doctrine-subtitle {
    margin-top: 14px;
    color: var(--text-soft);
    font-size: 15px;
    line-height: 1.65;
    max-width: 980px;
}

.system-kicker,
.state-label {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--gold);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .22em;
    text-transform: uppercase;
}

/* STATUS */

.system-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-soft);
}

.system-status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--emerald);
    box-shadow: 0 0 14px rgba(31,191,143,.8);
}

.is-active {
    color: var(--emerald);
}

.is-warning {
    color: var(--gold);
}

.is-error {
    color: var(--danger);
}

/* BUTTONS */

.system-button,
button {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--gold), #9e7924);
    color: #08111f;
    font-weight: 800;
    transition: var(--transition);
}

.system-button:hover,
button:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

/* FORMS */

input,
textarea,
select {
    width: 100%;
    background: rgba(255,255,255,.045);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    padding: 10px 12px;
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(212,175,55,.65);
    box-shadow: 0 0 0 3px rgba(212,175,55,.10);
}

/* DEBUG */

.debug-mode {
    outline: 1px dashed var(--gold);
}

.debug-path {
    margin-top: 8px;
    font-family: Consolas, monospace;
    font-size: 11px;
    color: var(--text-muted);
}

/* RESPONSIVE */

@media (max-width: 1100px) {
    .system-grid-6,
    .system-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .system-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .viewport,
    .owner-main {
        width: min(100% - 24px, var(--container));
        padding: 18px 0 36px;
    }

    .system-grid-6,
    .system-grid-3,
    .system-grid-2 {
        grid-template-columns: 1fr;
    }

    .system-panel,
    .owner-panel,
    .shell-block,
    .card {
        padding: 16px;
    }
}