/* ===== REGISTRATION FORM STYLING ===== */
.service-provider-registration {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.service-provider-registration h2 {
    color: #2c3e50;
    margin-bottom: 2rem;
    text-align: center;
    font-size: 2rem;
}

.registration-errors {
    background: #ffebe8;
    border: 1px solid #c00;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.registration-errors .error {
    color: #c00;
    margin: 0.5rem 0;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: #7f8c8d;
    font-size: 0.85rem;
}

.field-validation-message {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.field-validation-message.loading {
    color: #7f8c8d;
}

.field-validation-message.success {
    color: #27ae60;
}

.field-validation-message.error {
    color: #c0392b;
}


.file-selected {
    background: #e8f4fd;
    border: 2px dashed #3498db;
    padding: 8px 12px;
    margin-top: 0.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #2c3e50;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.file-selected:before {
    content: "✓";
    color: #27ae60;
    font-weight: bold;
}

.service-provider-registration button[type="submit"] {
    width: 100%;
    background: #3498db;
    color: white;
    padding: 15px;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.service-provider-registration button[type="submit"]:hover {
    background: #2980b9;
}

/* ===== DASHBOARD STYLING ===== */
.service-provider-dashboard {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
}

.service-provider-dashboard h2,
.service-provider-dashboard h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.services-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.service-item {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid #3498db;
}

.service-item h4 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
}

.service-item a {
    display: inline-block;
    margin-right: 1rem;
    padding: 8px 16px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.service-item a:hover {
    background: #2980b9;
}

.service-item a.delete-service {
    background: #e74c3c;
}

.service-item a.delete-service:hover {
    background: #c0392b;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.stats-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.stats-card h4 {
    margin: 0 0 1rem 0;
    color: #7f8c8d;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stats-card p {
    margin: 0;
    font-size: 2rem;
    font-weight: bold;
    color: #3498db;
}

.loading-stats {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
}

/* ===== PROVIDER CARDS STYLING ===== */
.providers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.provider-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e1e8ed;
}

.provider-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.provider-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.provider-card h3 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.3rem;
}

.provider-rating {
    color: #f39c12;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.provider-distance {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.provider-distance:before {
    content: "📍";
}

.contact-button {
    width: 100%;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.contact-button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

/* ===== SERVICE CARDS STYLING ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.service-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e1e8ed;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Ensures border-radius is respected by children */
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.service-card .service-thumbnail-link {
    display: block;
    line-height: 0; /* Remove space under image */
}

.service-card .service-thumbnail {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 1px solid #e1e8ed;
}

.service-card .service-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Allows the content to fill the space */
}

.service-card h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.4rem;
}

.service-card h3 a {
    text-decoration: none;
    color: #2c3e50;
}

.service-card h3 a:hover {
    color: #3498db;
}

.service-card .service-excerpt {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1; /* Pushes the provider card to the bottom */
    margin-bottom: 1.5rem;
}

.provider-mini-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    margin-top: auto; /* Pushes it to the bottom */
}

