:root {
    /* Colores Tierra Dominantes */
    --finca-green: #22C55E;
    --finca-green-dark: #166534;
    --finca-green-light: #86EFAC;
    --finca-terracotta: #C2410C;
    --finca-terracotta-light: #FB923C;

    /* Acentos Naturales */
    --finca-emerald: #10B981;
    --finca-sky: #0EA5E9;
    --finca-sun: #EAB308;
    --finca-sun-light: #FDE047;

    /* Neutros Cálidos */
    --finca-stone: #78716C;
    --finca-stone-dark: #1C1917;
    --finca-stone-light: #F5F5F4;
    --finca-cream: #FEFCE8;

    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --shadow-green: 0 10px 40px -10px rgba(34, 197, 94, 0.4);
    --shadow-terracotta: 0 10px 40px -10px rgba(194, 65, 12, 0.4);

    /* Layout */
    --sidebar-width: 280px;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--finca-stone-dark);
    background: linear-gradient(135deg, #F0FDF4 0%, #ECFDF5 50%, #FEF9C3 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* =============================================
   APP WRAPPER
============================================= */
.sf-app {
    display: flex;
    min-height: 100vh;
}

/* =============================================
   SIDEBAR
============================================= */
.sf-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #166534 0%, #14532D 100%);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sf-sidebar-header {
    padding: 24px 20px;
    background: rgba(0,0,0,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sf-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.sf-sidebar-logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #22C55E, #16A34A);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    box-shadow: var(--shadow-green);
}

.sf-sidebar-logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.sf-sidebar-logo-text small {
    display: block;
    font-size: 9px;
    font-weight: 400;
    color: rgba(255,255,255,0.7);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sf-sidebar-nav {
    flex: 1;
    padding: 20px 12px;
    overflow-y: auto;
}

.sf-nav-section {
    margin-bottom: 24px;
}

.sf-nav-section-title {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 12px;
    margin-bottom: 8px;
}

.sf-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.sf-nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.sf-nav-item.active {
    background: linear-gradient(135deg, #22C55E, #16A34A);
    color: #fff;
    box-shadow: var(--shadow-green);
}

.sf-nav-item i {
    width: 24px;
    text-align: center;
    font-size: 18px;
}

.sf-sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sf-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
}

.sf-user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.3);
}

.sf-user-info {
    flex: 1;
    min-width: 0;
}

.sf-user-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sf-user-role {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

/* =============================================
   MAIN CONTENT
============================================= */
.sf-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =============================================
   HEADER
============================================= */
.sf-header {
    position: sticky;
    top: 0;
    height: var(--header-height);
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    z-index: 100;
}

.sf-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sf-mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: none;
    background: var(--finca-stone-light);
    border-radius: 12px;
    cursor: pointer;
    font-size: 20px;
    color: var(--finca-stone-dark);
}

.sf-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--finca-stone);
}

.sf-breadcrumb a {
    color: var(--finca-green-dark);
    text-decoration: none;
}

.sf-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sf-header-date {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #F0FDF4, #DCFCE7);
    border-radius: 50px;
    font-size: 13px;
    color: var(--finca-green-dark);
    font-weight: 500;
}

/* =============================================
   PAGE CONTENT
============================================= */
.sf-content {
    flex: 1;
    padding: 32px;
}

/* =============================================
   CARDS & COMPONENTS
============================================= */
.sf-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.sf-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #F3F4F6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.sf-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--finca-stone-dark);
}

.sf-card-body {
    padding: 24px;
}

.sf-card-bordered {
    border: 2px solid #E5E7EB;
    box-shadow: none;
}
.sf-card-bordered:hover {
    border-color: var(--finca-green-light);
}
.sf-card-sm {
    border-radius: 14px;
}
.sf-card-sm .sf-card-body {
    padding: 16px;
}

/* =============================================
   MODULE HEADER
============================================= */
.sf-module-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 28px;
    background: linear-gradient(135deg, var(--finca-green) 0%, var(--finca-green-dark) 100%);
    border-radius: 24px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-green);
}

.sf-module-header-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sf-module-header-icon {
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
}

.sf-module-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.sf-module-header p {
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    margin: 4px 0 0;
}

