* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, 'Segoe UI', Roboto, sans-serif;
}
body {
    background: #f4f7fc;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}
.app {
    max-width: 1400px;
    width: 100%;
    background: white;
    border-radius: 28px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    padding: 24px 28px;
    transition: all 0.2s;
    position: relative;
}
h1 {
    font-size: 26px;
    font-weight: 600;
    color: #0b2942;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.subhead {
    color: #4a5f73;
    margin-bottom: 28px;
    border-left: 4px solid #2a7de1;
    padding-left: 16px;
    font-weight: 400;
    font-size: 15px;
    background: #f0f5fe;
    border-radius: 0 12px 12px 0;
    line-height: 1.6;
}
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 30px;
    align-items: center;
    margin-bottom: 28px;
    background: #f9fafc;
    padding: 16px 20px;
    border-radius: 40px;
}
.user-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.user-badge {
    background: #1e3b5c;
    color: white;
    padding: 6px 16px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 500;
}
.action-group {
    display: flex;
    gap: 10px;
    margin-left: auto;
    flex-wrap: wrap;
}
.btn {
    background: white;
    border: 1px solid #cbd8e8;
    padding: 8px 18px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 500;
    color: #1f3a57;
    cursor: pointer;
    transition: 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.btn-primary {
    background: #1e3b5c;
    border-color: #1e3b5c;
    color: white;
}
.btn-primary:hover {
    background: #143049;
}
.btn-outline {
    background: transparent;
    border: 1px dashed #7f96b0;
}
.btn-outline:hover {
    background: #eef3fa;
}
.btn-success {
    background: #1f8b4c;
    border-color: #1f8b4c;
    color: white;
}
.btn-success:hover {
    background: #16703d;
}
.btn-danger {
    background: #c74343;
    border-color: #b33a3a;
    color: white;
}
.btn-danger:hover {
    background: #a83232;
}
.btn-logout {
    background: #6c7a8d;
    border-color: #5a6a7e;
    color: white;
}
.btn-logout:hover {
    background: #4e5d6e;
}
.btn-warning {
    background: #d98c2e;
    border-color: #c47a20;
    color: white;
}
.btn-warning:hover {
    background: #b8731c;
}
.table-wrapper {
    overflow-x: auto;
    margin-top: 8px;
    border-radius: 18px;
    border: 1px solid #e9edf3;
    background: white;
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 700px;
}
th {
    background: #f2f6fd;
    color: #1e3b5c;
    font-weight: 600;
    padding: 14px 12px;
    text-align: left;
    border-bottom: 2px solid #d7e0ea;
    white-space: nowrap;
}
td {
    padding: 12px 12px;
    border-bottom: 1px solid #e9edf3;
    vertical-align: middle;
}
tr:last-child td {
    border-bottom: none;
}
.code-cell {
    font-weight: 500;
    color: #0b2942;
    white-space: nowrap;
}
.process-select {
    padding: 6px 10px;
    border-radius: 30px;
    border: 1px solid #cad5e3;
    background: white;
    font-size: 13px;
    width: 150px;
    cursor: pointer;
}
.process-select:disabled {
    background: #f1f4f9;
    color: #5a6f84;
    cursor: not-allowed;
}
.progress-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
}
.progress-bar-bg {
    width: 100px;
    height: 6px;
    background: #e0e7ef;
    border-radius: 20px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: #2a7de1;
    border-radius: 20px;
    transition: width 0.2s;
}
.readonly-badge {
    background: #eef2f7;
    padding: 2px 10px;
    border-radius: 30px;
    font-size: 11px;
    color: #4a5f73;
}
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(2px);
    justify-content: center;
    align-items: center;
    z-index: 999;
}
.modal-card {
    background: white;
    border-radius: 32px;
    padding: 30px 36px;
    max-width: 460px;
    width: 90%;
    box-shadow: 0 30px 60px rgba(0,0,0,0.2);
}
.modal-card h3 {
    font-size: 20px;
    margin-bottom: 18px;
    color: #0b2942;
}
.modal-card label {
    font-weight: 500;
    font-size: 14px;
    color: #1f3a57;
    display: block;
    margin-top: 16px;
    margin-bottom: 4px;
}
.modal-card input,
.modal-card select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccd8e6;
    border-radius: 40px;
    font-size: 14px;
}
.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 28px;
}
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #1e3b5c;
    color: white;
    padding: 14px 28px;
    border-radius: 60px;
    font-size: 14px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    opacity: 0;
    transform: translateY(10px);
    transition: 0.25s ease;
    pointer-events: none;
    z-index: 1000;
}
.toast.show {
    opacity: 1;
    transform: translateY(0);
}
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    transition: opacity 0.3s;
}
.login-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}
.login-card {
    background: white;
    border-radius: 40px;
    padding: 40px 50px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
}
.login-card h2 {
    margin-bottom: 24px;
    color: #0b2942;
    text-align: center;
}
.login-card label {
    font-weight: 500;
    font-size: 14px;
    color: #1f3a57;
    display: block;
    margin-top: 16px;
    margin-bottom: 4px;
}
.login-card input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #ccd8e6;
    border-radius: 40px;
    font-size: 14px;
}
.login-card .btn {
    width: 100%;
    justify-content: center;
    margin-top: 24px;
    padding: 12px;
}
.login-error {
    color: #c74343;
    font-size: 13px;
    margin-top: 8px;
    text-align: center;
}
.login-footer {
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
    color: #7a8fa5;
}
@media (max-width: 700px) {
    .app {
        padding: 16px;
    }
    .toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .action-group {
        margin-left: 0;
    }
}