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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #FFFFFF;
    color: #333333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

header {
    text-align: center;
    margin-bottom: 32px;
}

header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #333333;
}

header h1::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 28px;
    background: #14CEDB;
    border-radius: 4px;
    margin-right: 12px;
    vertical-align: middle;
}

.subtitle {
    color: #888;
    font-size: 15px;
    margin-top: 6px;
}

.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    border-bottom: 2px solid #F5F5F5;
}

.tab {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 500;
    color: #999;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab:hover {
    color: #333;
}

.tab.active {
    color: #14CEDB;
    border-bottom-color: #14CEDB;
}

.input-section {
    background: #FFFFFF;
    border: 1px solid #eee;
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.upload-area {
    border: 2px dashed #14CEDB;
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f9feff;
}

.upload-area:hover,
.upload-area.dragover {
    background: #edf9fa;
    border-color: #0fb8c4;
}

.upload-icon {
    margin-bottom: 12px;
}

.upload-area p {
    font-size: 15px;
    color: #555;
}

.upload-hint {
    font-size: 13px !important;
    color: #aaa !important;
    margin-top: 4px;
}

.image-preview {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eee;
}

.image-preview img {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    display: block;
    background: #f9f9f9;
}

.image-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.preview-card {
    position: relative;
    width: calc(50% - 6px);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #eee;
    background: #f9f9f9;
}

.preview-card img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    display: block;
}

.preview-label {
    position: absolute;
    top: 6px;
    left: 6px;
    background: #14CEDB;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.btn-remove-preview {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-remove-preview:hover {
    background: rgba(211,47,47,0.8);
}

.btn-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

textarea {
    width: 100%;
    min-height: 200px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 14px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}

textarea:focus {
    border-color: #14CEDB;
}

.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 16px;
    padding: 14px;
    background: #14CEDB;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #11b5c1;
}

.btn-primary:disabled {
    background: #b0e8ed;
    cursor: not-allowed;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-msg {
    background: #fff0f0;
    color: #d32f2f;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid #fdd;
}

.edit-section {
    background: #FFFFFF;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 28px 24px;
    margin-bottom: 24px;
}

.edit-section h2 {
    font-size: 20px;
    margin-bottom: 4px;
    color: #333;
}

.edit-hint {
    font-size: 13px;
    color: #999;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #F5F5F5;
}

.form-group:last-of-type {
    border-bottom: none;
}

.form-group h3 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #14CEDB;
    margin-bottom: 14px;
}

.field-row {
    display: flex;
    gap: 12px;
}

.field {
    flex: 1;
    margin-bottom: 12px;
}

.field.full-width {
    width: 100%;
    margin-bottom: 12px;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    margin-bottom: 4px;
}

input[type="text"],
input[type="date"],
input[type="time"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    background: #FFFFFF;
}

input:focus {
    border-color: #14CEDB;
}

.item-row {
    background: #F5F5F5;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 10px;
    position: relative;
}

.item-row .item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.item-number {
    font-size: 13px;
    font-weight: 600;
    color: #14CEDB;
}

.btn-remove-item {
    background: none;
    border: none;
    color: #d32f2f;
    font-size: 13px;
    cursor: pointer;
    padding: 2px 8px;
}

.btn-remove-item:hover {
    text-decoration: underline;
}

.item-fields {
    display: grid;
    grid-template-columns: 2fr 1.5fr 0.7fr 1fr;
    gap: 10px;
}

.btn-add {
    background: none;
    border: 1px dashed #14CEDB;
    color: #14CEDB;
    padding: 10px;
    width: 100%;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-add:hover {
    background: #f0fcfd;
}

.btn-confirm {
    display: block;
    width: 100%;
    padding: 14px;
    background: #34C759;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-confirm:hover {
    background: #2db84d;
}

.json-section {
    background: #FFFFFF;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 28px 24px;
}

.json-section h2 {
    font-size: 20px;
    margin-bottom: 14px;
    color: #333;
}

.json-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.btn-copy,
.btn-download {
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy {
    background: #14CEDB;
    color: white;
    border: none;
}

.btn-copy:hover {
    background: #11b5c1;
}

.btn-download {
    background: white;
    color: #14CEDB;
    border: 1px solid #14CEDB;
}

.btn-download:hover {
    background: #f0fcfd;
}

pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #FFFFFF;
    border: 1px solid #eee;
    border-radius: 16px;
    padding: 40px 32px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-logo {
    width: 64px;
    height: auto;
    margin-bottom: 12px;
}

.header-logo {
    width: 56px;
    height: auto;
    margin-bottom: 8px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.login-header h1::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 24px;
    background: #14CEDB;
    border-radius: 3px;
    margin-right: 10px;
    vertical-align: middle;
}

.login-header p {
    color: #888;
    font-size: 14px;
    margin-top: 8px;
}

.login-error {
    background: #fff0f0;
    color: #d32f2f;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid #fdd;
    text-align: center;
}

.login-field {
    margin-bottom: 20px;
}

.login-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    margin-bottom: 6px;
}

.login-field input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.login-field input:focus {
    border-color: #14CEDB;
}

.login-form .btn-primary {
    margin-top: 4px;
}

.top-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #888;
}

.worker-badge {
    background: #F5F5F5;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    color: #555;
}

.btn-logout {
    background: none;
    border: 1px solid #ddd;
    color: #888;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-logout:hover {
    border-color: #d32f2f;
    color: #d32f2f;
}

@media (max-width: 600px) {
    .field-row {
        flex-direction: column;
        gap: 0;
    }

    .item-fields {
        grid-template-columns: 1fr 1fr;
    }

    .tabs {
        font-size: 14px;
    }
}
