@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700;900&family=Inter:wght@300;600;800;900&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
    --bg-dark: #050505;
    --text-main: #f8fafc;
    --card-bg: #0f172a;
    --wf-tech-1: #240b3b;
    --wf-tech-2: #0c4a6e;
    --wf-accent: #00e5ff;
    --wf-sub: #fbbf24;
    --jj-tech-1: #7f1d1d;
    --jj-tech-2: #c2410c;
    --jj-accent: #dc2626;
    --jj-sub: #fbbf24;
    --wf-grp-1: #1e293b;
    --wf-grp-2: #020617;
    --grp-accent: #c5a059;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.view {
    display: none;
    width: 100%;
    min-height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.view.active {
    display: flex;
    opacity: 1;
}

/* LANDING */
.hero {
    text-align: center;
    margin-bottom: 50px;
}

.hero-logo {
    height: 80px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 15px rgba(197, 160, 89, 0.5));
}

.hero h1 {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    margin: 0;
    color: var(--grp-accent);
    letter-spacing: 2px;
}

.hero p {
    color: #94a3b8;
    font-family: 'JetBrains Mono';
    letter-spacing: 1px;
    margin-top: 10px;
}

.card-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 90%;
    max-width: 1200px;
    margin-bottom: 60px;
}

.card {
    position: relative;
    height: 350px;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.3s;
}

.card:hover {
    transform: translateY(-10px);
    z-index: 2;
}

.card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: 0.5s;
    opacity: 0.8;
}

.card-wf .card-bg {
    background: linear-gradient(135deg, var(--wf-tech-1), var(--wf-tech-2));
}

.card-wf:hover {
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.3);
    border-color: var(--wf-accent);
}

.card-jj .card-bg {
    background: linear-gradient(135deg, var(--jj-tech-1), var(--jj-tech-2));
}

.card-jj:hover {
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.4);
    border-color: var(--jj-accent);
}

.card-grp .card-bg {
    background: radial-gradient(circle at bottom, var(--wf-grp-1), var(--wf-grp-2));
}

.card-grp:hover {
    box-shadow: 0 0 30px rgba(197, 160, 89, 0.3);
    border-color: var(--grp-accent);
}

.card-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
}

.card-logo {
    max-height: 80px;
    max-width: 80%;
    margin-bottom: 20px;
    filter: drop-shadow(0 5px 5px rgba(0, 0, 0, 0.5));
}

.card h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin: 0;
}

.link-hint {
    margin-top: 20px;
    font-size: 0.8rem;
    font-family: 'JetBrains Mono';
    opacity: 0;
    transform: translateY(10px);
    transition: 0.3s;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 15px;
    border-radius: 20px;
}

.card:hover .link-hint {
    opacity: 1;
    transform: translateY(0);
}

.access-control {
    text-align: center;
    margin-top: 20px;
}

.btn-main {
    background: var(--grp-accent);
    color: #020617;
    border: none;
    padding: 15px 40px;
    font-weight: 900;
    letter-spacing: 1px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.2s;
    font-family: 'Inter';
    box-shadow: 0 0 15px rgba(197, 160, 89, 0.3);
}

.btn-main:hover {
    background: #eab308;
    box-shadow: 0 0 25px rgba(197, 160, 89, 0.6);
    transform: scale(1.02);
}

.btn-ghost {
    background: transparent;
    color: #94a3b8;
    border: 1px solid #334155;
    padding: 10px 30px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
}

/* LOGIN */
.login-box {
    background: #0f172a;
    padding: 50px;
    border-radius: 20px;
    border: 1px solid #334155;
    text-align: center;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.login-box h2 {
    color: var(--grp-accent);
    font-family: 'Cinzel';
    margin-bottom: 30px;
}

.input-group input {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    background: #020617;
    border: 1px solid #334155;
    color: white;
    border-radius: 6px;
    box-sizing: border-box;
    text-align: center;
    font-family: 'JetBrains Mono';
}

.input-group input:focus {
    border-color: var(--grp-accent);
    outline: none;
}

/* DASHBOARD & ADMIN */
.dashboard-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 40px;
    width: 95%;
    max-width: 1600px;
    height: 90vh;
    padding: 30px;
    box-sizing: border-box;
}