.sf-module-header-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Module Header Color Themes */
.sf-module-header-orange {
    background: linear-gradient(135deg, #FF7043 0%, #E64A19 100%);
    box-shadow: 0 8px 32px rgba(230,74,25,0.3);
}
.sf-module-header-blue {
    background: linear-gradient(135deg, #42A5F5 0%, #1976D2 100%);
    box-shadow: 0 8px 32px rgba(25,118,210,0.3);
}
.sf-module-header-terracotta {
    background: linear-gradient(135deg, var(--finca-terracotta-light) 0%, var(--finca-terracotta) 100%);
    box-shadow: var(--shadow-terracotta);
}
.sf-module-header-purple {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    box-shadow: 0 8px 32px rgba(139,92,246,0.3);
}
.sf-module-header-teal {
    background: linear-gradient(135deg, #14B8A6 0%, #0D9488 100%);
    box-shadow: 0 8px 32px rgba(20,184,166,0.3);
}
.sf-module-header-amber {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    box-shadow: 0 8px 32px rgba(245,158,11,0.3);
}
.sf-module-header-sky {
    background: linear-gradient(135deg, #0EA5E9 0%, #0284C7 100%);
    box-shadow: 0 8px 32px rgba(14,165,233,0.3);
}

/* =============================================
   TOOLBAR / FILTER BAR
============================================= */
.sf-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.sf-toolbar-search {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.sf-toolbar-search i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
}

.sf-toolbar-search input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.2s;
}

.sf-toolbar-search input:focus {
    outline: none;
    border-color: var(--finca-green);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.sf-toolbar-select {
    padding: 12px 40px 12px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    min-width: 160px;
    font-size: 14px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") no-repeat right 12px center;
    background-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}

.sf-toolbar-select:focus {
    outline: none;
    border-color: var(--finca-green);
}

@media (max-width: 768px) {
    .sf-toolbar {
        padding: 12px 16px;
    }
    .sf-toolbar-search {
        min-width: 100%;
        order: -1;
    }
    .sf-toolbar-select {
        flex: 1;
        min-width: calc(50% - 6px);
    }
}

/* =============================================
   FILTER PILLS / TABS
============================================= */
.sf-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.sf-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 50px;
    border: 2px solid #E5E7EB;
    background: #fff;
    color: #6B7280;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sf-filter-pill:hover {
    border-color: var(--finca-green);
    color: var(--finca-green-dark);
}

.sf-filter-pill.active {
    border-color: var(--finca-green);
    background: var(--finca-green);
    color: #fff;
}

.sf-filter-pill-blue.active {
    border-color: #1976D2;
    background: #1976D2;
}

.sf-filter-pill-orange.active {
    border-color: #E64A19;
    background: #E64A19;
}

.sf-filter-pill .sf-pill-count {
    padding: 2px 10px;
    border-radius: 50px;
    font-size: 12px;
    background: rgba(0,0,0,0.1);
}

.sf-filter-pill.active .sf-pill-count {
    background: rgba(255,255,255,0.3);
}

@media (max-width: 640px) {
    .sf-filter-pills {
        gap: 8px;
    }
    .sf-filter-pill {
        padding: 8px 14px;
        font-size: 13px;
    }
}

/* =============================================
   AVATAR SYSTEM
============================================= */
.sf-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
}
.sf-avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.sf-avatar-md { width: 40px; height: 40px; font-size: 14px; }
.sf-avatar-lg { width: 56px; height: 56px; font-size: 18px; }
.sf-avatar-xl { width: 80px; height: 80px; font-size: 24px; }

.sf-avatar-primary { background: linear-gradient(135deg, var(--finca-green), var(--finca-green-dark)); color: #fff; }
.sf-avatar-blue { background: linear-gradient(135deg, #42A5F5, #1976D2); color: #fff; }
.sf-avatar-orange { background: linear-gradient(135deg, #FF7043, #E64A19); color: #fff; }
.sf-avatar-purple { background: linear-gradient(135deg, #8B5CF6, #7C3AED); color: #fff; }
.sf-avatar-teal { background: linear-gradient(135deg, #14B8A6, #0D9488); color: #fff; }
.sf-avatar-gray { background: #E5E7EB; color: #6B7280; }

.sf-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* =============================================
   UTILITY CLASSES (Enhanced)
============================================= */
.sf-flex { display: flex; }
.sf-flex-col { flex-direction: column; }
.sf-flex-wrap { flex-wrap: wrap; }
.sf-items-center { align-items: center; }
.sf-items-start { align-items: flex-start; }
.sf-items-end { align-items: flex-end; }
.sf-justify-center { justify-content: center; }
.sf-justify-between { justify-content: space-between; }
.sf-justify-end { justify-content: flex-end; }
.sf-gap-1 { gap: 4px; }
.sf-gap-2 { gap: 8px; }
.sf-gap-3 { gap: 12px; }
.sf-gap-4 { gap: 16px; }
.sf-gap-5 { gap: 20px; }
.sf-gap-6 { gap: 24px; }

.sf-p-0 { padding: 0 !important; }
.sf-p-2 { padding: 8px; }
.sf-p-3 { padding: 12px; }
.sf-p-4 { padding: 16px; }
.sf-p-5 { padding: 20px; }
.sf-p-6 { padding: 24px; }
.sf-px-4 { padding-left: 16px; padding-right: 16px; }
.sf-py-2 { padding-top: 8px; padding-bottom: 8px; }
.sf-py-3 { padding-top: 12px; padding-bottom: 12px; }
.sf-py-4 { padding-top: 16px; padding-bottom: 16px; }
.sf-py-8 { padding-top: 32px; padding-bottom: 32px; }
.sf-py-12 { padding-top: 48px; padding-bottom: 48px; }

.sf-m-0 { margin: 0 !important; }
.sf-mb-1 { margin-bottom: 4px; }
.sf-mb-2 { margin-bottom: 8px; }
.sf-mb-3 { margin-bottom: 12px; }
.sf-mb-4 { margin-bottom: 16px; }
.sf-mb-5 { margin-bottom: 20px; }
.sf-mb-6 { margin-bottom: 24px; }
.sf-mt-2 { margin-top: 8px; }
.sf-mt-3 { margin-top: 12px; }
.sf-mt-4 { margin-top: 16px; }
.sf-mr-1 { margin-right: 4px; }
.sf-mr-2 { margin-right: 8px; }

.sf-w-full { width: 100%; }
.sf-h-full { height: 100%; }
.sf-min-w-0 { min-width: 0; }

.sf-text-center { text-align: center; }
.sf-text-right { text-align: right; }
.sf-text-left { text-align: left; }

.sf-text-xs { font-size: 11px; }
.sf-text-sm { font-size: 13px; }
.sf-text-base { font-size: 15px; }
.sf-text-lg { font-size: 18px; }
.sf-text-xl { font-size: 20px; }
.sf-text-2xl { font-size: 24px; }
.sf-text-3xl { font-size: 30px; }
.sf-text-4xl { font-size: 36px; }

.sf-font-normal { font-weight: 400; }
.sf-font-medium { font-weight: 500; }
.sf-font-semibold { font-weight: 600; }
.sf-font-bold { font-weight: 700; }

.sf-text-white { color: #fff; }
.sf-text-muted { color: #6B7280; }
.sf-text-gray-500 { color: #6B7280; }
.sf-text-gray-700 { color: #374151; }
.sf-text-gray-900 { color: #111827; }
.sf-text-green { color: var(--finca-green); }
.sf-text-green-dark { color: var(--finca-green-dark); }
.sf-text-danger { color: #DC2626; }
.sf-text-warning { color: #D97706; }

.sf-bg-white { background: #fff; }
.sf-bg-gray-50 { background: #F9FAFB; }
.sf-bg-gray-100 { background: #F3F4F6; }
.sf-bg-primary { background: linear-gradient(135deg, var(--finca-green), var(--finca-green-dark)); }
.sf-bg-green-50 { background: #F0FDF4; }

.sf-rounded { border-radius: 8px; }
.sf-rounded-lg { border-radius: 12px; }
.sf-rounded-xl { border-radius: 16px; }
.sf-rounded-2xl { border-radius: 20px; }
.sf-rounded-full { border-radius: 50px; }

.sf-shadow { box-shadow: var(--shadow-md); }
.sf-shadow-lg { box-shadow: var(--shadow-lg); }

.sf-overflow-hidden { overflow: hidden; }
.sf-overflow-x-auto { overflow-x: auto; }

.sf-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sf-border { border: 1px solid #E5E7EB; }
.sf-border-b { border-bottom: 1px solid #E5E7EB; }
.sf-border-t { border-top: 1px solid #E5E7EB; }

.sf-cursor-pointer { cursor: pointer; }
.sf-transition { transition: all 0.2s ease; }

.sf-hidden { display: none !important; }
.sf-block { display: block; }
.sf-inline-block { display: inline-block; }
.sf-inline-flex { display: inline-flex; }

/* Responsive Utilities */
@media (max-width: 768px) {
    .sf-hidden-mobile { display: none !important; }
    .sf-flex-col-mobile { flex-direction: column; }
    .sf-text-center-mobile { text-align: center; }
    .sf-w-full-mobile { width: 100%; }
}

@media (min-width: 769px) {
    .sf-hidden-desktop { display: none !important; }
}

/* =============================================
   TABLE RESPONSIVE
============================================= */
.sf-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.sf-table-responsive::-webkit-scrollbar {
    height: 6px;
}

.sf-table-responsive::-webkit-scrollbar-track {
    background: #F3F4F6;
    border-radius: 3px;
}

.sf-table-responsive::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 3px;
}

.sf-table-responsive::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

/* =============================================
   EMPTY STATE
============================================= */
.sf-empty-state {
    text-align: center;
    padding: 48px 24px;
}

.sf-empty-state i {
    font-size: 48px;
    color: #D1D5DB;
    margin-bottom: 16px;
}

.sf-empty-state p {
    color: #6B7280;
    margin: 0;
}

/* =============================================
   BUTTONS
============================================= */
.sf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.sf-btn:hover {
    transform: translateY(-2px);
}

.sf-btn:active {
    transform: translateY(0) scale(0.98);
}

.sf-btn-primary {
    background: linear-gradient(135deg, var(--finca-green), var(--finca-green-dark));
    color: #fff;
    box-shadow: var(--shadow-green);
}

.sf-btn-white {
    background: #fff;
    color: var(--finca-green-dark);
    box-shadow: var(--shadow-md);
}

.sf-btn-terracotta {
    background: linear-gradient(135deg, var(--finca-terracotta-light), var(--finca-terracotta));
    color: #fff;
    box-shadow: var(--shadow-terracotta);
}

.sf-btn-outline {
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.3);
    color: #fff;
}

.sf-btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.sf-btn-success { background: linear-gradient(135deg, #22C55E, #16A34A); color: #fff; }
.sf-btn-warning { background: linear-gradient(135deg, #F59E0B, #D97706); color: #fff; }
.sf-btn-danger { background: linear-gradient(135deg, #EF4444, #DC2626); color: #fff; }
.sf-btn-info { background: linear-gradient(135deg, #3B82F6, #2563EB); color: #fff; }
.sf-btn-secondary { background: #E5E7EB; color: #374151; }
.sf-btn-secondary:hover { background: #D1D5DB; }
.sf-btn-light { background: #F9FAFB; color: #374151; border: 1px solid #E5E7EB; }
.sf-btn-dark { background: linear-gradient(135deg, #374151, #1F2937); color: #fff; }

/* =============================================
   FORM CONTROLS
============================================= */
.sf-form-group {
    margin-bottom: 20px;
}

.sf-form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--finca-stone-dark);
    margin-bottom: 8px;
}

.sf-form-control {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    border: 2px solid #E5E7EB;
    border-radius: 14px;
    background: #fff;
    color: var(--finca-stone-dark);
    transition: all 0.2s ease;
}

.sf-form-control:focus {
    outline: none;
    border-color: var(--finca-green);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}

.sf-form-control::placeholder {
    color: #9CA3AF;
}

select.sf-form-control,
.sf-form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 20px;
    padding-right: 48px;
}

/* Form Grid (alias para sf-grid) */
.sf-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.sf-form-grid-3 { grid-template-columns: repeat(3, 1fr); }
.sf-form-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Label alias */
.sf-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--finca-stone-dark);
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .sf-form-grid,
    .sf-form-grid-3,
    .sf-form-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* =============================================
   STATS CARDS
============================================= */
.sf-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.sf-stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: #fff;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease;
}

.sf-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.sf-stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
}

.sf-stat-icon.green { background: linear-gradient(135deg, #22C55E, #16A34A); }
.sf-stat-icon.blue { background: linear-gradient(135deg, #3B82F6, #2563EB); }
.sf-stat-icon.orange { background: linear-gradient(135deg, #F59E0B, #D97706); }
.sf-stat-icon.red { background: linear-gradient(135deg, #EF4444, #DC2626); }
.sf-stat-icon.purple { background: linear-gradient(135deg, #8B5CF6, #7C3AED); }
.sf-stat-icon.teal { background: linear-gradient(135deg, #14B8A6, #0D9488); }

.sf-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--finca-stone-dark);
    line-height: 1;
}

.sf-stat-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--finca-stone);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* =============================================
   BADGES
============================================= */
.sf-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sf-badge-success { background: #DCFCE7; color: #166534; }
.sf-badge-danger { background: #FEE2E2; color: #991B1B; }
.sf-badge-warning { background: #FEF3C7; color: #92400E; }
.sf-badge-info { background: #DBEAFE; color: #1E40AF; }
.sf-badge-primary { background: #DCFCE7; color: #166534; }

/* =============================================
   DATA TABLE
============================================= */
.sf-table-container {
    background: #fff;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.sf-table-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid #F3F4F6;
}

.sf-search-box {
    position: relative;
    flex: 1;
    max-width: 320px;
}

.sf-search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
}

.sf-search-box input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.2s;
}

.sf-search-box input:focus {
    outline: none;
    border-color: var(--finca-green);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.sf-table {
    width: 100%;
    border-collapse: collapse;
}

.sf-table th {
    padding: 14px 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--finca-stone);
    background: #F9FAFB;
    text-align: left;
    border-bottom: 2px solid #E5E7EB;
}

.sf-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #F3F4F6;
    vertical-align: middle;
}

.sf-table tbody tr {
    transition: background 0.15s ease;
}

.sf-table tbody tr:hover {
    background: #F0FDF4;
}

.sf-table-actions {
    display: flex;
    gap: 8px;
}

.sf-table-actions .sf-btn {
    padding: 8px 12px;
}

/* =============================================
   GRID CARDS
============================================= */
.sf-grid {
    display: grid;
    gap: 20px;
}

.sf-grid-3 {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.sf-user-card-item {
    background: #fff;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all 0.2s ease;
}

.sf-user-card-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.sf-user-card-header {
    position: relative;
    padding: 24px;
    text-align: center;
    background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
}

.sf-user-card-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: var(--shadow-md);
}

.sf-user-card-status {
    position: absolute;
    top: 16px;
    right: 16px;
}

.sf-user-card-body {
    padding: 20px 24px;
}

.sf-user-card-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--finca-stone-dark);
    text-align: center;
    margin-bottom: 4px;
}

.sf-user-card-username {
    font-size: 14px;
    color: var(--finca-stone);
    text-align: center;
    margin-bottom: 16px;
}

.sf-user-card-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding-top: 16px;
    border-top: 1px solid #F3F4F6;
}

/* =============================================
   MODAL OVERRIDES
============================================= */
.modal-header {
    background: linear-gradient(135deg, var(--finca-green) 0%, var(--finca-green-dark) 100%) !important;
}

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 1024px) {
    .sf-sidebar {
        transform: translateX(-100%);
    }

    .sf-sidebar.open {
        transform: translateX(0);
    }

    .sf-main {
        margin-left: 0;
    }

    .sf-mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .sf-content {
        padding: 20px;
    }

    .sf-module-header {
        padding: 20px;
    }

    .sf-module-header h1 {
        font-size: 20px;
    }
}

@media (max-width: 640px) {
    .sf-stats-grid {
        grid-template-columns: 1fr;
    }

    .sf-module-header {
        flex-direction: column;
        text-align: center;
    }

    .sf-module-header-content {
        flex-direction: column;
    }

    .sf-table-header {
        flex-direction: column;
    }

    .sf-search-box {
        max-width: 100%;
    }

    .sf-header {
        padding: 0 16px;
    }

    .sf-header-date {
        display: none;
    }
}

/* Overlay móvil */
.sf-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.sf-sidebar-overlay.show {
    display: block;
}

/* Legacy Bootstrap overrides */
.form-control {
    padding: 14px 18px !important;
    border: 2px solid #E5E7EB !important;
    border-radius: 14px !important;
    font-size: 15px !important;
}
.form-control:focus {
    border-color: var(--finca-green) !important;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15) !important;
}
.btn { border-radius: 50px !important; }
.modal-content { border-radius: 20px !important; border: none !important; }
.modal-body { max-height: calc(100vh - 200px); overflow-y: auto; }

/* =============================================
   SMARTFINCA DESIGN SYSTEM - CLASES UTILITARIAS
============================================= */

/* ----- GRID SYSTEM ----- */
.sf-grid { display: grid; gap: 16px; }
.sf-grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.sf-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.sf-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.sf-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.sf-grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
.sf-grid-cols-6 { grid-template-columns: repeat(6, 1fr); }
.sf-col-span-2 { grid-column: span 2; }
.sf-col-span-3 { grid-column: span 3; }
.sf-col-span-4 { grid-column: span 4; }
.sf-col-span-full { grid-column: 1 / -1; }
.sf-gap-1 { gap: 4px; }
.sf-gap-2 { gap: 8px; }
.sf-gap-3 { gap: 12px; }
.sf-gap-4 { gap: 16px; }
.sf-gap-5 { gap: 20px; }
.sf-gap-6 { gap: 24px; }

/* ----- FLEXBOX UTILITIES ----- */
.sf-flex { display: flex !important; }
.sf-inline-flex { display: inline-flex !important; }
.sf-flex-wrap { flex-wrap: wrap !important; }
.sf-flex-nowrap { flex-wrap: nowrap !important; }
.sf-flex-col { flex-direction: column !important; }
.sf-flex-row { flex-direction: row !important; }
.sf-items-start { align-items: flex-start !important; }
.sf-items-center { align-items: center !important; }
.sf-items-end { align-items: flex-end !important; }
.sf-items-stretch { align-items: stretch !important; }
.sf-justify-start { justify-content: flex-start !important; }
.sf-justify-center { justify-content: center !important; }
.sf-justify-end { justify-content: flex-end !important; }
.sf-justify-between { justify-content: space-between !important; }
.sf-justify-around { justify-content: space-around !important; }
.sf-flex-1 { flex: 1 !important; }
.sf-flex-auto { flex: auto !important; }
.sf-flex-none { flex: none !important; }

/* ----- SPACING UTILITIES ----- */
.sf-m-0 { margin: 0 !important; }
.sf-m-1 { margin: 4px !important; }
.sf-m-2 { margin: 8px !important; }
.sf-m-3 { margin: 12px !important; }
.sf-m-4 { margin: 16px !important; }
.sf-mt-0 { margin-top: 0 !important; }
.sf-mt-1 { margin-top: 4px !important; }
.sf-mt-2 { margin-top: 8px !important; }
.sf-mt-3 { margin-top: 12px !important; }
.sf-mt-4 { margin-top: 16px !important; }
.sf-mt-5 { margin-top: 20px !important; }
.sf-mt-6 { margin-top: 24px !important; }
.sf-mb-0 { margin-bottom: 0 !important; }
.sf-mb-1 { margin-bottom: 4px !important; }
.sf-mb-2 { margin-bottom: 8px !important; }
.sf-mb-3 { margin-bottom: 12px !important; }
.sf-mb-4 { margin-bottom: 16px !important; }
.sf-mb-5 { margin-bottom: 20px !important; }
.sf-mb-6 { margin-bottom: 24px !important; }
.sf-ml-0 { margin-left: 0 !important; }
.sf-ml-1 { margin-left: 4px !important; }
.sf-ml-2 { margin-left: 8px !important; }
.sf-ml-3 { margin-left: 12px !important; }
.sf-ml-4 { margin-left: 16px !important; }
.sf-mr-0 { margin-right: 0 !important; }
.sf-mr-1 { margin-right: 4px !important; }
.sf-mr-2 { margin-right: 8px !important; }
.sf-mr-3 { margin-right: 12px !important; }
.sf-mr-4 { margin-right: 16px !important; }
.sf-mx-auto { margin-left: auto !important; margin-right: auto !important; }
.sf-my-0 { margin-top: 0 !important; margin-bottom: 0 !important; }
.sf-my-2 { margin-top: 8px !important; margin-bottom: 8px !important; }
.sf-my-4 { margin-top: 16px !important; margin-bottom: 16px !important; }

.sf-p-0 { padding: 0 !important; }
.sf-p-1 { padding: 4px !important; }
.sf-p-2 { padding: 8px !important; }
.sf-p-3 { padding: 12px !important; }
.sf-p-4 { padding: 16px !important; }
.sf-p-5 { padding: 20px !important; }
.sf-p-6 { padding: 24px !important; }
.sf-pt-0 { padding-top: 0 !important; }
.sf-pt-4 { padding-top: 16px !important; }
.sf-pb-0 { padding-bottom: 0 !important; }
.sf-pb-4 { padding-bottom: 16px !important; }
.sf-px-0 { padding-left: 0 !important; padding-right: 0 !important; }
.sf-px-2 { padding-left: 8px !important; padding-right: 8px !important; }
.sf-px-4 { padding-left: 16px !important; padding-right: 16px !important; }
.sf-px-6 { padding-left: 24px !important; padding-right: 24px !important; }
.sf-py-0 { padding-top: 0 !important; padding-bottom: 0 !important; }
.sf-py-2 { padding-top: 8px !important; padding-bottom: 8px !important; }
.sf-py-4 { padding-top: 16px !important; padding-bottom: 16px !important; }
.sf-py-6 { padding-top: 24px !important; padding-bottom: 24px !important; }
.sf-py-8 { padding-top: 32px !important; padding-bottom: 32px !important; }
.sf-py-12 { padding-top: 48px !important; padding-bottom: 48px !important; }

/* ----- TEXT UTILITIES ----- */
.sf-text-xs { font-size: 11px !important; }
.sf-text-sm { font-size: 13px !important; }
.sf-text-base { font-size: 15px !important; }
.sf-text-lg { font-size: 18px !important; }
.sf-text-xl { font-size: 20px !important; }
.sf-text-2xl { font-size: 24px !important; }
.sf-text-3xl { font-size: 30px !important; }
.sf-text-4xl { font-size: 36px !important; }
.sf-text-left { text-align: left !important; }
.sf-text-center { text-align: center !important; }
.sf-text-right { text-align: right !important; }
.sf-font-normal { font-weight: 400 !important; }
.sf-font-medium { font-weight: 500 !important; }
.sf-font-semibold { font-weight: 600 !important; }
.sf-font-bold { font-weight: 700 !important; }
.sf-uppercase { text-transform: uppercase !important; }
.sf-lowercase { text-transform: lowercase !important; }
.sf-capitalize { text-transform: capitalize !important; }
.sf-italic { font-style: italic !important; }
.sf-underline { text-decoration: underline !important; }
.sf-line-through { text-decoration: line-through !important; }
.sf-no-underline { text-decoration: none !important; }
.sf-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ----- TEXT COLORS ----- */
.sf-text-white { color: #ffffff !important; }
.sf-text-black { color: #000000 !important; }
.sf-text-gray-900 { color: #1F2937 !important; }
.sf-text-gray-800 { color: #374151 !important; }
.sf-text-gray-700 { color: #4B5563 !important; }
.sf-text-gray-600 { color: #6B7280 !important; }
.sf-text-gray-500 { color: #9CA3AF !important; }
.sf-text-gray-400 { color: #D1D5DB !important; }
.sf-text-muted { color: #6B7280 !important; }
.sf-text-primary { color: var(--finca-green) !important; }
.sf-text-success { color: #22C55E !important; }
.sf-text-danger { color: #EF4444 !important; }
.sf-text-warning { color: #F59E0B !important; }
.sf-text-info { color: #3B82F6 !important; }

/* ----- BACKGROUND COLORS ----- */
.sf-bg-white { background-color: #ffffff !important; }
.sf-bg-gray-50 { background-color: #F9FAFB !important; }
.sf-bg-gray-100 { background-color: #F3F4F6 !important; }
.sf-bg-gray-200 { background-color: #E5E7EB !important; }
.sf-bg-primary { background: linear-gradient(135deg, var(--finca-green), var(--finca-green-dark)) !important; }
.sf-bg-primary-light { background-color: #DCFCE7 !important; }
.sf-bg-success { background-color: #22C55E !important; }
.sf-bg-success-light { background-color: #DCFCE7 !important; }
.sf-bg-danger { background-color: #EF4444 !important; }
.sf-bg-danger-light { background-color: #FEE2E2 !important; }
.sf-bg-warning { background-color: #F59E0B !important; }
.sf-bg-warning-light { background-color: #FEF3C7 !important; }
.sf-bg-info { background-color: #3B82F6 !important; }
.sf-bg-info-light { background-color: #DBEAFE !important; }
.sf-bg-transparent { background-color: transparent !important; }

/* ----- BORDER RADIUS ----- */
.sf-rounded-none { border-radius: 0 !important; }
.sf-rounded-sm { border-radius: 4px !important; }
.sf-rounded { border-radius: 8px !important; }
.sf-rounded-md { border-radius: 10px !important; }
.sf-rounded-lg { border-radius: 14px !important; }
.sf-rounded-xl { border-radius: 18px !important; }
.sf-rounded-2xl { border-radius: 20px !important; }
.sf-rounded-3xl { border-radius: 24px !important; }
.sf-rounded-full { border-radius: 50px !important; }

/* ----- BORDERS ----- */
.sf-border { border: 1px solid #E5E7EB !important; }
.sf-border-0 { border: 0 !important; }
.sf-border-t { border-top: 1px solid #E5E7EB !important; }
.sf-border-b { border-bottom: 1px solid #E5E7EB !important; }
.sf-border-l { border-left: 1px solid #E5E7EB !important; }
.sf-border-r { border-right: 1px solid #E5E7EB !important; }
.sf-border-2 { border-width: 2px !important; }
.sf-border-gray-200 { border-color: #E5E7EB !important; }
.sf-border-gray-300 { border-color: #D1D5DB !important; }
.sf-border-primary { border-color: var(--finca-green) !important; }

/* ----- WIDTH & HEIGHT ----- */
.sf-w-full { width: 100% !important; }
.sf-w-auto { width: auto !important; }
.sf-w-1\/2 { width: 50% !important; }
.sf-w-1\/3 { width: 33.333% !important; }
.sf-w-2\/3 { width: 66.666% !important; }
.sf-h-auto { height: auto !important; }
.sf-h-full { height: 100% !important; }
.sf-min-h-screen { min-height: 100vh !important; }
.sf-max-w-full { max-width: 100% !important; }

/* ----- DISPLAY ----- */
.sf-block { display: block !important; }
.sf-inline-block { display: inline-block !important; }
.sf-inline { display: inline !important; }
.sf-hidden { display: none !important; }
.sf-visible { visibility: visible !important; }
.sf-invisible { visibility: hidden !important; }

/* ----- POSITIONING ----- */
.sf-relative { position: relative !important; }
.sf-absolute { position: absolute !important; }
.sf-fixed { position: fixed !important; }
.sf-sticky { position: sticky !important; }

/* ----- OVERFLOW ----- */
.sf-overflow-hidden { overflow: hidden !important; }
.sf-overflow-auto { overflow: auto !important; }
.sf-overflow-x-auto { overflow-x: auto !important; }
.sf-overflow-y-auto { overflow-y: auto !important; }

/* ----- SHADOWS ----- */
.sf-shadow-none { box-shadow: none !important; }
.sf-shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important; }
.sf-shadow { box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1) !important; }
.sf-shadow-md { box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06) !important; }
.sf-shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1) !important; }
.sf-shadow-xl { box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1) !important; }

/* ----- OPACITY ----- */
.sf-opacity-0 { opacity: 0 !important; }
.sf-opacity-25 { opacity: 0.25 !important; }
.sf-opacity-50 { opacity: 0.5 !important; }
.sf-opacity-75 { opacity: 0.75 !important; }
.sf-opacity-100 { opacity: 1 !important; }

/* ----- CURSOR ----- */
.sf-cursor-pointer { cursor: pointer !important; }
.sf-cursor-default { cursor: default !important; }
.sf-cursor-not-allowed { cursor: not-allowed !important; }

/* ----- TRANSITIONS ----- */
.sf-transition { transition: all 0.2s ease !important; }
.sf-transition-fast { transition: all 0.15s ease !important; }
.sf-transition-slow { transition: all 0.3s ease !important; }

/* =============================================
   SMARTFINCA MODAL SYSTEM
============================================= */
.sf-modal .modal-dialog {
    max-width: 600px;
    margin: 30px auto;
}
.sf-modal .modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    overflow: hidden;
}
.sf-modal .modal-header,
.sf-modal-header {
    background: linear-gradient(135deg, var(--finca-green) 0%, var(--finca-green-dark) 100%) !important;
    padding: 20px 24px;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sf-modal .modal-title,
.sf-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff !important;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.sf-modal .close,
.sf-modal-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    opacity: 0.9;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}
.sf-modal .close:hover,
.sf-modal-close:hover {
    background: rgba(255,255,255,0.3);
    opacity: 1;
}
.sf-modal .modal-body,
.sf-modal-body {
    padding: 24px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    scroll-behavior: smooth;
}
.sf-modal .modal-footer,
.sf-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #E5E7EB;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #F9FAFB;
}

/* Modal sizes */
.sf-modal-sm .modal-dialog { max-width: 400px; }
.sf-modal-lg .modal-dialog { max-width: 800px; }
.sf-modal-xl .modal-dialog { max-width: 1000px; }
.sf-modal-xxl .modal-dialog { max-width: 1200px; }
.sf-modal-fullscreen .modal-dialog { max-width: 95%; width: 95%; }

/* ── Overlay pattern (kardex, etc.) ── */
.sf-modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 10000 !important;
    background: rgba(0, 0, 0, 0.55) !important;
    backdrop-filter: blur(4px);
    display: none;
    align-items: center !important;
    justify-content: center !important;
    padding: 1rem !important;
}
.sf-modal-overlay > .sf-modal {
    position: relative !important;
    background: #fff !important;
    border-radius: 20px !important;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25) !important;
    overflow: hidden !important;
    width: 100% !important;
    animation: sfModalIn 0.25s ease;
}
@keyframes sfModalIn {
    from { opacity: 0; transform: scale(0.95) translateY(-20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Modal responsive adjustments */
@media (max-width: 768px) {
    .sf-modal .modal-dialog,
    .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    .sf-modal .modal-body,
    .sf-modal-body,
    .modal-body {
        max-height: calc(100vh - 160px);
        padding: 16px;
    }
    .sf-modal .modal-header,
    .modal-header {
        padding: 16px;
    }
    .sf-modal .modal-footer,
    .modal-footer {
        padding: 12px 16px;
        flex-wrap: wrap;
    }
    .sf-grid-cols-2 {
        grid-template-columns: 1fr !important;
    }
}

/* Ensure modal scroll works properly */
.modal.fade .modal-dialog {
    transform: translate(0, -30px);
}
.modal.show .modal-dialog,
.modal.in .modal-dialog {
    transform: translate(0, 0);
}
.modal-open {
    overflow: hidden;
}
.modal {
    overflow-x: hidden;
    overflow-y: auto;
}

/* =============================================
   SMARTFINCA TABS SYSTEM
============================================= */
.sf-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 16px 24px;
    background: #F9FAFB;
    border-bottom: 1px solid #E5E7EB;
}
.sf-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    color: #6B7280;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.sf-tab:hover {
    color: var(--finca-green-dark);
    background: #fff;
}
.sf-tab.active {
    color: var(--finca-green-dark);
    background: #fff;
    border-color: var(--finca-green);
    box-shadow: 0 2px 8px rgba(34,197,94,0.15);
}
.sf-tab i {
    font-size: 16px;
}
.sf-tab-content {
    display: none;
    padding: 24px;
}
.sf-tab-content.active {
    display: block;
}

/* =============================================
   SMARTFINCA FORM SECTIONS
============================================= */
.sf-form-section {
    padding: 20px;
    margin-bottom: 20px;
    background: #FAFAFA;
    border-radius: 16px;
    border: 1px solid #E5E7EB;
}
.sf-form-section:last-child {
    margin-bottom: 0;
}
.sf-form-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--finca-stone-dark);
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--finca-green-light);
    display: flex;
    align-items: center;
    gap: 10px;
}
.sf-form-section-title i {
    color: var(--finca-green);
    font-size: 18px;
}

/* =============================================
   SMARTFINCA INPUT GROUP
============================================= */
.sf-input-group {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.sf-input-group .sf-form-control {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.sf-input-group .sf-btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    padding: 12px 16px;
}
.sf-input-group-text {
    display: flex;
    align-items: center;
    padding: 0 16px;
    background: #F3F4F6;
    border: 2px solid #E5E7EB;
    border-radius: 14px;
    font-size: 14px;
    color: #6B7280;
}

/* =============================================
   SMARTFINCA AVATAR
============================================= */
.sf-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border-radius: 50%;
    text-transform: uppercase;
    flex-shrink: 0;
}
.sf-avatar-xs { width: 24px; height: 24px; font-size: 10px; }
.sf-avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.sf-avatar-md { width: 40px; height: 40px; font-size: 14px; }
.sf-avatar-lg { width: 56px; height: 56px; font-size: 18px; }
.sf-avatar-xl { width: 80px; height: 80px; font-size: 24px; }
.sf-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* =============================================
   SMARTFINCA CHECKBOX & RADIO
============================================= */
.sf-checkbox,
.sf-radio {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    padding: 8px 16px;
    background: #fff;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    transition: all 0.2s ease;
}
.sf-checkbox:hover,
.sf-radio:hover {
    border-color: var(--finca-green);
    background: #F0FDF4;
}
.sf-checkbox input,
.sf-radio input {
    width: 18px;
    height: 18px;
    accent-color: var(--finca-green);
    cursor: pointer;
}
.sf-checkbox.checked,
.sf-checkbox:has(input:checked),
.sf-radio:has(input:checked) {
    border-color: var(--finca-green);
    background: #F0FDF4;
}

/* Standalone checkbox/radio input */
.sf-form-check-input {
    width: 18px;
    height: 18px;
    accent-color: var(--finca-green);
    cursor: pointer;
    margin: 0;
}
.sf-form-check-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

/* =============================================
   SMARTFINCA TABLE ENHANCEMENTS
============================================= */
.sf-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
}
.sf-table-bordered {
    border-collapse: collapse;
}
.sf-table-bordered th,
.sf-table-bordered td {
    border: 1px solid #E5E7EB;
    padding: 12px 16px;
}
.sf-table-bordered thead th {
    background: linear-gradient(135deg, #F0FDF4, #DCFCE7);
    font-weight: 600;
    color: var(--finca-green-dark);
}
.sf-table .sf-form-control-sm {
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 8px;
}

/* =============================================
   FORM CONTROL SIZES
============================================= */
.sf-form-control-sm {
    padding: 8px 12px !important;
    font-size: 13px !important;
    border-radius: 10px !important;
}
.sf-form-control-lg {
    padding: 16px 20px !important;
    font-size: 16px !important;
    border-radius: 16px !important;
}

/* =============================================
   ALERT BOXES
============================================= */
.sf-alert {
    padding: 16px 20px;
    border-radius: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}
.sf-alert-success {
    background: #DCFCE7;
    border: 1px solid #86EFAC;
    color: #166534;
}
.sf-alert-danger {
    background: #FEE2E2;
    border: 1px solid #FECACA;
    color: #991B1B;
}
.sf-alert-warning {
    background: #FEF3C7;
    border: 1px solid #FDE68A;
    color: #92400E;
}
.sf-alert-info {
    background: #DBEAFE;
    border: 1px solid #93C5FD;
    color: #1E40AF;
}

/* =============================================
   ENHANCED RESPONSIVE
============================================= */
@media (max-width: 1024px) {
    .sf-grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .sf-grid-cols-5 { grid-template-columns: repeat(2, 1fr); }
    .sf-grid-cols-6 { grid-template-columns: repeat(3, 1fr); }
    .sf-modal-xl .modal-dialog { max-width: 90%; }
    .sf-modal-xxl .modal-dialog { max-width: 95%; }
    .sf-tabs {
        padding: 12px 16px;
        gap: 6px;
    }
    .sf-tab {
        padding: 8px 14px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .sf-grid-cols-2,
    .sf-grid-cols-3,
    .sf-grid-cols-4,
    .sf-grid-cols-5,
    .sf-grid-cols-6 { grid-template-columns: 1fr; }
    .sf-col-span-2,
    .sf-col-span-3,
    .sf-col-span-4 { grid-column: span 1; }
    .sf-modal .modal-dialog,
    .sf-modal-sm .modal-dialog,
    .sf-modal-lg .modal-dialog,
    .sf-modal-xl .modal-dialog,
    .sf-modal-xxl .modal-dialog {
        max-width: 95%;
        margin: 15px auto;
    }
    .sf-tabs {
        flex-direction: column;
    }
    .sf-tab {
        width: 100%;
        justify-content: center;
    }
    .sf-form-section {
        padding: 16px;
    }
    .sf-input-group {
        flex-direction: column;
    }
    .sf-input-group .sf-form-control,
    .sf-input-group .sf-btn {
        border-radius: 14px;
    }
    .sf-flex-wrap-mobile {
        flex-wrap: wrap !important;
    }
    .sf-hidden-mobile { display: none !important; }
    .sf-block-mobile { display: block !important; }
    .sf-text-center-mobile { text-align: center !important; }
}

@media (max-width: 480px) {
    .sf-btn {
        padding: 10px 18px;
        font-size: 13px;
    }
    .sf-btn-sm {
        padding: 8px 14px;
        font-size: 12px;
    }
    .sf-form-control {
        padding: 12px 14px;
        font-size: 14px;
    }
    .sf-stat-card {
        padding: 16px;
    }
    .sf-stat-value {
        font-size: 24px;
    }
}

/* =============================================
   MODULE PAGE WRAPPER
============================================= */
.sf-module-page {
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =============================================
   LOADING STATES
============================================= */
.sf-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}
.sf-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid #E5E7EB;
    border-top-color: var(--finca-green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =============================================
   TOOLTIP
============================================= */
[data-tooltip] {
    position: relative;
}
[data-tooltip]:hover::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    background: #1F2937;
    color: #fff;
    font-size: 12px;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 6px;
}

/* =============================================
   MODALES FULLWIDTH PROFESIONALES
   Sobreescribir Bootstrap completamente
============================================= */
/* FORZAR modal-dialog fullwidth */
.modal.sf-modal.sf-modal-xl .modal-dialog,
.modal.sf-modal.sf-modal-xxl .modal-dialog,
.modal.sf-modal-full .modal-dialog,
.sf-modal.sf-modal-xl > .modal-dialog,
.sf-modal.sf-modal-xxl > .modal-dialog,
#modalNuevoSocio .modal-dialog,
#modalEditarSocio .modal-dialog,
#modalVerSocio .modal-dialog {
    max-width: 98vw !important;
    width: 98vw !important;
    margin: 1vh auto !important;
    transform: none !important;
}

/* FORZAR modal-content altura completa */
.modal.sf-modal.sf-modal-xl .modal-content,
.modal.sf-modal.sf-modal-xxl .modal-content,
.modal.sf-modal-full .modal-content,
#modalNuevoSocio .modal-content,
#modalEditarSocio .modal-content,
#modalVerSocio .modal-content {
    min-height: 96vh !important;
    max-height: 98vh !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 16px !important;
}

/* FORZAR modal-body scroll */
.modal.sf-modal.sf-modal-xl .modal-body,
.modal.sf-modal.sf-modal-xxl .modal-body,
.modal.sf-modal-full .modal-body,
#modalNuevoSocio .modal-body,
#modalEditarSocio .modal-body,
#modalVerSocio .modal-body {
    flex: 1 !important;
    max-height: none !important;
    overflow-y: auto !important;
    padding: 0 !important;
}

/* Modal header sticky */
.modal.sf-modal .modal-header,
#modalNuevoSocio .modal-header,
#modalEditarSocio .modal-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    flex-shrink: 0 !important;
}

/* Modal footer sticky */
.modal.sf-modal .modal-footer,
#modalNuevoSocio .modal-footer,
#modalEditarSocio .modal-footer {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 10 !important;
    flex-shrink: 0 !important;
    background: #F9FAFB !important;
    border-top: 1px solid #E5E7EB !important;
}

/* =============================================
   GRID PROFESIONAL PARA PC
   Inputs compactos, no ocupan todo el ancho
============================================= */
@media (min-width: 1200px) {
    /* Contenedor de formulario con max-width */
    .sf-form-container {
        max-width: 1400px;
        margin: 0 auto;
    }

    /* Grid para PC: 6 columnas base */
    .sf-grid-pro {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 16px;
    }
    .sf-grid-pro .sf-form-group {
        margin-bottom: 0;
    }

    /* Anchos de campos */
    .sf-field-xs { grid-column: span 1; } /* 1/6 */
    .sf-field-sm { grid-column: span 2; } /* 2/6 = 1/3 */
    .sf-field-md { grid-column: span 3; } /* 3/6 = 1/2 */
    .sf-field-lg { grid-column: span 4; } /* 4/6 = 2/3 */
    .sf-field-xl { grid-column: span 5; } /* 5/6 */
    .sf-field-full { grid-column: span 6; } /* full */

    /* Grid de 4 columnas para formularios compactos */
    .sf-grid-cols-4 {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    /* Inputs no ocupan todo el ancho dentro de sections */
    .sf-form-section .sf-form-control {
        max-width: 400px;
    }
    .sf-form-section select.sf-form-control {
        max-width: 350px;
    }
    .sf-form-section input[type="number"].sf-form-control {
        max-width: 180px;
    }
    .sf-form-section input[type="date"].sf-form-control {
        max-width: 200px;
    }

    /* Excepciones: campos que SÍ deben ser anchos */
    .sf-form-section .sf-full-width,
    .sf-form-section textarea.sf-form-control,
    .sf-form-section .sf-col-span-full .sf-form-control {
        max-width: 100% !important;
    }
}

@media (min-width: 1200px) and (max-width: 1600px) {
    .sf-grid-cols-4 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* =============================================
   QUICK ACTIONS - NAVEGACIÓN RÁPIDA SPA
============================================= */
.sf-quick-actions {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}
.sf-quick-actions-menu {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: #fff;
    padding: 12px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    max-height: 60vh;
    overflow-y: auto;
    min-width: 220px;
}
.sf-quick-actions.open .sf-quick-actions-menu {
    display: flex;
    animation: slideUp 0.2s ease;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.sf-quick-action-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: #374151;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.15s;
    font-weight: 500;
}
.sf-quick-action-item:hover {
    background: #F0FDF4;
    color: var(--finca-green-dark);
}
.sf-quick-action-item i {
    width: 24px;
    text-align: center;
    font-size: 18px;
    color: var(--finca-green);
}
.sf-quick-actions-divider {
    padding: 0 8px 12px;
    border-bottom: 1px solid #E5E7EB;
    margin-bottom: 8px;
}
.sf-quick-actions-divider:not(:first-child) {
    padding-top: 12px;
    border-bottom: none;
    border-top: 1px solid #E5E7EB;
    margin-top: 8px;
    margin-bottom: 0;
}
.sf-quick-actions-label {
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
}
.sf-quick-fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--finca-green), var(--finca-green-dark));
    color: #fff;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(34,197,94,0.4);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sf-quick-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(34,197,94,0.5);
}
.sf-quick-actions.open .sf-quick-fab {
    transform: rotate(45deg);
}

/* =============================================
   PANEL LATERAL SPA - DETALLES RÁPIDOS
============================================= */
.sf-side-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 480px;
    max-width: 100vw;
    background: #fff;
    box-shadow: -10px 0 40px rgba(0,0,0,0.15);
    z-index: 1100;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}
.sf-side-panel.open {
    transform: translateX(0);
}
.sf-side-panel-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--finca-green), var(--finca-green-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sf-side-panel-title {
    font-size: 18px;
    font-weight: 600;
}
.sf-side-panel-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
}
.sf-side-panel-close:hover {
    background: rgba(255,255,255,0.3);
}
.sf-side-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}
.sf-side-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1099;
    display: none;
}
.sf-side-panel-overlay.open {
    display: block;
}

/* =============================================
   TABS MEJORADOS CON SCROLL HORIZONTAL
============================================= */
.sf-tabs {
    display: flex;
    flex-wrap: nowrap !important;
    gap: 4px;
    padding: 16px 24px;
    background: #F9FAFB;
    border-bottom: 1px solid #E5E7EB;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.sf-tabs::-webkit-scrollbar {
    height: 4px;
}
.sf-tabs::-webkit-scrollbar-thumb {
    background: var(--finca-green-light);
    border-radius: 4px;
}
.sf-tab {
    flex-shrink: 0;
}

/* Tab content con padding adecuado */
.sf-tab-content {
    padding: 24px !important;
}

/* =============================================
   CARDS INTERACTIVOS SPA
============================================= */
.sf-interactive-card {
    cursor: pointer;
    transition: all 0.2s ease;
}
.sf-interactive-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}
.sf-interactive-card:active {
    transform: scale(0.98);
}

/* =============================================
   MINI MODAL (para acciones rápidas)
============================================= */
.sf-mini-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    z-index: 1200;
    max-width: 500px;
    width: 90%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}
.sf-mini-modal.open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}
.sf-mini-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1199;
    display: none;
}
.sf-mini-modal-overlay.open {
    display: block;
}

/* =============================================
   RESPONSIVE MEJORADO PARA MODALES
============================================= */
@media (max-width: 768px) {
    .sf-modal.sf-modal-xl .modal-dialog,
    .sf-modal.sf-modal-xxl .modal-dialog,
    .sf-modal-full .modal-dialog {
        max-width: 100vw !important;
        width: 100vw !important;
        margin: 0 !important;
        min-height: 100vh;
    }
    .sf-modal.sf-modal-xl .modal-content,
    .sf-modal.sf-modal-xxl .modal-content,
    .sf-modal-full .modal-content {
        min-height: 100vh;
        border-radius: 0 !important;
    }
    .sf-tabs {
        padding: 12px 16px;
    }
    .sf-tab {
        padding: 10px 16px;
        font-size: 13px;
    }
    .sf-tab-content {
        padding: 16px !important;
    }
    .sf-form-section {
        padding: 16px;
        margin-bottom: 16px;
    }
    .sf-form-section .sf-form-control {
        max-width: 100% !important;
    }
    .sf-side-panel {
        width: 100%;
    }
    .sf-quick-actions {
        bottom: 16px;
        right: 16px;
    }
}

/* =============================================
   MODALES FULLWIDTH 99% - GLOBAL
   Todos los modales ocupan 99% del ancho
============================================= */
.modal .modal-dialog,
.modal-dialog {
    max-width: 99vw !important;
    width: 99vw !important;
    margin: 0.5vh auto !important;
}

.modal .modal-content,
.modal-content {
    min-height: auto;
    max-height: 99vh !important;
    display: flex !important;
    flex-direction: column !important;
}

.modal .modal-body,
.modal-body {
    flex: 1 !important;
    overflow-y: auto !important;
    max-height: calc(99vh - 140px) !important;
}

/* =============================================
   UI POLISH 2026-02
   Ajustes visuales globales para modales + formularios
============================================= */
.sf-modal .modal-content,
.modal.sf-modal .modal-content {
    background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
    border: 1px solid #E5E7EB;
}

.sf-modal .modal-header,
.modal.sf-modal .modal-header {
    box-shadow: inset 0 -1px 0 rgba(255,255,255,0.15);
}

.sf-modal .modal-body,
.modal.sf-modal .modal-body {
    scrollbar-width: thin;
    scrollbar-color: #A7F3D0 transparent;
}

.sf-modal .modal-body::-webkit-scrollbar,
.modal.sf-modal .modal-body::-webkit-scrollbar {
    width: 10px;
}

.sf-modal .modal-body::-webkit-scrollbar-thumb,
.modal.sf-modal .modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #34D399, #16A34A);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.sf-form-section {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    box-shadow: 0 8px 24px -18px rgba(15, 23, 42, 0.35);
}

.sf-form-section:hover {
    border-color: #D1D5DB;
}

.sf-form-section-title {
    font-size: 15px;
    letter-spacing: 0.15px;
}

.sf-form-label,
.sf-label {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
}

.sf-form-control {
    min-height: 44px;
    padding: 11px 14px;
    border-width: 1px;
    border-color: #D1D5DB;
    border-radius: 12px;
}

.sf-form-control:hover:not(:focus):not(:disabled):not([readonly]) {
    border-color: #9CA3AF;
    background: #FFFFFF;
}

.sf-form-control:focus {
    border-color: var(--finca-green);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.sf-form-control:disabled,
.sf-form-control[readonly] {
    background: #F9FAFB;
    color: #6B7280;
    border-color: #E5E7EB;
    cursor: not-allowed;
}

textarea.sf-form-control {
    min-height: 96px;
    line-height: 1.45;
    resize: vertical;
}

select.sf-form-control {
    padding-right: 42px;
}

input[type="date"].sf-form-control,
input[type="datetime-local"].sf-form-control,
input[type="time"].sf-form-control {
    min-height: 44px;
}

input[type="file"].sf-form-control {
    padding: 7px 10px;
}

input[type="file"].sf-form-control::file-selector-button {
    border: 1px solid #D1D5DB;
    background: #F9FAFB;
    color: #374151;
    padding: 6px 10px;
    border-radius: 8px;
    margin-right: 10px;
    cursor: pointer;
}

.sf-form-control.sf-is-invalid,
.sf-form-control[aria-invalid="true"] {
    border-color: #DC2626;
    background: #FEF2F2;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.sf-form-control.sf-is-valid {
    border-color: #16A34A;
    background: #F0FDF4;
}

.sf-field-error {
    display: block;
    min-height: 16px;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.35;
    color: #DC2626;
}

.sf-form-hint,
small[id^="help_"],
small[id^="hint_"] {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.4;
    color: #6B7280;
}

.sf-modal .modal-footer .sf-btn {
    min-width: 120px;
}

@media (max-width: 768px) {
    .sf-form-label,
    .sf-label {
        font-size: 12px;
    }

    .sf-form-control {
        min-height: 42px;
        font-size: 14px;
        padding: 10px 12px;
    }

    .sf-modal .modal-footer {
        gap: 8px;
    }

    .sf-modal .modal-footer .sf-btn {
        flex: 1 1 calc(50% - 8px);
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .sf-modal .modal-footer .sf-btn {
        flex: 1 1 100%;
    }
}

