/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* Modal Styles */
.modal {
    display: flex;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.modal-header h2,
.modal-header h3 {
    color: #667eea;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #667eea;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

/* Button Styles */
.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #f8f9fa;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    color: #667eea;
    font-size: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-name {
    color: #666;
    font-weight: 600;
}

/* Navigation Tabs */
.nav-tabs {
    background: rgba(255, 255, 255, 0.9);
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-tabs .container {
    display: flex;
    gap: 0;
}

.tab-btn {
    flex: 1;
    padding: 18px 24px;
    background: transparent;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

/* Tab Content */
.tab-content {
    padding: 40px 20px;
    min-height: calc(100vh - 200px);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.section-header h2 {
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Price Categories */
.price-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.category-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-card h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.price-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.price-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    transition: all 0.3s;
}

.price-item:hover {
    background: #e3f2fd;
    transform: translateX(5px);
}

.price-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.price-service {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.price-amount {
    color: #667eea;
    font-weight: 700;
    font-size: 18px;
}

.price-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.price-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 6px;
}

.btn-edit {
    background: #28a745;
    color: white;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

/* Contact Cards */
.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.contact-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.contact-card:hover {
    transform: translateY(-5px);
}

.contact-card.whatsapp {
    border-top: 4px solid #25D366;
}

.contact-card.instagram {
    border-top: 4px solid #E4405F;
}

.contact-card.tiktok {
    border-top: 4px solid #000000;
}

.contact-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.contact-header i {
    font-size: 24px;
}

.whatsapp .contact-header i {
    color: #25D366;
}

.instagram .contact-header i {
    color: #E4405F;
}

.tiktok .contact-header i {
    color: #000000;
}

.contact-header h3 {
    color: #333;
    font-size: 20px;
}

.contact-info {
    margin-bottom: 20px;
}

.contact-info p {
    margin-bottom: 10px;
    color: #666;
}

.contact-info strong {
    color: #333;
}

/* Settings Grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.setting-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.setting-card:hover {
    transform: translateY(-5px);
}

.setting-card h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.setting-value {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.setting-value span {
    font-size: 16px;
    font-weight: 600;
}

/* Status Styles */
.status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.status.active,
.status:contains("Aktif") {
    background: #d4edda;
    color: #155724;
}

.status.inactive,
.status:contains("Tidak Aktif") {
    background: #f8d7da;
    color: #721c24;
}

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-spinner p {
    color: white;
    margin-top: 20px;
    font-size: 18px;
}

/* Message Container */
.message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    min-width: 300px;
    animation: slideInRight 0.3s ease;
}

.message.success {
    background: #28a745;
}

.message.error {
    background: #dc3545;
}

.message.info {
    background: #17a2b8;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Error Message */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 6px;
    margin-top: 15px;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header .container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .section-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .price-categories,
    .contact-cards,
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-tabs .container {
        flex-direction: column;
    }
    
    .tab-btn {
        border-bottom: none;
        border-right: 3px solid transparent;
    }
    
    .tab-btn.active {
        border-right-color: #667eea;
        border-bottom-color: transparent;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .message {
        min-width: 250px;
    }
}

@media (max-width: 480px) {
    .tab-content {
        padding: 20px 10px;
    }
    
    .category-card,
    .contact-card,
    .setting-card {
        padding: 20px;
    }
    
    .price-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .setting-value {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}

/* Dashboard Metrics */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.metric-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s, box-shadow 0.3s;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.metric-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.metric-info h3 {
    font-size: 14px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.metric-info p {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

/* Filter and Search Bar */
.filter-bar {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 450px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.search-box input:focus {
    border-color: #667eea;
}

.filter-groups {
    display: flex;
    gap: 15px;
}

.filter-groups select {
    padding: 10px 15px;
    border: 2px solid #eee;
    border-radius: 8px;
    outline: none;
    background: white;
    cursor: pointer;
    font-weight: 600;
    color: #555;
    transition: border-color 0.3s;
}

.filter-groups select:focus {
    border-color: #667eea;
}

/* Table Design for Orders */
.orders-table-wrapper {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    overflow-x: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.orders-table th, 
.orders-table td {
    padding: 18px 20px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.orders-table th {
    background: #f8f9fa;
    color: #555;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.orders-table tbody tr {
    transition: background-color 0.2s;
}

.orders-table tbody tr:hover {
    background-color: #f1f3f9;
}

/* Worker Assignment info */
.worker-badge {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
}

.worker-badge .name {
    font-weight: 600;
    color: #333;
}

.worker-badge .phone {
    font-size: 12px;
    color: #777;
}

/* Badges for status and payments */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}

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

.order-status-diterima {
    background: #cce5ff;
    color: #004085;
}

.order-status-sedang_dikerjakan {
    background: #e2e3e5;
    color: #383d41;
}

.order-status-lacak_posisi {
    background: #d1ecf1;
    color: #0c5460;
}

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

.order-status-batal {
    background: #f8d7da;
    color: #721c24;
}

.payment-status-belum_bayar {
    background: #f8d7da;
    color: #721c24;
}

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

/* Workers Tab Card layout */
.workers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.worker-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #667eea;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s;
}

.worker-card:hover {
    transform: translateY(-5px);
}

.worker-info h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.worker-info p {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.worker-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ─── Danger Button ─── */
.btn-danger {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}
.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}
.btn-danger.btn-small {
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 6px;
}

/* ─── Wide & Small Modal Variants ─── */
.modal-wide {
    max-width: 720px !important;
    padding: 0 !important;
    overflow: hidden;
}
.modal-wide .modal-header {
    padding: 20px 24px;
    margin-bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: none;
    border-radius: 0;
}
.modal-wide .modal-header h3 {
    color: white;
}
.modal-wide .modal-header .close {
    color: rgba(255,255,255,0.8);
}
.modal-wide .modal-header .close:hover {
    color: white;
}
.modal-wide form {
    padding: 20px 24px 24px;
}
.modal-small {
    max-width: 420px !important;
    padding: 0 !important;
    overflow: hidden;
}
.modal-small .modal-header {
    padding: 18px 24px;
    margin-bottom: 0;
    border-radius: 0;
    border-bottom: none;
}
.modal-small .modal-header h3 {
    color: white;
    font-size: 18px;
}

/* ─── Two-column Form Grid ─── */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}
@media (max-width: 560px) {
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* ─── Workflow Stepper ─── */
.workflow-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 12px 0;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 16px;
}

.workflow-stepper .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.workflow-stepper .step-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    border: 2.5px solid #ddd;
    background: white;
    color: #aaa;
    transition: all 0.3s;
}

.workflow-stepper .step span {
    font-size: 11px;
    font-weight: 600;
    color: #aaa;
    text-align: center;
    max-width: 60px;
    transition: color 0.3s;
}

/* Done step */
.workflow-stepper .step.done .step-icon {
    background: #d4edda;
    border-color: #28a745;
    color: #28a745;
}
.workflow-stepper .step.done span {
    color: #28a745;
}

/* Active step */
.workflow-stepper .step.active .step-icon {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transform: scale(1.15);
}
.workflow-stepper .step.active span {
    color: #667eea;
    font-size: 12px;
}

/* Inactive step */
.workflow-stepper .step.inactive .step-icon {
    background: white;
    border-color: #ddd;
    color: #ccc;
}
.workflow-stepper .step.inactive span {
    color: #ccc;
}

/* Step connecting line */
.workflow-stepper .step-line {
    flex: 1;
    height: 3px;
    background: #ddd;
    border-radius: 2px;
    margin: 0 4px;
    margin-bottom: 22px;
    transition: background 0.3s;
}
.workflow-stepper .step-line.done {
    background: #28a745;
}