:root {
    --primary: #0c7aba;
    --primary-dark: #0a5c88;
    --secondary: #143E6C;
    --accent: #1ac6ff;
    --gray-100: #f5f7fb;
    --gray-200: #e4e9f2;
    --gray-400: #8a97b8;
    --text: #1b2a41;
    --danger: #c62828;
    --success: #1b9f65;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    background: var(--gray-100);
    color: var(--text);
    line-height: 1.5;
}

a {
    color: var(--primary);
    text-decoration: none;
}

.equipments-area {
    padding: min(6vw, 60px);
    max-width: 1300px;
    margin: 0 auto;
}

.intro {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.intro h1 {
    margin: 0;
    font-size: clamp(1.5rem, 2.6vw, 2.6rem);
    color: var(--secondary);
}

.intro p {
    margin: 0;
    color: var(--gray-400);
}

.disclaimer {
    font-size: 0.95rem;
    color: var(--gray-400);
}

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.equipment-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 20px 40px rgba(17, 46, 86, 0.08);
    padding: 1rem 1rem 1.3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 360px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.equipment-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 50px rgba(17, 46, 86, 0.12);
}

.card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 800 / 443;
    border-radius: 14px;
    background: var(--gray-100);
    overflow: hidden;
}

.carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
    display: none;
}

.carousel img.active {
    display: block;
}

.carousel-dots {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.carousel-dots button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: background 0.2s ease;
}

.carousel-dots button.active {
    background: var(--primary);
}

.placeholder {
    display: grid;
    place-items: center;
    aspect-ratio: 800 / 443;
    background: var(--gray-200);
    color: var(--gray-400);
    border-radius: 14px;
    font-size: 0.9rem;
}

.card-body h3 {
    margin: 1rem 0 0.35rem;
    font-size: 1.2rem;
    color: var(--secondary);
    text-align: center;
}

.card-body p {
    margin: 0;
    color: var(--gray-400);
    text-align: justify;
}

