/* Pawa Agri-tech - Frontend : pages de connexion/inscription/tableau de bord (canvas). */

.pat-canvas {
    margin: 0;
    background: #f0f4ff;
    font-family: "DM Sans", "Segoe UI", Arial, sans-serif;
    color: #1f2937;
}

/* ---------- Pages d'authentification (login / register / lost-password) ---------- */

.pat-auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.pat-auth-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(26, 68, 212, 0.1);
    padding: 36px 32px;
    width: 100%;
    max-width: 420px;
}

.pat-auth-card-wide {
    max-width: 960px;
}

.pat-auth-logo {
    text-align: center;
    margin-bottom: 20px;
}

.pat-auth-logo img {
    max-height: 48px;
}

.pat-auth-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a44d4;
    text-align: center;
    margin: 0 0 6px;
}

.pat-auth-subtitle {
    font-size: 13px;
    color: #6b7280;
    text-align: center;
    margin: 0 0 22px;
}

.pat-auth-notice {
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 18px;
}

.pat-auth-notice-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.pat-auth-notice-success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.pat-auth-form-grid {
    display: grid;
    gap: 18px;
}

.pat-fieldset {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    display: grid;
    gap: 14px;
}

.pat-fieldset legend {
    font-size: 12px;
    font-weight: 700;
    color: #6d28d9;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0 6px;
}

.pat-field {
    display: block;
    margin-bottom: 14px;
}

.pat-auth-form-grid .pat-field {
    margin-bottom: 0;
}

.pat-field-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.pat-field input,
.pat-field select {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.pat-field input:focus,
.pat-field select:focus {
    outline: none;
    border-color: #1a44d4;
    box-shadow: 0 0 0 3px rgba(26, 68, 212, 0.12);
}

.pat-btn {
    display: inline-block;
    text-align: center;
    border: none;
    border-radius: 6px;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.pat-btn-primary {
    background: #1a44d4;
    color: #fff;
    width: 100%;
}

.pat-btn-primary:hover {
    background: #15379f;
}

.pat-btn-full {
    width: 100%;
}

.pat-fieldset-plans {
    border: none;
    padding: 0;
}

.pat-fieldset-plans legend {
    padding: 0 0 10px;
}

.pat-plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
}

.pat-plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px 16px;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.pat-plan-card:hover {
    border-color: #93a5f5;
    transform: translateY(-2px);
}

.pat-plan-card-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.pat-plan-card:has(.pat-plan-card-input:checked) {
    border-color: #1a44d4;
    background: #f7f9ff;
    box-shadow: 0 4px 16px rgba(26, 68, 212, 0.14);
}

.pat-plan-card:has(.pat-plan-card-input:focus-visible) {
    outline: 2px solid #1a44d4;
    outline-offset: 2px;
}

.pat-plan-card-featured {
    border-color: #f2c98a;
}

.pat-plan-card-badge {
    position: absolute;
    top: -10px;
    right: 14px;
    background: #f59e0b;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 3px 9px;
    border-radius: 999px;
}

.pat-plan-card-check {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid #d1d5db;
    background: #fff;
}

.pat-plan-card:has(.pat-plan-card-input:checked) .pat-plan-card-check {
    border-color: #1a44d4;
    background: #1a44d4;
    box-shadow: inset 0 0 0 3px #fff;
}

.pat-plan-card-name {
    font-size: 15px;
    font-weight: 700;
    color: #1a44d4;
    padding-right: 24px;
}

.pat-plan-card-price {
    font-size: 21px;
    font-weight: 700;
    color: #1f2937;
    margin: 6px 0 8px;
}

.pat-plan-card-period {
    font-size: 12px;
    font-weight: 400;
    color: #9ca3af;
}

.pat-plan-card-desc {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 10px;
    line-height: 1.4;
}

.pat-plan-card-features {
    list-style: none;
    margin: 0;
    padding: 10px 0 0;
    border-top: 1px solid #f0f0f0;
}

.pat-plan-card-features li {
    font-size: 12px;
    color: #374151;
    padding: 4px 0 4px 18px;
    position: relative;
}

.pat-plan-card-features li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: #1a44d4;
    font-weight: 700;
}

.pat-btn-ghost {
    background: transparent;
    color: #1a44d4;
    border: 1px solid #1a44d4;
    padding: 7px 14px;
    font-size: 13px;
}

