/* Custom styles for PARTENAIRE AEV */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #10b981;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #059669;
}

/* Smooth transitions */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
}

/* Custom animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Table hover effects */
tr:hover td {
    background-color: #f9fafb;
}

/* Button hover lift */
button:not(:disabled):hover {
    transform: translateY(-1px);
}

/* Input focus effects */
input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Card hover effect */
.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-completed {
    background-color: #d1fae5;
    color: #065f46;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .shadow-sm, .shadow-xl {
        box-shadow: none !important;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    body > div.flex.h-screen {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    
    aside {
        width: 100% !important;
        min-width: 0;
        height: auto;
        transform: none !important;
        position: relative;
    }
    
    main {
        width: 100%;
        overflow: visible;
        min-width: 0;
    }

    header {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    header > div,
    header .flex.justify-between.items-center,
    header .flex.items-center.space-x-3,
    .flex.justify-between.items-center {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    header h2 {
        width: 100%;
    }

    header .relative,
    header button,
    header a {
        max-width: 100%;
    }

    header input {
        width: 100% !important;
    }

    .p-8 {
        padding: 1rem !important;
    }

    .p-6 {
        padding: 1rem !important;
    }

    .px-6 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .py-6 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    .grid {
        gap: 1rem;
    }

    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
    }

    /* Scoped to the admin dashboard's data tables (always wrapped in
       .overflow-x-auto) so they stay scrollable on small screens, without
       forcing unrelated tables elsewhere (e.g. partner-profile.html's
       label/value details table) to overflow their own card. */
    .overflow-x-auto table {
        min-width: 640px;
    }

    canvas {
        max-height: 220px;
    }

    .text-2xl {
        font-size: 1.25rem;
        line-height: 1.75rem;
    }

    .text-3xl {
        font-size: 1.875rem;
        line-height: 2.25rem;
    }
}

/* Chart container fixes */
canvas {
    max-height: 300px;
}

/* Custom green shades for the chameleon theme */
.bg-emerald-50 { background-color: #ecfdf5; }
.bg-emerald-100 { background-color: #d1fae5; }
.bg-emerald-200 { background-color: #a7f3d0; }
.bg-emerald-600 { background-color: #059669; }
.bg-emerald-700 { background-color: #047857; }
.bg-emerald-800 { background-color: #065f46; }
.bg-emerald-900 { background-color: #064e3b; }
.text-emerald-300 { color: #6ee7b7; }
.text-emerald-600 { color: #059669; }
.text-emerald-700 { color: #047857; }
.text-emerald-800 { color: #065f46; }
.border-emerald-400 { border-color: #34d399; }
.border-emerald-600 { border-color: #059669; }
.border-emerald-800 { border-color: #065f46; }

/* Header / Topbar improvements */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.site-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}
.site-logo .mark {
    width: 40px; height: 40px; border-radius: 8px; background: linear-gradient(135deg,#059669,#34d399); display:flex;align-items:center;justify-content:center;color:white;font-weight:700;font-size:18px
}
.user-chip {
    display:inline-flex;align-items:center;gap:0.5rem;padding:6px 10px;border-radius:9999px;background:#f3f4f6;color:#0f172a;font-weight:600;font-size:0.9rem;border:1px solid #e6e6e6
}

/* Improved login card using existing tokens */
.login-card { max-width:420px; width:100%; background:white; padding:28px; border-radius:12px; box-shadow:0 10px 30px rgba(2,6,23,0.08); }
.login-card h2 { margin:0 0 12px 0; font-size:1.5rem; color:#064e3b }
.login-card label { font-size:0.85rem; color:#475569 }
.login-card input { padding:10px 12px; border-radius:8px; border:1px solid #e6e6e6; margin-top:6px }

/* ===== Admin dashboard shell (index / donation-form / expense-form / reports / partners) ===== */
.sidebar-brand{display:flex;align-items:center;gap:12px}
.sidebar-mark{
    width:44px;height:44px;border-radius:12px;flex:none;
    background:linear-gradient(135deg,#6ee7b7,#059669);
    display:flex;align-items:center;justify-content:center;
    color:#022c22;font-weight:800;font-size:15px;letter-spacing:-0.02em;
    box-shadow:0 4px 10px rgba(0,0,0,0.18);
}
.sidebar-brand-text h1{font-size:1.05rem;line-height:1.25;margin:0}
.sidebar-brand-text p{margin:1px 0 0}

.nav-link{
    display:flex;align-items:center;
    margin:2px 12px;padding:10px 14px;border-radius:10px;
    color:#a7f3d0;font-size:0.92rem;font-weight:500;
    transition:background-color .15s ease,color .15s ease;
}
.nav-link i{margin-right:12px;width:18px;height:18px;flex:none}
.nav-link:hover{background:rgba(255,255,255,0.08);color:#fff}
.nav-link.active{background:rgba(255,255,255,0.16);color:#fff;font-weight:600;box-shadow:inset 3px 0 0 #34d399}

.app-header{
    position:sticky;top:0;z-index:10;
    backdrop-filter:blur(6px);
    background:rgba(255,255,255,0.92);
}

/* Modal polish: rounded corners + soft blurred backdrop */
.modal-overlay{background:rgba(15,23,42,0.55);backdrop-filter:blur(2px)}
.login-error { color:#b91c1c; margin-top:10px; font-size:0.95rem }