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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f2f5;
    color: #1a1a2e;
    line-height: 1.6;
    min-height: 100vh;
}

.header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 32px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.header-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-icon {
    color: #e94560;
    flex-shrink: 0;
}

.header-icon svg {
    filter: drop-shadow(0 0 8px rgba(233, 69, 96, 0.4));
}

h1 {
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
    margin: 0;
    line-height: 1.2;
}

.header-subtitle {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 2px;
}

.main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 24px 60px;
}

.instructions-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.instructions-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #e94560;
    margin-bottom: 10px;
}

.instructions-list {
    padding-left: 20px;
    font-size: 14px;
    color: #555;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 32px;
}

.instructions-list li {
    min-width: 200px;
}

.instructions-list li strong {
    color: #1a1a2e;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    user-select: none;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: #1a1a2e;
    color: #fff;
}

.btn-primary:hover {
    background: #16213e;
    box-shadow: 0 4px 12px rgba(26, 26, 46, 0.3);
}

.btn-accent {
    background: #e94560;
    color: #fff;
}

.btn-accent:hover {
    background: #d63851;
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.35);
}

.btn-secondary {
    background: #0f3460;
    color: #fff;
}

.btn-secondary:hover {
    background: #0c2a4d;
    box-shadow: 0 4px 12px rgba(15, 52, 96, 0.3);
}

.btn-ghost {
    background: transparent;
    color: #888;
    border: 1px solid #ddd;
}

.btn-ghost:hover {
    background: #f5f5f5;
    color: #e94560;
    border-color: #e94560;
}

.status-bar {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    color: #888;
    transition: all 0.3s ease;
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.status-bar::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    flex-shrink: 0;
}

.status-bar:not(:empty)::before {
    background: #e94560;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
    font-size: 14px;
}

thead {
    background: #f8f9fc;
}

th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #1a1a2e;
    border-bottom: 2px solid #e8ecf1;
}

td {
    padding: 11px 16px;
    border-bottom: 1px solid #f0f2f5;
    color: #333;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: #f8f9fc;
}

tbody tr:nth-child(even) {
    background: #fafbfc;
}

tbody tr:nth-child(even):hover {
    background: #f0f2f8;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: #fff;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    text-align: center;
    min-width: 320px;
    animation: slideUp 0.25s ease;
}

.modal h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.modal p {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.modal-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 500;
    outline: none;
    transition: border-color 0.2s ease;
    margin-bottom: 16px;
    text-align: center;
}

.modal-input:focus {
    border-color: #e94560;
}

.modal-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 32px;
    border: none;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #e94560;
    color: #fff;
}

.modal-btn:hover {
    background: #d63851;
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.35);
    transform: translateY(-1px);
}

.modal-btn:active {
    transform: scale(0.97);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 640px) {
    .header {
        padding: 24px 16px;
    }

    h1 {
        font-size: 20px;
    }

    .main {
        padding: 20px 16px 40px;
    }

    .toolbar {
        flex-direction: column;
    }

    .btn {
        justify-content: center;
        width: 100%;
    }

    .instructions-list {
        flex-direction: column;
        gap: 4px;
    }

    .modal {
        min-width: unset;
        width: calc(100% - 32px);
        padding: 24px;
    }
}
