body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background-color: #f2f2f7; margin: 0; padding: 15px; padding-bottom: 40px; color: #1c1c1e; }
.container { max-width: 1000px; margin: 0 auto; }
h1 { font-size: 24px; text-align: center; margin-top: 10px; margin-bottom: 20px; }
h2 { font-size: 20px; margin-top: 30px; border-bottom: 2px solid #ccc; padding-bottom: 5px; }
h3 { font-size: 16px; color: #007aff; margin-top: 20px; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; }

.form-group { margin-bottom: 15px; }
.form-row { display: flex; gap: 10px; margin-bottom: 15px; align-items: flex-start; }
.form-row .form-group { margin-bottom: 0; }

@media (max-width: 600px) { 
    .form-row:not(.med-row) { flex-direction: column; gap: 0; } 
    .form-row:not(.med-row) .form-group { margin-bottom: 15px; } 
}

label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; color: #3a3a3c; white-space: nowrap; }
input, textarea, select { width: 100%; padding: 12px; border: 1px solid #d1d1d6; border-radius: 10px; box-sizing: border-box; font-size: 16px; background-color: #ffffff; -webkit-appearance: none; }
select:disabled { background-color: #e5e5ea; color: #8e8e93; }

button { width: 100%; padding: 14px; background-color: #34c759; color: white; border: none; border-radius: 10px; font-size: 17px; font-weight: bold; cursor: pointer; margin-top: 10px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
button:active { opacity: 0.8; }

.sync-btn { background-color: #007aff; margin-bottom: 10px; }
.export-btn { background-color: #007aff; margin-top: 20px; }
.report-btn { background-color: #8e8e93; }

.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; background-color: #ffffff; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); border: 1px solid #e5e5ea; margin-top: 10px; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: 15px; }
th, td { padding: 12px 15px; text-align: left; border-bottom: 1px solid #e5e5ea; vertical-align: middle; }
th { background-color: #f8f8f8; font-weight: 600; color: #8e8e93; text-transform: uppercase; font-size: 12px; letter-spacing: 0.5px; }
tr:last-child td { border-bottom: none; }

.history-badge { background-color: #e5f0ff; color: #007aff; padding: 3px 6px; border-radius: 12px; font-size: 11px; margin-left: 6px; font-weight: bold; }

.action-buttons { display: flex; gap: 6px; }
.action-buttons button { margin-top: 0; padding: 8px 12px; font-size: 14px; border-radius: 8px; box-shadow: none; width: auto; }
.edit-btn { background-color: #ffcc00; color: #1c1c1e; }
.delete-btn { background-color: #ff3b30; }

.search-bar { margin-bottom: 15px; border: 2px solid #007aff; }
.tag-alert { margin-top: 8px; padding: 10px; border-radius: 6px; display: none; }

.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.6); }
.modal-content { background-color: #ffffff; margin: 20% auto; padding: 20px; border-radius: 16px; width: 85%; max-width: 400px; box-shadow: 0 10px 20px rgba(0,0,0,0.2); }
.close-modal { color: #8e8e93; float: right; font-size: 28px; font-weight: bold; line-height: 20px; cursor: pointer; }
.report-stat { font-size: 16px; margin-bottom: 12px; border-bottom: 1px solid #f2f2f7; padding-bottom: 12px; }
.report-tags { font-family: monospace; background: #f2f2f7; padding: 10px; border-radius: 8px; margin-top: 8px; word-wrap: break-word; }