:root {
--text-dark: #1c1c1e;
--text-secondary: #6c757d;
--background-light: #f0f2f5;
--card-background: #ffffff;
--border-color: #e9ecef;
--primary-blue: #007aff;
--primary-green: #34c759;
--primary-red: #ff3b30;
--primary-orange: #ff9500;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
display: flex;
flex-direction: column;
min-height: 100vh;
background: var(--background-light);
color: var(--text-dark);
}
main {
flex: 1;
padding: 1.5rem;
max-width: 960px;
margin: 0 auto;
width: 100%;
}
/* City Search Styles */
.city-search-container {
    background: var(--card-background);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.city-search-input {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    background: #f9f9f9;
    margin-bottom: 1rem;
}
.freq-cities {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.city-chip {
    padding: 0.5rem 1rem;
    background: #eef1f5;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: 500;
}
.city-chip:hover, .city-chip.active {
    background: var(--primary-blue);
    color: white;
}

.btn-translate-link {
    display: inline-block;
    padding: 0.7rem 1.2rem;
    background: var(--text-dark);
    color: white;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}
.btn-translate-link:hover {
    opacity: 0.8;
}

/* CEO Upload Block */
.ceo-upload-block {
    background: var(--card-background);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: none; /* Hidden by default until city selected */
    border-left: 5px solid var(--primary-green);
}
.ceo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ceo-title-h {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}
.ceo-status {
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.btn-upload-xlsx {
    margin-top: 1rem;
    display: inline-block;
    background: var(--text-dark);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: opacity 0.2s;
}
.btn-upload-xlsx:hover { opacity: 0.8; }

/* District List Styles */
#search-input {
width: 100%;
padding: 1rem;
border: 1px solid var(--border-color);
border-radius: 12px;
background: var(--card-background);
color: var(--text-dark);
font-size: 1rem;
outline: none;
margin-bottom: 2rem;
transition: border-color 0.2s, box-shadow 0.2s;
}
#search-input:focus {
border-color: var(--primary-blue);
box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2);
}
.districts-list {
display: flex;
flex-direction: column;
gap: 1rem;
}
.district-card {
background: var(--card-background);
border-radius: 26px;
box-shadow: 0 4px 12px rgba(0,0,0,0.05);
padding: 1.5rem;
overflow: hidden;
}

/* UPDATED HEADER STYLES FOR ALIGNMENT */
.district-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.district-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Vertically center name and button */
    gap: 1rem;
    line-height: 1; /* Normalize line height for alignment */
    margin-bottom: 0.25rem; /* Slight spacing before badges */
}
.district-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}

/* --- Description Badges --- */
.description-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    width: fit-content;
}
.badge-success {
    background-color: rgba(40, 167, 69, 0.15);
    color: #28a745;
}
.badge-error {
    background-color: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}


.btn {
padding: 0.6rem 1rem;
border: none;
border-radius: 8px;
cursor: pointer;
font-size: 0.9rem;
font-weight: 600;
transition: all 0.2s;
}
.btn-edit { 
    background: #f0f0f0; 
    color: var(--text-dark);
    margin: 0; /* Remove margins */
    align-self: center; /* Ensure button centers in flex container */
    flex-shrink: 0; /* Prevent button from shrinking */
}
.btn-edit:hover { background: #e0e0e0; }
.btn-save { background: var(--primary-green); color: white; }
.btn-save:hover { background: #28a745; }
.btn-cancel { background: #6c757d; color: white; }
.btn-cancel:hover { background: #5a6268; }

.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
gap: 1rem;
margin-top: 1.5rem;
}
.stat-item {
background: #f8f9fa;
border-radius: 12px;
padding: 0.75rem 0.5rem;
text-align: center;
}
.stat-item .label {
font-size: 0.8rem;
color: var(--text-secondary);
margin-bottom: 0.25rem;
display: block;
}
.stat-item .value {
font-size: 1.5rem;
font-weight: 600;
}
.edit-area {
margin-top: 1.5rem;
padding-top: 1.5rem;
border-top: 1px solid var(--border-color);
}
.section-title {
font-size: 1rem;
font-weight: 600;
color: var(--text-dark);
margin-bottom: 1rem;
}
.edit-area textarea {
width: 100%;
min-height: 400px; /* Increased size for better editing */
padding: 1rem;
border-radius: 12px;
border: 1px solid var(--border-color);
font-size: 1rem;
line-height: 1.5;
resize: vertical;
font-family: inherit;
}
.edit-area textarea:focus {
outline: none;
border-color: var(--primary-blue);
box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2);
}
.edit-actions {
display: flex;
gap: 0.75rem;
margin-top: 1rem;
justify-content: flex-end;
}
.photo-gallery {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
gap: 1rem;
margin-top: 1rem;
}
.photo-thumbnail {
position: relative;
width: 100%;
padding-top: 100%;
border-radius: 12px;
overflow: hidden;
background: #f0f0f0;
cursor: pointer;
border: 3px solid transparent;
transition: border-color 0.2s;
}
.photo-thumbnail img {
position: absolute;
top: 0; left: 0;
width: 100%; height: 100%;
object-fit: cover;
}
.photo-thumbnail.main-photo {
border-color: var(--primary-green);
}
.main-photo-badge, .delete-photo-btn {
position: absolute;
z-index: 2;
}
.main-photo-badge {
top: 6px; left: 6px;
background: rgba(40, 167, 69, 0.8);
color: white;
padding: 4px 8px;
border-radius: 6px;
font-size: 0.7rem;
font-weight: 600;
backdrop-filter: blur(2px);
}
.delete-photo-btn {
top: 6px; right: 6px;
width: 24px; height: 24px;
background: rgba(0,0,0,0.5);
border: none;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: white;
cursor: pointer;
}
.delete-photo-btn:hover { background: var(--primary-red); }
.delete-photo-btn svg { width: 14px; height: 14px; }
.upload-btn-container {
margin-top: 1rem;
}
.upload-btn {
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
width: 100%;
padding: 0.75rem;
background: #f8f9fa;
border: 1px dashed #ced4da;
border-radius: 12px;
cursor: pointer;
transition: background 0.2s;
}
.upload-btn:hover { background: #e9ecef; }
.upload-btn span { font-weight: 500; }
.upload-btn svg {
width: 20px; height: 20px;
}
#status-message {
position: fixed;
top: 20px;
left: 50%;
transform: translateX(-50%);
padding: 1rem 2rem;
border-radius: 8px;
color: white;
font-weight: 600;
z-index: 9999;
opacity: 0;
transition: opacity 0.3s, top 0.3s;
pointer-events: none;
}
#status-message.success { background-color: var(--primary-green); }
#status-message.error { background-color: var(--primary-red); }
#status-message.visible {
opacity: 1;
top: 80px;
}
.title-container {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 2rem;
}
.main-title {
font-size: 2rem;
font-weight: 700;
}
.main-title span {
display: block;
}
.back-link {
display: flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
border-radius: 50%;
background: var(--card-background);
color: var(--text-dark);
text-decoration: none;
transition: background 0.2s;
}
.back-link:hover {
background: #e9ecef;
}