/* Globalny box-sizing */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Mobile touch target standards - minimum 44px for EF500R compatibility */
button, .btn, [role="button"], 
input[type="submit"], input[type="button"], input[type="reset"],
a.action-link {
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}

/* Remove tap highlight globally */
a, button, input, select, textarea {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* html i body na pełny ekran */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #000d2b;
    font-family: sans-serif;
}

/* Pasek logowania (integralny, nie fixed) */
.top-bar {
    width: 100%;
    height: 60px;
    background-color: #11172a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.top-bar-left {
    display: flex;
    align-items: center;
}

.top-bar-left a {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s;
}

.top-bar-left a:hover {
    opacity: 0.8;
}

.top-bar-left .logo {
    height: 40px;
    margin-right: 10px;
}

/* Module icon container for SVG icons */
.top-bar-left .logo-container {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-bar-left .logo-container svg {
    width: 32px;
    height: 32px;
    color: #fff;
    stroke: currentColor;
}

.top-bar-left .system-name {
    color: white;
    font-size: 18px;
    font-weight: bold;
}

.app-title-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.event-subtitle {
    color: #4ecdc4;
    font-size: 12px;
    font-weight: 500;
    margin-top: 2px;
    letter-spacing: 0.5px;
}

.top-bar-right {
    display: flex;
    align-items: center;
}

.top-bar-right .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid white;
}

.map-icon-link {
    color: white;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: opacity 0.2s;
}

.map-icon-link:hover {
    opacity: 0.8;
}

.map-icon-link svg {
    width: 24px;
    height: 24px;
}

/* Grid kwadratów */
.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 600px;
    margin: 10px auto 0; /* odstęp od top-bar */
}

.item {
    position: relative;
    width: 48%;  /* dwie kolumny */
    margin: 1%;  /* odstęp między kwadratami */
    color: white;
    font-size: 20px;
}

/* Pseudo-element wymuszający kwadrat (kompatybilny ze starymi przeglądarkami) */
.item::before {
    content: "";
    display: block;
    padding-top: 100%;
}

.item > span {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px; /* padding wewnętrzny */
}

/* Kolory kwadratów */
.item--1 { background-color: orangered; }
.item--2 { background-color: yellowgreen; }
.item--3 { background-color: blueviolet; }
.item--4 { background-color: palevioletred; }
.item--5 { background-color: royalblue; }
.item--6 { background-color: goldenrod; }

/* Status i loader */
#status {
    display: none;
}

#loader {
    position: fixed;
    bottom: -160px; /* hidden position lower to avoid flicker */
    left: 50%;
    transform: translateX(-50%);
    background-color: orange;
    color: white;
    padding: 14px 24px; /* bigger padding for longer text */
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: bottom 0.3s ease;
    z-index: 9999;
    pointer-events: none;
    max-width: 90vw;
    min-width: 280px;
    min-height: 56px; /* a bit taller */
    box-shadow: 0 10px 24px rgba(0,0,0,0.35);
    font-size: 16px;
    line-height: 1.3;
    white-space: normal;
    word-break: break-word;
}

#loader img {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    display: inline-block;
}

#loader #loader-text {
    display: block;
}

/* Mobile page content */
.mobile-page-content {
    padding: 20px;
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
    color: white;
}

.mobile-page-content h1 {
    font-size: 1.8em;
    margin-bottom: 10px;
    color: white;
}

.mobile-page-content p {
    color: #ccc;
    margin-bottom: 30px;
}

.scan-instructions {
    background: rgba(26, 35, 50, 0.7);
    border-radius: 12px;
    padding: 30px 20px;
    margin: 20px 0;
    border: 2px dashed #4ecdc4;
}

.scan-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.scan-instructions p {
    margin: 0;
    font-size: 1.1em;
    color: #4ecdc4;
}

/* Make tiles clickable */
.item {
    cursor: pointer;
    text-decoration: none;
    color: white;
}

.item:visited {
    color: white;
}

/* Feature placeholders */
.feature-placeholder {
    background: rgba(26, 35, 50, 0.7);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid #4ecdc4;
}

.feature-placeholder h3 {
    color: #4ecdc4;
    margin-top: 0;
    margin-bottom: 15px;
}

.feature-placeholder ul {
    margin: 10px 0;
    padding-left: 20px;
}

.feature-placeholder li {
    margin: 8px 0;
    color: #ccc;
}

.feature-placeholder p {
    color: #bbb;
}