.sidebar {
    background: #0f172a;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid #334155;
    display: flex;
    flex-direction: column;
}

.user-badge {
    background: #020617;
    color: var(--grp-accent);
    padding: 10px;
    text-align: center;
    border-radius: 8px;
    font-family: 'JetBrains Mono';
    font-weight: bold;
    margin-bottom: 20px;
    border: 1px solid var(--grp-accent);
}

#admin-panel {
    background: rgba(197, 160, 89, 0.1);
    border: 1px solid var(--grp-accent);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease;
}

.admin-label {
    display: block;
    color: var(--grp-accent);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-family: 'JetBrains Mono';
}

#admin-switch {
    width: 100%;
    background: #020617;
    color: white;
    border: 1px solid var(--grp-accent);
    padding: 10px;
    border-radius: 4px;
    font-family: 'JetBrains Mono';
    cursor: pointer;
    text-transform: uppercase;
}

.form-group label {
    display: block;
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: #020617;
    border: 1px solid #334155;
    color: white;
    padding: 12px;
    border-radius: 6px;
    box-sizing: border-box;
    font-family: inherit;
}

.form-group textarea {
    height: 150px;
    resize: none;
}

.actions {
    margin-top: auto;
}

.actions .btn-main {
    width: 100%;
    margin-bottom: 10px;
}

.preview-stage {
    background: #1e1e1e;
    border-radius: 16px;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    padding: 50px;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* PDF A4 SHEET */
.a4-sheet {
    width: 210mm;
    min-height: 297mm;
    background: white;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px;
    z-index: 1;
    box-shadow: inset 0 -20px 50px rgba(0, 0, 0, 0.4);
}

.texture-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    mix-blend-mode: overlay;
    opacity: 0.4;
}

.header-content {
    position: relative;
    z-index: 10;
    padding: 45px 50px 0 50px;
    display: flex;
    justify-content: space-between;
}

.logo-text h1 {
    margin: 0;
    line-height: 0.9;
    text-transform: uppercase;
    letter-spacing: -1px;
    font-size: 36pt;
    font-weight: 900;
}

.logo-text p {
    margin: 8px 0 15px 0;
    font-size: 8pt;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 700;
}

.integrated-flags {
    display: flex;
    gap: 10px;
    mix-blend-mode: overlay;
    opacity: 0.9;
    filter: contrast(1.3) saturate(1.2);
}

.flag {
    width: 32px;
    height: 20px;
    border-radius: 3px;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.6);
}