.card-footer {
    margin-top: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-footer .btn {
    min-width: 180px;
}

.ghost-link {
    font-size: 0.9rem;
    color: var(--gray-400);
    text-decoration: underline;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.3rem;
    border-radius: 999px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
    background: linear-gradient(120deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 10px 20px rgba(12, 122, 186, 0.3);
}

.btn.secondary {
    background: #fff;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn.danger {
    background: var(--danger);
    color: #fff;
}

.btn.small {
    padding: 0.35rem 0.7rem;
    border-radius: 8px;
    font-size: 0.85rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.btn:not(:disabled):hover {
    transform: translateY(-1px);
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(12, 20, 46, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    padding: 1rem;
    z-index: 1000;
}

.modal.visible {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #fff;
    border-radius: 20px;
    width: min(900px, 95%);
    max-height: 95vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    box-shadow: 0 40px 70px rgba(8, 12, 36, 0.35);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray-400);
}

.modal-equipment-label {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: var(--gray-400);
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

label {
    font-size: 0.9rem;
    color: var(--gray-400);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

input[type="text"],
input[type="email"],
input[type="url"],
textarea {
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(12, 122, 186, 0.15);
}

.question-block {
    border: 1px dashed var(--gray-200);
    padding: 1rem;
    border-radius: 16px;
}

.choice-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.choice {
    border: 1px solid var(--gray-200);
    padding: 0.6rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.choice input {
    accent-color: var(--primary);
}

.notice {
    display: none;
    background: #fff9e6;
    border-left: 4px solid #ffc107;
    padding: 1rem;
    border-radius: 10px;
    font-size: 0.95rem;
}

.notice p {
    margin: 0 0 0.75rem;
    text-align: justify;
}

.notice.visible {
    display: block;
}

.notice .toggle {
    width: 100%;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    gap: 0.4rem;
}

.notice .toggle span {
    text-align: center;
}

.notice .toggle input {
    margin: 0;
}

#sim-sections {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

#sim-sections.visible {
    display: flex;
}

#sim-sections section {
    width: 100%;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: 1rem;
}

.section-hint {
    margin: 0;
    font-size: 0.85rem;
    color: var(--gray-400);
}

.dynamic-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dynamic-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dynamic-index {
    font-weight: 600;
    color: var(--gray-400);
    min-width: 1.5rem;
    text-align: right;
}

.dynamic-input input {
    flex: 1;
}

.dynamic-list input {
    margin-bottom: 0.5rem;
}

.dynamic-list input.invalid {
    border-color: var(--danger);
}

#poster-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    color: var(--gray-400);
}

.poster-inputs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.poster-field {
    border: 1px dashed var(--gray-200);
    border-radius: 12px;
    padding: 0.4rem 0.75rem;
    background: #fff;
}

.poster-field input[type="file"] {
    flex: 1;
}

.poster-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 0.75rem 0 0;
}

.poster-tip {
    font-size: 0.85rem;
    color: var(--gray-400);
}

.toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.toggle input {
    width: auto;
}

.form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.feedback {
    color: var(--primary);
    min-height: 1.2rem;
}

body.modal-open {
    overflow: hidden;
}

/* Admin area */
.admin-body {
    background: var(--gray-100);
    padding: 2rem clamp(1rem, 4vw, 3rem);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-header h1 {
    margin: 0;
    color: var(--secondary);
}

.admin-actions {
    display: flex;
    gap: 0.5rem;
}

.export-menu {
    position: relative;
    display: inline-block;
}

.export-menu summary {
    list-style: none;
    cursor: pointer;
}

.export-menu summary::marker,
.export-menu summary::-webkit-details-marker {
    display: none;
}

.export-menu[open] .export-options {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.export-options {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 190px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(15, 32, 56, 0.16);
    padding: 0.35rem 0;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 10;
}

.export-options a {
    display: block;
    padding: 0.65rem 1rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
}

.export-options a:hover {
    background: var(--gray-100);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 15px 30px rgba(17, 46, 86, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-card span {
    color: var(--gray-400);
    text-transform: uppercase;
    font-size: 0.8rem;
}

.stat-card strong {
    font-size: 2rem;
    color: var(--secondary);
}

.card {
    background: #fff;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(15, 32, 56, 0.08);
    margin-bottom: 1.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.table-scroll {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

table th,
table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

table th {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--gray-400);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.8rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--secondary);
    background: rgba(20, 62, 108, 0.08);
}

.badge::before {
    content: '';
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 2px #fff inset;
}

.badge.yes {
    background: rgba(27, 159, 101, 0.12);
    color: var(--success);
}

.badge.no {
    background: rgba(138, 151, 184, 0.18);
    color: var(--gray-400);
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.admin-grid--stack {
    grid-template-columns: 1fr;
}

.equipment-form {
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.alert {
    padding: 0.9rem 1.2rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.alert.success {
    background: #e8f7ef;
    color: var(--success);
}

.file-list {
    margin: 0.4rem 0 0;
    padding-left: 1rem;
    font-size: 0.9rem;
}

.image-upload-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.2rem;
    border: 1px solid var(--gray-200);
    border-radius: 18px;
    background: #fff;
    align-items: flex-end;
}

.image-upload-form .upload-field {
    background: var(--gray-100);
    border-radius: 14px;
    border: 1px dashed var(--gray-200);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.image-upload-form .upload-field label {
    margin: 0;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gray-400);
}

.image-upload-form select,
.image-upload-form input[type="file"] {
    margin: 0;
    width: 100%;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 0.7rem 0.9rem;
    font-size: 0.95rem;
}

.image-upload-form input[type="file"] {
    padding: 0.4rem;
    cursor: pointer;
}

.image-upload-form .field-hint {
    margin: 0;
    font-size: 0.85rem;
    color: var(--gray-400);
}

.image-upload-form button {
    align-self: flex-start;
    min-height: 48px;
}

.image-gallery article {
    margin-bottom: 1.5rem;
}

.image-gallery .table-scroll {
    margin-top: 0.5rem;
}

.image-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.image-table th,
.image-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--gray-200);
    text-align: left;
}

.image-table th {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--gray-400);
}

.image-preview {
    width: 110px;
    height: auto;
    aspect-ratio: 800 / 443;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

.image-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.empty-state {
    color: var(--gray-400);
}

@media (max-width: 600px) {
    .card-footer {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .card-footer .btn {
        width: 100%;
    }

    .admin-header {
        flex-direction: column;
    }

    .modal-content {
        padding: 1.3rem;
    }
}
.equipment-table input[type="text"],
.equipment-table input[type="url"],
.equipment-table textarea {
    width: 100%;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 0.4rem 0.5rem;
    font: inherit;
    color: var(--text);
    background: #fff;
}

.equipment-table textarea {
    min-height: 60px;
    resize: vertical;
}

.equipment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.inline-form {
    display: inline;
}

.inline-toggle {
    gap: 0.3rem;
}