.pat-auth-links {
    text-align: center;
    margin-top: 18px;
    font-size: 13px;
}

.pat-auth-links a {
    color: #1a44d4;
    text-decoration: none;
}

.pat-auth-links a:hover {
    text-decoration: underline;
}

.pat-auth-links-sep {
    margin: 0 8px;
    color: #d1d5db;
}

/* ---------- Tableau de bord ---------- */

.pat-dashboard-shell {
    min-height: 100vh;
}

.pat-dashboard-topbar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pat-dashboard-brand img {
    max-height: 34px;
}

.pat-dashboard-user {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
    color: #374151;
}

.pat-dashboard-body {
    display: flex;
    align-items: flex-start;
    min-height: calc(100vh - 64px);
}

.pat-dashboard-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #e5e7eb;
    padding: 20px 0;
    min-height: calc(100vh - 64px);
}

.pat-dashboard-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 22px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    border-left: 3px solid transparent;
}

.pat-dashboard-nav-link:hover {
    background: #f0f4ff;
    color: #1a44d4;
}

.pat-dashboard-nav-link-active {
    background: #f0f4ff;
    color: #1a44d4;
    font-weight: 600;
    border-left-color: #1a44d4;
}

.pat-dashboard-nav-icon {
    font-size: 15px;
    width: 20px;
    text-align: center;
}

.pat-dashboard-content {
    flex-grow: 1;
    padding: 32px 36px;
    max-width: 780px;
}

.pat-dashboard-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a44d4;
    margin: 0 0 4px;
}

.pat-dashboard-subheading {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin: 32px 0 14px;
}

.pat-dashboard-subtitle {
    color: #6b7280;
    font-size: 14px;
    margin: 0 0 24px;
}

.pat-dashboard-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.pat-dashboard-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
    padding: 14px 18px;
    min-width: 160px;
}

.pat-dashboard-card-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b7280;
    margin-bottom: 4px;
}

.pat-dashboard-card-value {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
}

.pat-dashboard-placeholder {
    color: #9ca3af;
    font-size: 13px;
    font-style: italic;
}

.pat-dashboard-form {
    display: grid;
    gap: 16px;
    max-width: 480px;
    margin-bottom: 10px;
}

.pat-dashboard-form .pat-field {
    margin-bottom: 0;
}

.pat-field-hint {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    margin-top: 3px;
}

.pat-logo-preview {
    display: block;
    max-height: 60px;
    max-width: 200px;
    margin-bottom: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 6px;
    background: #fff;
}

.pat-dashboard-account-links {
    font-size: 13px;
    margin-bottom: 10px;
}

.pat-dashboard-account-links a {
    color: #1a44d4;
    text-decoration: none;
}

.pat-dashboard-account-links a:hover {
    text-decoration: underline;
}

.pat-dashboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.pat-dashboard-table th,
.pat-dashboard-table td {
    text-align: left;
    padding: 9px 10px;
    border-bottom: 1px solid #f0f0f0;
}

.pat-dashboard-table th {
    color: #6b7280;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pat-dashboard-table a {
    color: #1a44d4;
    text-decoration: none;
}

.pat-dashboard-table a:hover {
    text-decoration: underline;
}

.pat-link-button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: #b91c1c;
    text-decoration: none;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
}

.pat-link-button:hover {
    text-decoration: underline;
}

.pat-currency-settings {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 20px;
}

.pat-currency-settings summary {
    cursor: pointer;
    font-weight: 600;
    color: #1a44d4;
    font-size: 13px;
}

.pat-currency-settings form {
    margin-top: 16px;
    max-width: 420px;
}

.pat-parcelles-map {
    height: 380px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-bottom: 20px;
    z-index: 0;
}

.pat-parcelle-form-map {
    height: 300px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    margin-top: 6px;
    z-index: 0;
}

@media (max-width: 720px) {
    .pat-dashboard-body {
        flex-direction: column;
    }

    .pat-dashboard-sidebar {
        width: 100%;
        min-height: auto;
        display: flex;
        overflow-x: auto;
        padding: 8px;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }

    .pat-dashboard-nav-link {
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
        padding: 10px 14px;
    }

    .pat-dashboard-nav-link-active {
        border-left-color: transparent;
        border-bottom-color: #1a44d4;
    }

    .pat-dashboard-content {
        padding: 24px 18px;
        max-width: 100%;
    }
}
