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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    width: 100%;
    padding: 0;
    color: #333333;
    line-height: 1.5;
}

.container {
    width: 100%;
    margin: 0;
    background: white;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header {
    background: #2c3e50;
    color: white;
    padding: 30px 40px;
    text-align: left;
    width: 100%;
}

.header h1 {
    font-size: 2em;
    font-weight: 600;
}

.nav-bar-ads {
    background: #f8f9fa;
    padding: 15px 40px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    gap: 10px;
}

.nav-link-ads {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    background: white;
    font-size: 0.9em;
}

.nav-link-ads:hover {
    background: #f8f9fa;
    border-color: #3498db;
}

.content {
    padding: 40px;
    width: 100%;
    flex: 1;
}

.region-section {
    margin-bottom: 40px;
}

.region-title {
    font-size: 1.4em;
    color: #2c3e50;
    margin-bottom: 20px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 5px;
    display: inline-block;
}

.upload-section {
    border: 1px solid #dee2e6;
    padding: 20px;
    margin-bottom: 30px;
    background: #fdfdfd;
}

.upload-form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
}

.form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.file-input {
    padding: 8px;
    border: 1px solid #cccccc;
    font-size: 0.9em;
    background: white;
}

.submit-btn {
    padding: 9px 24px;
    background: #3498db;
    color: white;
    border: none;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.9em;
}

.submit-btn:hover {
    background: #2980b9;
}

.status-message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 0;
    display: none;
    font-size: 0.9em;
}

.status-message.status-loading {
    display: block;
    background: #e9ecef;
    color: #495057;
}

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

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

.ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.ads-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    border: 1px solid #dee2e6;
}

.ads-table thead {
    background: #f8f9fa;
    color: #333;
    border-bottom: 2px solid #dee2e6;
}

.ads-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
}

.ads-table tbody tr {
    border-bottom: 1px solid #eeeeee;
}

.ads-table tbody tr:hover {
    background-color: #fafafa;
}

.ads-table td {
    padding: 12px 15px;
    color: #444;
    font-size: 0.9em;
}

.ads-table td:first-child {
    font-weight: 500;
    color: #2c3e50;
}

.ad-id-cell {
    font-family: monospace;
    font-size: 0.85em;
    color: #666;
}

.ad-card {
    border: 1px solid #dee2e6;
    padding: 15px;
    background: white;
}

.ad-title {
    font-size: 1em;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.ad-id {
    font-size: 0.8em;
    color: #888;
    margin-bottom: 10px;
    font-family: monospace;
}

.ad-info {
    font-size: 0.9em;
    color: #555;
    line-height: 1.4;
}

.ad-info-item {
    margin-bottom: 4px;
}

.ad-label {
    font-weight: 600;
    color: #444;
    display: inline-block;
    width: 80px;
}

.no-ads {
    text-align: center;
    color: #888;
    padding: 30px;
    background: #f9f9f9;
    border: 1px solid #eee;
}

@media (max-width: 768px) {
    .content {
        padding: 20px;
    }

    .header {
        padding: 20px;
    }

    .nav-bar-ads {
        padding: 10px 20px;
        flex-direction: column;
        align-items: stretch;
    }

    .nav-link-ads {
        text-align: center;
    }

    .upload-form {
        flex-direction: column;
    }

    .form-group {
        min-width: 100%;
    }
}

.table-actions {
    margin-top: 15px;
    display: flex;
    justify-content: flex-end;
}

.delete-selected-btn {
    padding: 9px 24px;
    background: #e74c3c;
    color: white;
    border: none;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.2s;
}

.delete-selected-btn:hover:not(:disabled) {
    background: #c0392b;
}

.delete-selected-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.ads-table th:first-child,
.ads-table td:first-child {
    text-align: center;
    width: 40px;
}