/* ===== PUBLIOSUITE - ESPACE SUITE ===== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f7fa;
    color: #1a1a2e;
    min-height: 100vh;
}

/* ===== LOGIN PAGE ===== */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4c5a3e 0%, #2d3625 100%);
}

.login-container {
    background: #fff;
    border-radius: 16px;
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    height: 56px;
    margin-bottom: 12px;
}

.login-header h1 {
    font-size: 24px;
    color: #4c5a3e;
    font-weight: 700;
}

.login-subdomain {
    font-size: 14px;
    color: #888;
    margin-top: 4px;
}

/* ===== FORMS ===== */

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: border-color 0.2s;
    outline: none;
}

.form-group input:focus {
    border-color: #4c5a3e;
}

/* ===== BUTTONS ===== */

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: opacity 0.2s, transform 0.1s;
}

.btn:hover {
    opacity: 0.9;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: #4c5a3e;
    color: #fff;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-logout {
    background: transparent;
    color: #666;
    padding: 8px 16px;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.btn-logout:hover {
    background: #f5f5f5;
    color: #333;
}

.btn-service {
    color: #fff;
    padding: 10px 20px;
    font-size: 14px;
    width: 100%;
}

.btn-disabled {
    background: #e8e8e8;
    color: #aaa;
    padding: 10px 20px;
    font-size: 14px;
    width: 100%;
    cursor: default;
    border-radius: 10px;
    display: inline-block;
    text-align: center;
}

/* ===== ALERTS ===== */

.alert {
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.alert-info {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* ===== BADGES ===== */

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-trial {
    background: #dbeafe;
    color: #1d4ed8;
}

.plan-badge {
    display: inline-block;
    background: #4c5a3e;
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.status-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-left: 8px;
}

.status-trialing {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-active {
    background: #dcfce7;
    color: #16a34a;
}

.status-canceled, .status-inactive {
    background: #fef2f2;
    color: #dc2626;
}

/* ===== HEADER ===== */

.suite-header {
    background: #fff;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    height: 36px;
}

.header-title {
    font-size: 18px;
    font-weight: 700;
    color: #4c5a3e;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-user {
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

/* ===== DASHBOARD ===== */

.dashboard-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px;
}

.dashboard-welcome h1 {
    font-size: 28px;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.dashboard-welcome p {
    color: #666;
    font-size: 16px;
    margin-bottom: 24px;
}

.subscription-info {
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.btn-subscription {
    background: transparent;
    color: #4c5a3e;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    border: 1.5px solid #4c5a3e;
    border-radius: 20px;
    margin-left: 8px;
    transition: background 0.2s, color 0.2s;
}

.btn-subscription:hover {
    background: #4c5a3e;
    color: #fff;
}

.section-title {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
}

/* ===== SERVICES GRID ===== */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.service-card {
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.service-card.active:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.service-card.disabled {
    opacity: 0.5;
}

.service-card.bientot {
    opacity: 0.45;
    filter: grayscale(60%);
    position: relative;
}

.badge-bientot {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #f59e0b;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
}

.service-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.service-name {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
}

.service-desc {
    font-size: 13px;
    color: #888;
    line-height: 1.4;
}

/* ===== ADD SERVICE BUTTON ===== */

.btn-add-service {
    background: #fff;
    color: #4c5a3e;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    width: 100%;
    border: 2px dashed #4c5a3e;
    border-radius: 10px;
    text-decoration: none;
    text-align: center;
    display: inline-block;
    transition: background 0.2s, color 0.2s;
}

.btn-add-service:hover {
    background: #4c5a3e;
    color: #fff;
}

.btn-discover {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent;
    color: #4c5a3e;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    width: 100%;
    text-align: center;
    text-decoration: none;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    transition: all 0.25s;
    margin-top: 8px;
}
.btn-discover:hover {
    color: #fff;
    background: #4c5a3e;
    border-color: #4c5a3e;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(76,90,62,0.2);
}

/* ===== ADD SERVICE PAGE ===== */

.add-service-page {
    max-width: 500px;
    margin: 0 auto;
}

.add-service-page h1 {
    font-size: 24px;
    color: #1a1a2e;
    margin-bottom: 24px;
}

.add-service-card {
    background: #fff;
    border-radius: 16px;
    padding: 36px 32px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.add-service-card h2 {
    font-size: 22px;
    color: #1a1a2e;
}

.service-icon-lg {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

.pricing-summary {
    width: 100%;
    margin: 16px 0;
    border-top: 1px solid #eee;
    padding-top: 16px;
}

.pricing-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 15px;
    color: #555;
}

.pricing-row.pricing-new {
    font-weight: 700;
    color: #1a1a2e;
    font-size: 17px;
    border-top: 1px solid #eee;
    padding-top: 12px;
    margin-top: 4px;
}

.pricing-discount {
    background: #f0fdf4;
    color: #16a34a;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 8px;
}

/* ===== FOOTER ===== */

.suite-footer {
    text-align: center;
    padding: 32px 24px;
    color: #aaa;
    font-size: 13px;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
}

.login-footer a {
    color: #4c5a3e;
    text-decoration: none;
    font-size: 14px;
}

.login-footer a:hover {
    text-decoration: underline;
}

.back-to-publiosuite {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    padding: 12px 28px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    background: #4c5a3e;
    border-radius: 8px;
    transition: all 0.2s;
}

.back-to-publiosuite:hover {
    background: #3d4a31;
    color: #fff;
    text-decoration: none;
}

/* ===== PUBLIOPOST SETUP MODAL ===== */

.pp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: ppFadeIn 0.25s ease;
    overflow-y: auto;
}

.pp-modal-overlay.pp-hidden {
    display: none !important;
}

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

@keyframes ppSlideUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.pp-modal {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
    position: relative;
    z-index: 100000;
    animation: ppSlideUp 0.3s ease;
    margin: auto;
}

.pp-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
    z-index: 2;
}

.pp-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.pp-modal-header {
    text-align: center;
    padding: 36px 32px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.pp-modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(76, 90, 62, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 16px;
}

.pp-modal-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 6px;
}

.pp-modal-header p {
    font-size: 14px;
    color: #888;
}

.pp-modal-form {
    padding: 0 32px 32px;
}

.pp-section {
    padding-top: 24px;
}

.pp-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #4c5a3e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #4c5a3e20;
}

.pp-section-desc {
    font-size: 13px;
    color: #888;
    margin-bottom: 16px;
    line-height: 1.5;
}

.pp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.pp-field {
    display: flex;
    flex-direction: column;
}

.pp-field-full {
    grid-column: 1 / -1;
}

.pp-field label {
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}

.pp-required {
    color: #dc2626;
}

.pp-field input,
.pp-field select,
.pp-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: #1a1a2e;
    background: #fafafa;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    outline: none;
}

.pp-field input:focus,
.pp-field select:focus,
.pp-field textarea:focus {
    border-color: #4c5a3e;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(76, 90, 62, 0.1);
}

.pp-field textarea {
    resize: vertical;
    min-height: 80px;
}

.pp-field select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.pp-form-footer {
    margin-top: 28px;
}

.pp-error-msg {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13px;
    margin-bottom: 16px;
}

.pp-submit-btn {
    padding: 14px 24px;
    font-size: 15px;
    border-radius: 12px;
    background: #4c5a3e;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pp-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.pp-btn-loader {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pp-spinner {
    width: 18px;
    height: 18px;
    animation: ppSpin 0.8s linear infinite;
}

@keyframes ppSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
    .login-container {
        margin: 20px;
        padding: 32px 24px;
    }

    .suite-header {
        padding: 12px 16px;
    }

    .header-user {
        display: none;
    }

    .dashboard-main {
        padding: 24px 16px;
    }

    .dashboard-welcome h1 {
        font-size: 22px;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .service-card {
        padding: 20px 16px;
    }

    .service-icon {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }

    .alert-info {
        flex-direction: column;
        text-align: center;
    }

    .pp-modal-overlay {
        padding: 8px;
    }

    .pp-modal {
        border-radius: 16px;
        max-height: 95vh;
        max-width: 95vw;
    }

    .pp-modal-form {
        padding: 0 20px 24px;
    }

    .pp-modal-header {
        padding: 28px 20px 16px;
    }

    .pp-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}
