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

body {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px;
}

header {
    margin-bottom: 50px;
    position: relative;
}

h1 {
    font-size: 24px;
    font-weight: 600;
    color: #111;
    letter-spacing: -0.025em;
    margin-bottom: 4px;
    position: relative;
    display: inline-block;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: #3f77f5;
    border-radius: 2px;
}

h2 {
    font-size: 18px;
    font-weight: 600;
    color: #111;
}

h3 {
    font-size: 16px;
    font-weight: 600;
    color: #111;
}

button, .btn {
    padding: 8px 16px;
    background-color: #3f77f5;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

button:hover, .btn:hover {
    background-color: #0069d9;
}

.edit-row, .edit-campaign, .save-row, .cancel-row, .save-new-row, .cancel-new-row, .end-campaign {
    position: relative;
    vertical-align: middle;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 4px;
    overflow: hidden;
    background-color: #ffffff;
    margin-right: 4px;
    display: inline-block;
}

.edit-row:hover, .edit-campaign:hover, .save-row:hover, .cancel-row:hover, .save-new-row:hover, .cancel-new-row:hover, .end-campaign:hover {
    background-color: #ffffff;
}

.edit-row:before, .edit-campaign:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px;
}

.save-row:before, .save-new-row:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2328a745' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px;
}

.cancel-row:before, .cancel-new-row:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dc3545' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px;
}

.end-campaign:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dc3545' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='15' y1='9' x2='9' y2='15'%3E%3C/line%3E%3Cline x1='9' y1='9' x2='15' y2='15'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px;
}

.btn-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
}

/* Add button with SVG plus icon */
.add-schema, .add-service-area-default, .add-campaign, .add-service-area-campaign {
    position: relative;
    background-color: #3f77f5;
    color: transparent !important;
}

.add-schema:hover, .add-service-area-default:hover, .add-campaign:hover, .add-service-area-campaign:hover {
    background-color: #0069d9;
}

.add-schema::before, .add-service-area-default::before, .add-campaign::before, .add-service-area-campaign::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'%3E%3C/line%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px;
}

.main-nav ul, .sub-nav ul {
    display: flex;
    list-style: none;
    border-bottom: 1px solid #e9e9e9;
    margin-bottom: 20px;
    gap: 8px;
    padding: 0;
}

.main-nav li, .sub-nav li {
    margin-right: 0;
}

.nav-tab, .sub-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    text-decoration: none;
    color: #666;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    height: 36px;
    position: relative;
}

.nav-tab:hover, .sub-tab:hover {
    background-color: #f4f4f5;
    color: #333;
}

.nav-tab.active, .sub-tab.active {
    color: #111;
    font-weight: 600;
    background-color: transparent;
    border: none;
}

.nav-tab.active::after, .sub-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #3f77f5;
    border-radius: 1px;
}

.tab-content, .subtab-content {
    display: none;
    padding: 24px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.tab-content.active, .subtab-content.active {
    display: block;
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.section-header, .service-area-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    margin-left: 10px;
}

.content-section {
    margin-bottom: 50px;
}

.content-section:last-child {
    margin-bottom: 0;
}

.schemas-table table,
.default-schema-table table,
.service-areas-table table {
    table-layout: fixed;
    font-size: 14px;
    line-height: 18px;
    margin-bottom: 15px;
}

.schemas-table th,
.default-schema-table th {
    width: 10%;
    padding: 8px 10px;
    vertical-align: middle;
}

.schemas-table td,
.default-schema-table td,
.service-areas-table td {
    padding: 6px 10px;
}

.schemas-table th:first-child {
    width: 19%;
}

.default-schema-table th:first-child {
    width: 29%;
}

.service-areas-table th:first-child {
    width: 46%;
}

.service-areas-table th:nth-child(2) {
    width: 46%;
}

.schemas-table th:last-child,
.default-schema-table th:last-child,
.service-areas-table th:last-child {
    width: 8%;
}

.service-area-content table {
    table-layout: fixed;
    font-size: 14px;
    line-height: 18px;
    margin-bottom: 15px;
}

.service-area-content th {
    padding: 8px 10px;
    vertical-align: middle;
}

.service-area-content th:nth-child(1) {
    width: 12%;
}

.service-area-content th:nth-child(2) {
    width: 22%;
}

.service-area-content th:nth-child(3) {
    width: 23%;
}

.service-area-content th:nth-child(4),
.service-area-content th:nth-child(5) {
    width: 14%;
}

.service-area-content th:last-child {
    width: 8%;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    padding: 10px;
    text-align: left;
    font-size: 14px;
    border-bottom: 1px solid #e9e9e9;
}

tr {
    display: table-row;
}

tr:hover {
    background-color: #fafafa;
}

th {
    background-color: #fafafa;
    font-weight: 600;
    line-height: 1.2;
    height: 48px;
    vertical-align: middle;
}

table td.mono {
    font-family: monospace;
    font-size: 13px;
}

td.schema-name,
.service-areas-table td.schema-name {
    font-size: 14px;
    line-height: 18px;
}

td.actions {
    text-align: right;
    white-space: nowrap;
}

.column-comment {
  display: block;
  font-size: 0.8em;
  color: #666;
  font-weight: normal;
  margin-top: 2px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
}

input, select, textarea {
    border: 1px solid #ddd;
    width: 100%;
    padding: 5px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 18px;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 32px !important;
    border: 1px solid #e2e8f0;
    padding: 5px 12px;
    font-size: 14px;
    line-height: 1.4;
    height: 30px;
    color: #333;
    background-color: #fff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    cursor: pointer;
    box-sizing: border-box;
}

select:hover {
    border-color: #cbd5e1;
}

select:focus {
    outline: none;
    border-color: #3f77f5;
    box-shadow: 0 0 0 2px rgba(63, 119, 245, 0.1);
}

.loading-indicator {
    text-align: center;
    padding: 20px;
    color: #777;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    position: relative;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #3f77f5;
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto;
    left: 50%;
    transform: translateX(-50%);
}

@keyframes spin {
    0% { transform: translateX(-50%) rotate(0deg); }
    100% { transform: translateX(-50%) rotate(360deg); }
}

.filters {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    padding: 16px 20px;
    background-color: #f9fafb;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    margin-bottom: 0;
    white-space: nowrap;
    font-weight: 500;
    color: #4b5563;
    font-size: 14px;
}

.filter-group select {
    min-width: 140px;
    background-color: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    height: 30px;
}

.service-area-group {
    margin-bottom: 50px;
}

.notification {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 16px;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 8px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.05), 
                0px 1px 2px rgba(0, 0, 0, 0.04);
    z-index: 1100;
    width: 356px;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    animation: notification-appear 0.2s cubic-bezier(0.21, 1.02, 0.73, 1) forwards;
    transform-origin: top center;
    line-height: 1.5;
}