.i-de {
    background: linear-gradient(to bottom, #222 33%, #c00 33%, #c00 66%, #ea0 66%);
}

.i-by {
    background: repeating-linear-gradient(45deg, #e6f0ff, #e6f0ff 6px, #0080c0 6px, #0080c0 12px);
}

.contact {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    color: white;
}

.c-name {
    font-weight: 800;
    font-size: 12pt;
    display: block;
}

.c-role {
    font-size: 8pt;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    display: block;
    opacity: 0.9;
}

.icon-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 9pt;
    margin-bottom: 4px;
    font-family: 'JetBrains Mono';
    opacity: 0.95;
    gap: 10px;
}

.icon-row svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.content-area {
    padding: 100px 50px 50px 50px;
    flex-grow: 1;
    position: relative;
    z-index: 5;
}

.subject {
    font-size: 16pt;
    font-weight: 800;
    margin-bottom: 30px;
    color: #0f172a;
    position: relative;
}

.text-dummy {
    font-size: 10.5pt;
    color: #334155;
    line-height: 1.7;
    text-align: justify;
    white-space: pre-wrap;
}

.footer {
    padding: 0 50px 30px 50px;
    text-align: center;
    position: relative;
    z-index: 5;
}

.footer-line {
    height: 1px;
    width: 100%;
    margin-bottom: 15px;
    opacity: 0.4;
}

.sys-specs {
    font-family: 'JetBrains Mono';
    font-size: 6.5pt;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    opacity: 0.7;
    display: flex;
    justify-content: center;
    gap: 15px;
    text-transform: uppercase;
    font-weight: 600;
}

.spec-item:not(:last-child)::after {
    content: '//';
    margin-left: 15px;
    opacity: 0.3;
}

.f-main {
    font-weight: 900;
    font-size: 9pt;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.f-sub {
    font-size: 7.5pt;
    color: #64748b;
    font-style: italic;
    margin-top: 5px;
}

/* THEME: WF-TECH */
.id-wf .header-bg {
    background: linear-gradient(125deg, #240b3b 0%, #0c4a6e 100%);
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0% 100%);
}

.id-wf .texture-overlay {
    background-image: linear-gradient(90deg, rgba(0, 229, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 100%;
}

.id-wf #out-logo {
    color: var(--wf-accent);
    text-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
}

.id-wf #out-slogan {
    color: var(--wf-sub);
}

.id-wf .c-role {
    color: var(--wf-sub);
}

.id-wf .icon-row {
    color: #a5f3fc;
}

.id-wf .icon-row svg {
    fill: var(--wf-sub);
}

.id-wf .subject::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: var(--wf-sub);
    margin-top: 10px;
}

.id-wf .sys-specs {
    color: #0ea5e9;
}

.id-wf .f-main {
    color: #3b0764;
}

.id-wf .footer-line {
    background: linear-gradient(90deg, transparent, #3b0764, transparent);
}

.id-wf .seal {
    display: none;
}

/* THEME: JJ-TECH */
.id-jj .header-bg {
    background: linear-gradient(135deg, #7f1d1d 0%, #c2410c 100%);
    clip-path: polygon(0 0, 100% 0, 100% 95%, 0% 85%);
}

.id-jj .texture-overlay {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.2'/%3E%3C/svg%3E");
}

.id-jj #out-logo {
    color: white;
    text-shadow: 2px 2px 0px #b91c1c;
}

.id-jj #out-slogan {
    color: var(--jj-sub);
}

.id-jj .c-role {
    color: #fdba74;
}

.id-jj .icon-row {
    color: #fecaca;
}

.id-jj .icon-row svg {
    fill: var(--jj-sub);
}

.id-jj .subject::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: var(--jj-accent);
    margin-top: 10px;
}

.id-jj .sys-specs {
    color: #ef4444;
}

.id-jj .f-main {
    color: var(--jj-accent);
}

.id-jj .footer-line {
    background: linear-gradient(90deg, transparent, #dc2626, transparent);
}

.id-jj .seal {
    display: none;
}

/* THEME: WF-GROUP */
.id-grp .header-bg {
    background: radial-gradient(circle at 50% 100%, #1e293b 0%, #020617 80%);
    clip-path: polygon(0 0, 100% 0, 100% 85%, 50% 100%, 0% 85%);
    border-bottom: 2px solid var(--grp-accent);
}

.id-grp .texture-overlay {
    background-image: linear-gradient(rgba(197, 160, 89, 0.05) 1px, transparent 1px);
    background-size: 100% 4px;
}

.id-grp #out-logo {
    font-family: 'Cinzel';
    color: var(--grp-accent);
    text-shadow: 0 0 15px rgba(197, 160, 89, 0.4);
    letter-spacing: 2px;
}

.id-grp #out-slogan {
    color: #94a3b8;
    font-family: 'JetBrains Mono';
}

.id-grp .c-name {
    color: var(--grp-accent);
}

.id-grp .c-role {
    color: #94a3b8;
}

.id-grp .icon-row {
    color: #cbd5e1;
}

.id-grp .icon-row svg {
    fill: var(--grp-accent);
}

.id-grp .subject::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: var(--grp-accent);
    margin-top: 10px;
}

.id-grp .sys-specs {
    color: var(--grp-accent);
}

.id-grp .f-main {
    color: #020617;
    font-family: 'Cinzel';
}

.id-grp .footer-line {
    background: linear-gradient(90deg, transparent, #c5a059, transparent);
}

.id-grp .seal {
    display: block;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #aa8336, #ebd393, #aa8336);
    margin: 10px auto 0 auto;
    box-shadow: 0 0 5px var(--grp-accent);
}