/* Check-In status selector */
.status-selector {
    max-width: 400px;
    margin: 20px auto 10px;
    display: flex;
    gap: 16px;
    justify-content: center;
}
.status-option {
    flex: 1;
    cursor: pointer;
    background: rgba(26, 35, 50, 0.7);
    border-radius: 12px;
    padding: 14px 10px 12px;
    text-align: center;
    border: 2px solid #2a3654;
    position: relative;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.status-option:active { transform: scale(0.97); }
.status-circle { width: 32px; height: 32px; margin: 0 auto 8px; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.4); }
.status-option.ready .status-circle { background: #2ecc71; }
.status-option.pending .status-circle { background: #f1c40f; }
.status-label { color: #ccc; font-weight: 600; font-size: 0.9em; }
.status-option.ready .status-label { color: #4ecdc4; }
.status-option.pending .status-label { color: #f1c40f; }
.status-option.selected { border-color: #4ecdc4; box-shadow: 0 0 0 3px rgba(78,205,196,0.25), 0 4px 10px rgba(0,0,0,0.4); }
.status-option.selected::after { content: '✓'; position: absolute; top: 6px; right: 10px; color: #4ecdc4; font-weight: 700; font-size: 16px; }
.current-status-banner { max-width: 400px; margin: 0 auto 8px; background: rgba(26,35,50,0.55); border: 1px solid #2a3654; border-radius: 8px; padding: 8px 12px; color: #4ecdc4; font-size: 0.85em; text-align: center; }

/* Last check-in confirmation card */
.last-checkin-card {
    max-width: 400px;
    margin: 12px auto 4px;
    background: rgba(26,35,50,0.7);
    border: 1px solid #2a3654;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 0.9em;
    color: #ccc;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.last-checkin-card .lc-title {
    font-weight: 600;
    color: #4ecdc4;
    margin-bottom: 8px;
    font-size: 0.95em;
}
.last-checkin-card .lc-label { color: #bbb; font-weight: 600; }
.last-checkin-card .lc-body { display: flex; flex-direction: column; gap: 6px; }
.last-checkin-card .lc-message { margin-top: 6px; font-size: 0.8em; color: #4ecdc4; word-break: break-word; }

/* Back button styling - simple white like module tiles */
.back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-right: 16px;
    transition: opacity 0.2s;
}
.back-btn:hover {
    opacity: 0.8;
}

/* User menu dropdown for mobile (no hover interactions) */
.user-menu-container { position: relative; display: inline-block; }
.avatar { cursor: pointer; }
.user-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 10px;
    background-color: #1a2238;
    border: 1px solid #2a3654;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    min-width: 180px;
    z-index: 1000;
}
.user-dropdown.show { display: block; }
.dropdown-item { display: flex; align-items: center; padding: 12px 16px; color: white; text-decoration: none; border-bottom: 1px solid #2a3654; }
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item img { width: 20px; height: 20px; margin-right: 12px; }

/* Asset info card styling */
.asset-card {
    background: rgba(26, 35, 50, 0.7);
    border-radius: 12px;
    padding: 16px;
    margin: 8px 0;
    border-left: 4px solid #4ecdc4;
}

.asset-image-container {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.asset-image-container img {
    max-width: 100%;
    max-height: 250px;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.asset-card-title {
    color: #4ecdc4;
    margin: 0 0 20px 0;
    font-size: 1.5em;
}

.asset-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.info-field {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid rgba(78, 205, 196, 0.2);
}

.info-field:last-child {
    border-bottom: none;
}

.info-field.no-border {
    border-bottom: none;
}

.info-field-notes {
    flex-direction: column;
    align-items: flex-start;
}

.field-label {
    color: #4ecdc4;
    font-weight: 600;
    font-size: 0.95em;
}

.field-value {
    color: white;
    text-align: right;
    word-break: break-word;
}

.info-field-notes .field-value {
    margin-top: 8px;
    text-align: left;
    color: #ccc;
    font-size: 0.95em;
}

/* Info label and value alignment */
.info-label {
    color: #4ecdc4;
    font-weight: 600;
    font-size: 0.95em;
    text-align: left;
}

.info-value {
    color: white;
    text-align: left;
    word-break: break-word;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    max-width: 100%;
}

/* Ensure full resolution string (Natywna/Maksymalna Rozdzielczość) is always visible on one line */
.resolution-value {
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    max-width: none !important;
    word-break: normal !important;
}

/* Multi-line connector fields (video/audio lists) */
.multi-line-value {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: break-word;
}

/* Allow wrapping for longer plug description */
.wrap-value {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: break-word;
}

/* Icon field rendered as block */
.icon-field-block {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.icon-field-block .info-label {
    margin-bottom: 2px;
}

.icon-value img,
.icon-value-inner img {
    height: 20px;
    vertical-align: middle;
    margin-right: 8px;
    display: inline-block;
}

/* Individual connector lines */
.connector-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1.4;
}

.connector-line img {
    height: 20px;
    vertical-align: middle;
    display: inline-block;
}

/* Notes field specific styling */
.info-field .info-label.notes-label {
    display: block;
    margin-bottom: 8px;
}

.info-field .info-value.notes-value {
    display: block;
    text-align: left;
    color: #ccc;
    font-size: 0.95em;
    line-height: 1.5;
}

/* Info page spacer */
.info-spacer {
    height: 20px;
    border-bottom: 2px solid rgba(78, 205, 196, 0.3);
    margin: 10px 0;
}

/* Info page section header */
.info-section-header {
    font-weight: 700;
    font-size: 1.1em;
    color: #4ecdc4;
    margin: 16px 0 8px 0;
    text-align: center;
}

/* Info page label and value styles */
.info-label {
    color: #4ecdc4;
    font-weight: 600;
    font-size: 0.95em;
}

.info-value {
    color: white;
    text-align: right;
    word-break: break-word;
}

.info-notes {
    display: block;
    margin-top: 8px;
    text-align: left;
    color: #ccc;
    font-size: 0.95em;
}

/* Info icon and popup styles */
.value-with-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(78, 205, 196, 0.2);
    color: #4ecdc4;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.info-icon:hover {
    background: rgba(78, 205, 196, 0.4);
}

.info-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.info-popup-content {
    position: relative;
    background: #1a2238;
    border: 2px solid #4ecdc4;
    border-radius: 12px;
    padding: 24px;
    max-width: 500px;
    width: 100%;
    color: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    word-wrap: break-word; /* legacy */
    overflow-wrap: anywhere; /* modern wrapping for long tokens */
}

.info-popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    color: #4ecdc4;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.info-popup-close:hover {
    color: #fff;
}

.info-popup-content p {
    margin: 0 0 16px 0;
    line-height: 1.5;
    color: #ccc;
    white-space: normal; /* ensure wrapping */
    word-break: break-word; /* break very long words */
    overflow-wrap: anywhere; /* allow break inside long sequences */
    text-align: left; /* revert to left alignment */
}

.info-popup-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    margin-top: 12px;
    display: block;
    margin-left: auto; /* push image to the right */
    margin-right: 0;
}

/* ==================== EDIT PAGE STYLES ==================== */

/* Asset info summary (read-only display) */
.asset-info-summary {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-left: 3px solid #4ecdc4;
}

.info-field-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.info-field-inline .field-label {
    color: #4ecdc4;
    font-weight: 600;
    font-size: 0.9em;
}

.info-field-inline .field-value {
    color: white;
    font-size: 0.95em;
}

/* Edit form styling */
.edit-form {
    margin-top: 20px;
}

.form-section {
    margin-bottom: 24px;
}

.section-title {
    color: #4ecdc4;
    font-size: 1.2em;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(78, 205, 196, 0.3);
}

.form-field {
    margin-bottom: 16px;
    text-align: left;
}

.form-field label {
    display: block;
    color: #4ecdc4;
    font-weight: 600;
    font-size: 0.95em;
    margin-bottom: 6px;
}

.form-field label .required {
    color: #e74c3c;
    margin-left: 4px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid #2a3654;
    border-radius: 8px;
    color: white;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #4ecdc4;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.2);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #888;
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Number input styling */
.form-input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.form-input[type="number"]::-webkit-inner-spin-button,
.form-input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Date input styling */
.form-input[type="date"] {
    color-scheme: dark;
}

/* Form action buttons */
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
    text-align: center;
}

.btn:active {
    transform: scale(0.97);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #4ecdc4 0%, #44b3ab 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.4);
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 6px 16px rgba(78, 205, 196, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid #2a3654;
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    border-color: #4a5674;
}

/* Edit message (success/error) */
.edit-message {
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
}

.edit-message.success {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 2px solid #2ecc71;
}

.edit-message.error {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 2px solid #e74c3c;
}

/* Checkbox and radio styling (if needed for custom fields) */
.form-checkbox-group,
.form-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.form-checkbox-label,
.form-radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid #2a3654;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    color: white;
}

.form-checkbox-label:hover,
.form-radio-label:hover {
    background: rgba(0, 0, 0, 0.4);
    border-color: #4a5674;
}

.form-checkbox-label input[type="checkbox"],
.form-radio-label input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #4ecdc4;
}

.form-checkbox-label input[type="checkbox"]:checked,
.form-radio-label input[type="radio"]:checked {
    accent-color: #4ecdc4;
}

.form-radio-label span,
.form-checkbox-label span {
    flex: 1;
    color: white;
    font-size: 0.95em;
}

/* Mobile responsiveness for edit page */
@media (max-width: 480px) {
    .mobile-page-content {
        padding: 15px;
    }
    
    .asset-card {
        padding: 16px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* ============================================
   ADDITIONAL EDIT PAGE ENHANCEMENTS
   ============================================ */

/* Resolution input styles */
.resolution-input-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.resolution-input-container .form-input {
    flex: 1;
    min-width: 0;
}

.resolution-separator {
    font-size: 20px;
    font-weight: bold;
    color: #4ecdc4;
    padding: 0 5px;
}

/* Select dropdown styles matching info page */
.form-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    background: #2a3550;
    color: white;
    border: 2px solid #4ecdc4;
    border-radius: 8px;
    margin-top: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%234ecdc4" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3e%3cpolyline points="6 9 12 15 18 9"%3e%3c/polyline%3e%3c/svg%3e');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

.form-select:hover {
    border-color: #5eddd4;
    background: #334060;
}

.form-select:focus {
    outline: none;
    border-color: #6ef5ed;
    box-shadow: 0 0 10px rgba(78, 205, 196, 0.3);
}

.form-select option {
    background: #1a2238;
    color: white;
    padding: 10px;
}

/* Checkbox frame for multi-select fields */
.form-checkbox-frame {
    background: #2a3550;
    border: 2px solid #4ecdc4;
    border-radius: 8px;
    padding: 15px;
    margin-top: 8px;
}

.form-checkbox-frame .form-checkbox-group {
    margin: 0;
}

/* Modal styles matching info page aesthetics */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #1a2238;
    border: 2px solid #4ecdc4;
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-title {
    color: #4ecdc4;
    font-size: 24px;
    margin: 0 0 15px 0;
    text-align: center;
}

.modal-message {
    color: #ccc;
    font-size: 16px;
    margin: 0 0 25px 0;
    text-align: center;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.modal-actions .btn {
    flex: 1;
    max-width: 150px;
}

/* Asset info summary styling to match info page */
.asset-info-summary {
    background: #2a3550;
    border: 2px solid #4ecdc4;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
}

.info-field-inline {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(78, 205, 196, 0.2);
}

.info-field-inline:last-child {
    border-bottom: none;
}

.info-field-inline .field-label {
    color: #4ecdc4;
    font-weight: 600;
    font-size: 14px;
}

.info-field-inline .field-value {
    color: white;
    font-size: 14px;
    text-align: right;
}

/* ==================== CREATE PAGE STYLES ==================== */

.mode-selection {
    padding: 20px;
    text-align: center;
}

.mode-selection h1 {
    color: white;
    font-size: 28px;
    margin-bottom: 10px;
}

.mode-selection .subtitle {
    color: #aaa;
    font-size: 16px;
    margin-bottom: 30px;
}

.create-modes-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 500px;
    margin: 0 auto;
}

.create-mode-tile {
    background: linear-gradient(135deg, #1a2332 0%, #11172a 100%);
    border: 2px solid #2a3f5f;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    color: white;
    font-family: sans-serif;
}

.create-mode-tile:hover {
    border-color: #4ecdc4;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.3);
}

.create-mode-tile .mode-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.create-mode-tile .mode-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #4ecdc4;
}

.create-mode-tile .mode-description {
    font-size: 14px;
    color: #aaa;
    line-height: 1.4;
}

.create-screen {
    padding: 12px;
}

/* Modal for model selection */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right:0; bottom:0;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal {
    background: #1a2332;
    border: 2px solid #4ecdc4;
    border-radius: 12px;
    padding: 24px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.modal h3 {
    margin: 0 0 16px 0;
    color: #4ecdc4;
    font-size: 1.3em;
    text-align: center;
}

.model-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.model-option-btn {
    background: linear-gradient(135deg, #253347 0%, #17202e 100%);
    border: 2px solid #2a3654;
    color: #fff;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color .2s, transform .15s;
}

.model-option-btn:hover {
    border-color: #4ecdc4;
    transform: translateY(-2px);
}

.modal-cancel {
    width: 100%;
    margin-top: 4px;
}

.btn-back {
    background-color: #555;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 15px;
    transition: background-color 0.2s;
}

.btn-back:hover {
    background-color: #777;
}

.source-card {
    background: linear-gradient(135deg, #1a2332 0%, #11172a 100%);
    border: 2px solid #2a3f5f;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    color: white;
}

.source-card h3 {
    margin-top: 0;
    color: #4ecdc4;
    font-size: 20px;
    margin-bottom: 15px;
}

.source-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
}

.source-info div {
    padding: 5px 0;
}

.source-info strong {
    color: #aaa;
    margin-right: 8px;
}

.batch-counter {
    background: linear-gradient(135deg, #1a2332 0%, #11172a 100%);
    border: 2px solid #4ecdc4;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.batch-counter .counter-label {
    color: #aaa;
    font-size: 14px;
    margin-bottom: 10px;
}

.batch-counter .counter-value {
    color: #4ecdc4;
    font-size: 48px;
    font-weight: 700;
}

.batch-status {
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.batch-status.success {
    background-color: rgba(0, 192, 35, 0.2);
    border: 2px solid #00c023;
    color: #00c023;
}

.batch-status.error {
    background-color: rgba(255, 0, 0, 0.2);
    border: 2px solid #ff0000;
    color: #ff0000;
}

.batch-status.info {
    background-color: rgba(78, 205, 196, 0.2);
    border: 2px solid #4ecdc4;
    color: #4ecdc4;
}

/* Event status styles for mobile edit page */
.event-status-container {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.status-header {
    text-align: center;
    margin-bottom: 30px;
}

.status-header h1 {
    color: #4ecdc4;
    margin: 0 0 15px 0;
    font-size: 24px;
}

.event-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.event-name {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

.event-state {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.active-state {
    background: #4caf50;
    color: white;
}

.deploy-state {
    background: #ff9800;
    color: white;
}

.rollback-state {
    background: #f44336;
    color: white;
}

/* Work in Progress styles */
.work-in-progress {
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 40px 20px;
    margin: 20px 0;
}

.wip-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.work-in-progress h2 {
    color: #4ecdc4;
    margin: 0 0 15px 0;
    font-size: 20px;
}

.work-in-progress p {
    color: #cccccc;
    margin: 8px 0;
    font-size: 16px;
}

.status-details {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

.stat-label {
    color: #cccccc;
    font-size: 14px;
}

.stat-value {
    color: #4ecdc4;
    font-weight: 600;
}

/* Sublocation list styles */
.sublocation-list, .rollout-list {
    margin-top: 20px;
}

.loading-message {
    text-align: center;
    padding: 40px 20px;
    color: #cccccc;
}

.loading-spinner {
    font-size: 24px;
    margin-bottom: 10px;
}

.sublocation-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    border-left: 4px solid #4ecdc4;
    animation: fadeIn 0.3s ease-out;
}

.sublocation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.sublocation-name {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
}

.sublocation-actions {
    display: flex;
    gap: 8px;
}

.btn-map {
    background: #2196f3;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-map:hover {
    background: #1976d2;
}

.btn-select {
    background: #4caf50;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-select:hover {
    background: #388e3c;
}

.planned-items {
    margin-top: 12px;
}

.planned-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.item-info {
    display: flex;
    flex-direction: column;
}

.item-tag {
    color: #4ecdc4;
    font-size: 14px;
    font-weight: 500;
}

.item-name {
    color: #cccccc;
    font-size: 12px;
}

.item-status {
    font-size: 18px;
}

.deployed {
    color: #4caf50;
}

.planned {
    color: #ffeb3b;
}

/* Animation for modal and overlays */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.event-status-container {
    animation: slideInUp 0.3s ease-out;
}

/* Event mode timeout styles */
.event-mode-indicator {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    padding: 8px 15px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    position: relative;
}

.event-indicator-icon {
    font-size: 14px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.event-indicator-text {
    font-weight: 600;
    flex: 1;
    text-align: center;
}

.event-indicator-timeout {
    font-size: 10px;
    opacity: 0.8;
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 6px;
    border-radius: 10px;
}

.timeout-warning, .timeout-expired {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.timeout-content {
    background: #1a1a1a;
    border: 2px solid #ff9800;
    border-radius: 12px;
    padding: 30px;
    max-width: 300px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.timeout-content h3 {
    margin: 0 0 15px 0;
    color: #ff9800;
    font-size: 18px;
}

.timeout-content p {
    margin: 8px 0;
    color: #ccc;
    font-size: 14px;
    line-height: 1.4;
}

.timeout-countdown {
    font-size: 32px;
    font-weight: bold;
    color: #ff9800;
    margin-top: 15px;
    animation: countdownPulse 1s infinite;
}

@keyframes countdownPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.timeout-expired .timeout-content {
    border-color: #f44336;
}

.timeout-expired .timeout-content h3 {
    color: #f44336;
}
