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

body {
    font-family: sans-serif;
    color: #333;
}

header {
    padding: 1rem;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

nav a {
    text-decoration: none;
    font-weight: bold;
    color: #333;
}

main {
    padding: 2rem;
}

.auth-box {
    max-width: 400px;
    margin: 4rem auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-box h1 {
    font-size: 1.5rem;
}

.hint {
    font-size: 0.8rem;
    color: #888;
    line-height: 1.4;
}

.error {
    color: #c0392b;
    background: #fdecea;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 0.5rem 1rem;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: #2a9d8f;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn:hover {
    background: #21867a;
}

.tours-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.tours-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tour-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fafafa;
}

.tour-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tour-name {
    font-weight: bold;
}

.tour-status {
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #f5f5f5;
    color: #888;
}

.tour-date {
    font-size: 0.8rem;
    color: #999;
}

.blocks-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0;
}

.block-protected-badge {
    font-size: 0.75rem;
    font-weight: normal;
    color: #888;
    margin-left: 0.5rem;
}

.msg-order {
    font-size: 0.75rem;
    color: #bbb;
    min-width: 1.5rem;
    text-align: right;
    margin-right: 0.6rem;
    flex-shrink: 0;
}

.msg-line {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.block-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fafafa;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s, border-color 0.15s;
}

.block-card:hover {
    background: #f0faf9;
    border-color: #29a89d;
}

.block-card .block-name {
    font-weight: bold;
}

.block-card .block-meta {
    font-size: 0.85rem;
    color: #888;
}

.tours-empty {
    text-align: center;
    padding: 3rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #888;
}


.flash-warning {
    background: #fff8e1;
    border: 1px solid #f9a825;
    border-radius: 4px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    color: #5d4037;
}

.pending-blocks-notice {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 4px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 0.25rem 0.6rem;
    font-size: 0.85rem;
}

.integrity-ok {
    font-size: 1.2rem;
    padding: 2rem 0;
    color: #2e7d32;
}

.integrity-group {
    margin-bottom: 1.5rem;
}

.integrity-group-title {
    font-size: 1rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.integrity-list {
    list-style: none;
}

.integrity-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 0.4rem;
    background: #fff;
}

.integrity-item:has(.btn-sm[href*="blocks"]) {
    border-left: 3px solid #fb8c00;
}

.integrity-item:not(:has(.btn-sm[href*="blocks"])) {
    border-left: 3px solid #e53935;
}

.integrity-desc {
    flex: 1;
    font-size: 0.95rem;
}

/* Button variants */
.btn-secondary {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-danger {
    background: #e53935;
    color: #fff;
    border: none;
    cursor: pointer;
}

.btn-danger:hover {
    background: #c62828;
}

/* Edit form */
.edit-form {
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: bold;
    color: #555;
}

.form-control {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #fff;
    width: 100%;
}

.form-control:focus {
    outline: none;
    border-color: #2a9d8f;
}

.form-control:disabled {
    background: #f5f5f5;
    color: #888;
}

textarea.form-control {
    resize: vertical;
    min-height: 6rem;
    overflow-y: hidden;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.form-actions-delete {
    margin-left: auto;
}