.provider-logo-mini {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.provider-name {
    font-weight: 600;
    color: #2c3e50;
    flex-grow: 1;
    font-size: 14px;
}

.provider-mini-card .contact-button {
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ===== MODERATION PAGE STYLING (Extends .provider-card) ===== */
.moderation-page .provider-card {
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.moderation-page .provider-card h2 {
    margin: 0 0 1rem 0;
}
.provider-card p {
    margin: 0.5rem 0;
    color: #7f8c8d;
}

.provider-card button {
    margin-right: 1rem;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.provider-card button.approve-provider {
    background: #27ae60;
    color: white;
}

.provider-card button.approve-provider:hover {
    background: #229954;
}

.provider-card button.reject-provider {
    background: #e74c3c;
    color: white;
}

.provider-card button.reject-provider:hover {
    background: #c0392b;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .service-provider-registration {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .providers-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .services-list {
        grid-template-columns: 1fr;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .service-provider-dashboard {
        padding: 1rem;
    }
}

/* ===== FORM VALIDATION STYLING ===== */
/* Remove browser default validation styles */
.form-group input:invalid,
.form-group select:invalid,
.form-group textarea:invalid {
    box-shadow: none; /* Remove browser red glow */
}

/* Only show validation styles after submission or when error class is present */
.form-group input.error:invalid,
.form-group select.error:invalid,
.form-group textarea.error:invalid,
.form-group input.submitted:invalid,
.form-group select.submitted:invalid,
.form-group textarea.submitted:invalid {
    border-color: #e74c3c;
    background-color: #fff5f5;
}

/* ===== LOADING STATES ===== */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading:after {
    content: " ⏳";
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== ERROR STATE STYLING ===== */
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #e74c3c;
    background-color: #fff5f5;
}

.form-group input.error:focus,
.form-group select.error:focus,
.form-group textarea.error:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.field-error {
    color: #e74c3c !important;
    font-size: 0.85rem !important;
    margin-top: 0.25rem !important;
    display: block;
}

/* ===== DASHBOARD STYLING ===== */
.smm-dashboard {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
}

.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.widget {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid #e1e8ed;
}

.widget h3 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.widget .active-packages {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e1e8ed;
}

.widget .active-packages ul {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
}

.widget .active-packages li {
    font-size: 0.9rem;
    color: #34495e;
    margin-bottom: 0.25rem;
}

.widget .active-packages li em {
    color: #7f8c8d;
}
.widget .widget-content li{
    font-size: 16px;
}

.dashboard-navigation {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.nav-button {
    background: #3498db;
    color: white;
    padding: 1rem;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.nav-button:hover {
    background: #2980b9;
    color: white;
}

/* ===== PACKAGES STYLING ===== */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.package-card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.package-card[data-package-type="subscription"] {
    border-color: #f39c12;
}

.package-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.package-details {
    margin-bottom: 1.5rem;
}

.points {
    font-size: 2rem;
    font-weight: bold;
    color: #3498db;
    margin: 0;
}

.price {
    font-size: 1.5rem;
    color: #27ae60;
    margin: 0.5rem 0;
}

.purchase-package {
    background: #27ae60;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.purchase-package:hover {
    background: #229954;
}

/* ===== TRANSACTION HISTORY ===== */
.transaction-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.transaction-table th,
.transaction-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e1e8ed;
}

.transaction-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.points-added {
    color: #27ae60;
    font-weight: bold;
}

.points-deducted {
    color: #e74c3c;
    font-weight: bold;
}

/* ===== SERVICE MANAGEMENT ===== */
.service-management {
    max-width: 1000px;
    margin: 2rem auto;
}

.service-actions {
    margin-bottom: 2rem;
}

.add-service-btn {
    background: #27ae60;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.services-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.service-item {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid #3498db;
}

.service-status {
    font-size: 0.9rem;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 1rem;
}

.service-status.active { background: #d4edda; color: #155724; }
.service-status.hidden { background: #fff3cd; color: #856404; }
.service-status.pending { background: #cce5ff; color: #004085; }

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-widgets {
        grid-template-columns: 1fr;
    }
    
    .dashboard-navigation {
        grid-template-columns: 1fr;
    }
    
    .packages-grid {
        grid-template-columns: 1fr;
    }
    
    .services-list {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

.gallery-preview {
    margin-top: 10px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px dashed #ddd;
}

.gallery-preview h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 14px;
}

input[type="file"] {
    padding: 10px;
    border: 2px dashed #ccc;
    border-radius: 6px;
    background: #fafafa;
    width: 100%;
    box-sizing: border-box;
}

input[type="file"]:hover {
    border-color: #3498db;
    background: #f0f8ff;
}

/* SMM Notice Styles
-------------------------------------------------- */
.smm-notice {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    border-left-width: 4px;
    border-left-style: solid;
    background-color: #fff;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.smm-notice p {
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.5;
}

.smm-notice p:not(:first-child) {
    margin-top: 10px;
}

/* Success Notice (Green) */
.smm-notice-success {
    border-left-color: #4CAF50;
    background-color: rgba(76,175,80,.05);
}

/* Error Notice (Red) */
.smm-notice-error {
    border-left-color: #f44336;
    background-color: rgba(244,67,54,.05);
}

/* Info Notice (Blue) */
.smm-notice-info {
    border-left-color: #2196F3;
    background-color: rgba(33,150,243,.05);
}

/* Login form */
.service-provider-login { margin: 2rem auto; padding: 2rem; background: #fff; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.service-provider-login h2 { text-align: center; margin-bottom: 1.5rem; }
.service-provider-login .form-group { margin-bottom: 1rem; }
.service-provider-login label { display: block; margin-bottom: 0.5rem; font-weight: 600; }
.service-provider-login input[type="text"], .service-provider-login input[type="password"] { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; }
.service-provider-login button { width: 100%; padding: 12px; background: #3498db; color: white; border: none; border-radius: 4px; font-size: 1rem; cursor: pointer; }