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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    padding: 16px;
    min-height: 100vh;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

h1 {
    text-align: center;
    margin-bottom: 24px;
    color: #0088cc;
    font-size: 24px;
}

.form-container {
    width: 100%;
}

#messageInput {
    width: 100%;
    height: 150px;
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 16px;
    resize: vertical;
    margin-bottom: 20px;
    outline: none;
    transition: border-color 0.3s;
}

#messageInput:focus {
    border-color: #0088cc;
}

.button-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.attachment-container {
    margin-bottom: 15px;
}

.photo-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.photo-preview {
    position: relative;
    width: 100px;
    height: 100px;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.remove-photo-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background-color: #ff6b6b;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

button {
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s;
    outline: none;
}

#attachPhotoButton {
    background-color: #f0f0f0;
    color: #333;
}

#attachPhotoButton:hover {
    background-color: #e0e0e0;
}

.location-select {
    width: 100%;
    padding: 16px;
    margin-bottom: 8px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    background-color: white;
    cursor: pointer;
}

.location-select:focus {
    border-color: #0088cc;
}

.location-hint {
    color: #ff6b6b;
    font-size: 14px;
    margin-bottom: 16px;
    text-align: center;
    display: block;
}

#sendMessageButton {
    background-color: #0088cc;
    color: white;
}

#sendMessageButton:hover {
    background-color: #0066aa;
}

.status-message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    display: none;
}

.status-message.success {
    background-color: #d4edda;
    color: #155724;
    display: block;
}

.status-message.error {
    background-color: #f8d7da;
    color: #721c24;
    display: block;
}

.progress-container {
    margin-top: 20px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar-fill {
    height: 100%;
    background-color: #0088cc;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 14px;
    color: #666;
}

.admin-panel {
    padding: 20px;
    text-align: center;
}

.admin-panel p {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
}

.controls {
    margin-bottom: 24px;
    display: flex;
    gap: 16px;
    align-items: center;
}

.controls select {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    background-color: white;
    cursor: pointer;
}

.controls select:focus {
    border-color: #0088cc;
}

.location-group {
    margin-bottom: 24px;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 16px;
}

.location-header {
    font-size: 18px;
    font-weight: bold;
    color: #0088cc;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.application {
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    background-color: #fafafa;
    text-align: left;
}

.application-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    text-align: left;
}

.application-id {
    font-weight: bold;
    color: #666;
}

.application-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.application-info {
    margin-bottom: 8px;
    text-align: left;
}

.application-message {
    margin: 8px 0;
    text-align: left;
    white-space: pre-wrap;
}

.application-photos {
    margin-top: 8px;
    text-align: left;
}

.photo-preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    margin-top: 8px;
    text-align: left;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-in-progress {
    background-color: #cce5ff;
    color: #004085;
}

.status-completed {
    background-color: #d4edda;
    color: #155724;
}

.application-info {
    margin-bottom: 8px;
}

.application-message {
    margin: 8px 0;
    white-space: pre-wrap;
}

.application-photos {
    margin-top: 8px;
}

.photo-preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    margin-top: 8px;
    cursor: pointer;
}

.status-controls {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.status-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    flex: 1;
    min-width: 70px;
    text-align: center;
}

.btn-pending { background-color: #fff3cd; color: #856404; }
.btn-in-progress { background-color: #cce5ff; color: #004085; }
.btn-completed { background-color: #d4edda; color: #155724; }
.btn-delete { background-color: #f8d7da; color: #721c24; }

.username-link {
    color: #0088cc;
    text-decoration: none;
    cursor: pointer;
}

.username-link:hover {
    text-decoration: underline;
}

.user-name {
    cursor: pointer;
}

.user-name:hover {
    text-decoration: underline;
}

@media (min-width: 600px) {
    .button-container {
        flex-direction: row;
    }
}