.notification p {
    margin: 0;
    font-size: 14px;
    color: #333;
}

.notification::before {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.notification.success {
    background-color: #fff;
}

.notification.success::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'%3E%3C/path%3E%3Cpolyline points='22 4 12 14.01 9 11.01'%3E%3C/polyline%3E%3C/svg%3E");
}

.notification.error {
    background-color: #fff;
}

.notification.error::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dc2626' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='15' y1='9' x2='9' y2='15'%3E%3C/line%3E%3Cline x1='9' y1='9' x2='15' y2='15'%3E%3C/line%3E%3C/svg%3E");
}

.notification.info {
    background-color: #fff;
}

.notification.info::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230ea5e9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='16' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'%3E%3C/line%3E%3C/svg%3E");
}

.notification.fadeout {
    animation: notification-disappear 0.2s cubic-bezier(0.21, 1.02, 0.73, 1) forwards;
}

@keyframes notification-appear {
    from { 
        opacity: 0; 
        transform: translateY(-16px) scale(0.95);
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1);
    }
}

@keyframes notification-disappear {
    from { 
        opacity: 1; 
        transform: translateY(0) scale(1);
    }
    to { 
        opacity: 0; 
        transform: translateY(-16px) scale(0.95);
    }
}

.notification:hover {
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.08), 
                0px 1px 2px rgba(0, 0, 0, 0.04);
    cursor: pointer;
}

.row-editing {
    background-color: #f0f8ff !important;
}

.row-edit-input.digits {
    font-family: monospace;
    font-size: 13px;
}

.currency-input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.currency-input-wrapper .row-edit-input.currency {
    width: calc(100% - 20px);
    font-family: monospace;
    font-size: 13px;
}

.currency-input-wrapper::after {
    content: "¢";
    margin-left: 5px;
    font-family: monospace;
    font-size: 14px;
}

input[type="time"].row-edit-input {
    width: 110px;
    padding: 4px;
    font-size: 13px;
}

.btn-small {
    padding: 3px 8px;
    font-size: 12px;
    margin-right: 5px;
}

.save-row, .save-new-row {
    background-color: #ffffff;
}

.save-row:hover, .save-new-row:hover {
    background-color: #ffffff;
}

.cancel-row, .cancel-new-row {
    background-color: #ffffff;
}

.cancel-row:hover, .cancel-new-row:hover {
    background-color: #ffffff;
}

.validation-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}

.add-campaign-form {
    margin-bottom: 20px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.add-campaign-form h5 {
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 600;
    font-size: 16px;
}

.add-campaign-form input[type="time"] {
    width: 110px;
}

.service-area-selection-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    width: 450px;
    padding: 28px;
    background-color: white;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.08), 
                0 8px 16px -6px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    animation: dialogFadeIn 0.2s ease-out;
}

.service-area-selection-dialog h2 {
    margin-top: 0;
    margin-bottom: 24px;
    font-weight: 600;
    color: #111;
    font-size: 20px;
    position: relative;
}

.service-area-selection-dialog h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 36px;
    height: 3px;
    background-color: #3f77f5;
    border-radius: 2px;
}

.service-area-selection-dialog .form-group {
    margin-bottom: 24px;
}

.service-area-selection-dialog label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: #555;
}

.service-area-selection-dialog select {
    width: 100%;
    padding: 5px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s ease;
    background-color: #fff;
    height: 34px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 32px !important;
    box-sizing: border-box;
}

.service-area-selection-dialog select:focus {
    outline: none;
    border-color: #3f77f5;
    box-shadow: 0 0 0 2px rgba(63, 119, 245, 0.1);
}

.service-area-selection-dialog .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
}

.service-area-selection-dialog .btn {
    min-width: 90px;
    padding: 10px 16px;
    font-weight: 500;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.service-area-selection-dialog #confirm-service-area {
    background-color: #3f77f5;
    color: white;
    border: none;
}

.service-area-selection-dialog #confirm-service-area:hover {
    background-color: #3569d9;
}

.service-area-selection-dialog #cancel-service-area {
    background-color: #f5f5f7;
    color: #555;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.service-area-selection-dialog #cancel-service-area:hover {
    background-color: #eeeef0;
    color: #333;
}

.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    z-index: 999;
    animation: overlayFadeIn 0.2s ease-out;
}

@keyframes dialogFadeIn {
    from { 
        opacity: 0; 
        transform: translate(-50%, -48%);
    }
    to { 
        opacity: 1; 
        transform: translate(-50%, -50%);
    }
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}






