:root {
    --primary: #f2d726;
    /* Pegasus Yellow */
    --secondary: #003399;
    /* Pegasus Blue */
    --text-dark: #1a1a1a;
    --text-light: #666;
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --card-bg: rgba(255, 255, 255, 0.9);
    --glass: rgba(255, 255, 255, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-dark);
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    background: var(--glass);
    backdrop-filter: blur(15px);
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--secondary);
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.logo span {
    color: var(--text-dark);
}

h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.main-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.search-section {
    flex: 0 0 350px;
}

.fleet-section {
    flex: 1;
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.fleet-section h2 {
    font-size: 1rem;
    color: var(--secondary);
}

.fleet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.reset-btn {
    display: none !important;
    width: auto !important;
    margin-top: 0 !important;
    padding: 6px !important;
    background: transparent !important;
    color: var(--text-light) !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    opacity: 0.6;
}

.reset-btn:hover {
    background: #fff0f0 !important;
    color: #dc3545 !important;
    border-color: #f5c6cb !important;
    opacity: 1;
    transform: rotate(-30deg) !important;
}

.fleet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));
    gap: 6px;
}

.fleet-item {
    padding: 7px 5px;
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 4px;
    text-align: center;
    font-size: 9px;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fleet-name,
.fleet-registration {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fleet-name {
    font-size: 11px;
}

.fleet-registration {
    margin-top: 2px;
}

.fleet-item:hover {
    background: #e9ecef;
    transform: scale(1.1);
    z-index: 10;
}

.fleet-item.active {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(0, 51, 153, 0.3);
}

.fleet-item.boarded {
    background: #FEC919;
    color: var(--secondary);
    border-color: #d4a715;
}

.fleet-item .board-count {
    position: absolute;
    top: 0;
    right: 0;
    background: #dc3545;
    color: white;
    font-size: 7px;
    padding: 1px 3px;
    border-radius: 4px;
    border: 1px solid white;
}

.board-btn {
    margin-top: 1.5rem !important;
    background: #FEC919 !important;
    color: var(--secondary) !important;
}

.board-btn:hover {
    box-shadow: 0 5px 15px rgba(254, 201, 25, 0.4) !important;
}

.fleet-stats {
    margin-top: 10px;
    font-size: 0.75rem;
    color: var(--text-light);
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    opacity: 0.8;
}

.fleet-stats span {
    background: rgba(0, 0, 0, 0.03);
    padding: 2px 8px;
    border-radius: 4px;
}

.source-badge {
    margin-top: 1rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    text-align: right;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
}

label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary);
    margin-left: 4px;
}

input {
    padding: 0.8rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(0, 51, 153, 0.1);
}

.row {
    display: flex;
    gap: 1rem;
}

button {
    margin-top: 1rem;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    background: var(--primary);
    color: var(--secondary);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(242, 215, 38, 0.4);
}

button:active {
    transform: translateY(0);
}

.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 51, 153, 0.2);
    border-top: 3px solid var(--secondary);
    border-radius: 50%;
    display: none;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.result-container {
    margin-top: 2rem;
    animation: fadeIn 0.5s ease;
}

.result-container.hidden {
    display: none;
}

.result-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.badge {
    background: var(--secondary);
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 700;
}

.date-text {
    font-size: 0.85rem;
    color: var(--text-light);
}

.info-item {
    margin-bottom: 1rem;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item label {
    margin-left: 0;
    display: block;
    margin-bottom: 0.2rem;
}

.value {
    font-size: 1.2rem;
    font-weight: 700;
}

.highlight .value {
    color: var(--secondary);
    font-size: 1.5rem;
}

.info-detail {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: -5px;
    margin-bottom: 10px;
    font-weight: 500;
}

.history-section {
    margin-top: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.section-header h2 {
    font-size: 1rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.history-table-container {
    overflow-y: auto;
    transition: max-height 0.4s ease-out, opacity 0.3s ease;
    max-height: 400px;
}

.history-table-container.collapsed {
    max-height: 0;
    opacity: 0;
}

.toggle-icon {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    color: var(--secondary);
}

.toggle-icon.rotated {
    transform: rotate(-90deg);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

th {
    text-align: left;
    padding: 8px;
    border-bottom: 2px solid #f0f0f0;
    color: var(--secondary);
    font-weight: 700;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

td {
    padding: 6px 8px;
    border-bottom: 1px solid #f0f0f0;
}

tr:hover td {
    background-color: #fcfcfc;
}

.delete-entry-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 2px 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
    opacity: 0.5;
}

.delete-entry-btn:hover {
    background: #fff0f0;
    opacity: 1;
    transform: scale(1.2);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .main-layout {
        flex-direction: column;
        align-items: center;
    }

    .search-section {
        width: 100%;
        max-width: 500px;
    }

}
.registration-editor {
    min-width: 8rem;
    margin-bottom: 0.4rem;
}

.registration-editor summary {
    cursor: pointer;
    white-space: nowrap;
}

.registration-editor input,
.registration-editor button {
    display: block;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
}

.registration-editor [role="status"] {
    margin-top: 0.35rem;
    font-size: 0.8rem;
}


.board-status:empty {
    display: none;
}

.board-status {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
}
