/* Click-to-edit style for TextInputColumn */
.fi-ta-text-input-column input {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    cursor: pointer;
}

.fi-ta-text-input-column input:focus {
    background: white !important;
    border: 1px solid rgb(99 102 241) !important;
    padding: 0.25rem 0.5rem !important;
    border-radius: 0.375rem;
    cursor: text;
}

.dark .fi-ta-text-input-column input:focus {
    background: rgb(55 65 81) !important;
}

/* Schmale Spalten */
.fi-ta-text-input-column.w-16 {
    width: 4rem !important;
    max-width: 4rem !important;
}

.fi-ta-text-input-column.w-20 {
    width: 5rem !important;
    max-width: 5rem !important;
}

/* ========================================
   FRAMEWIZE CUSTOM THEME
   Light: Luftig, freundlich, leicht
   Dark: Professionell, Filmproduktion, hochwertig
   ======================================== */

/* Form inputs - rounder, more spacious */
.fi-simple-page .fi-input,
.fi-simple-page [type="text"],
.fi-simple-page [type="email"],
.fi-simple-page [type="password"] {
    border-radius: 0.75rem !important;
    padding: 0.875rem 1rem !important;
    font-size: 1rem !important;
    transition: all 0.2s ease !important;
}

/* Light mode input styling */
.fi-simple-page .fi-input:focus,
.fi-simple-page [type="text"]:focus,
.fi-simple-page [type="email"]:focus,
.fi-simple-page [type="password"]:focus {
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15) !important;
    border-color: rgb(251, 191, 36) !important;
}

/* Dark mode input styling - cinematic gold accent */
.dark .fi-simple-page .fi-input:focus,
.dark .fi-simple-page [type="text"]:focus,
.dark .fi-simple-page [type="email"]:focus,
.dark .fi-simple-page [type="password"]:focus {
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.25) !important;
    border-color: rgb(251, 191, 36) !important;
}

/* Primary button - more prominent and friendly */
.fi-simple-page .fi-btn-primary,
.fi-simple-page button[type="submit"] {
    border-radius: 0.75rem !important;
    padding: 0.875rem 1.5rem !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 14px 0 rgba(251, 191, 36, 0.3) !important;
}

.fi-simple-page .fi-btn-primary:hover,
.fi-simple-page button[type="submit"]:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px 0 rgba(251, 191, 36, 0.4) !important;
}

/* Labels - cleaner look */
.fi-simple-page .fi-fo-field-wrp-label,
.fi-simple-page label {
    font-weight: 500 !important;
    margin-bottom: 0.5rem !important;
}

/* Mobile optimizations for simple pages (login, etc.) */
@media (max-width: 640px) {
    /* Kompakte Login-Seite - alles auf einem Screen */
    .fi-simple-page {
        min-height: 100vh !important;
        min-height: 100dvh !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .fi-simple-main {
        margin: 0.75rem !important;
        padding: 1.25rem !important;
        width: calc(100% - 1.5rem) !important;
        max-width: 100% !important;
    }
    
    .fi-simple-main-ctn {
        padding: 0 !important;
    }
    
    /* Kompakteres Logo */
    .fi-simple-page .fi-logo {
        margin-bottom: 0.5rem !important;
    }
    
    .fi-simple-page .fi-logo img,
    .fi-simple-page .fi-logo svg {
        max-height: 1.75rem !important;
    }
    
    /* Kompaktere Form-Elemente */
    .fi-simple-page .fi-input,
    .fi-simple-page [type="text"],
    .fi-simple-page [type="email"],
    .fi-simple-page [type="password"] {
        padding: 0.625rem 0.75rem !important;
        font-size: 0.9375rem !important;
    }
    
    /* Kompaktere Labels */
    .fi-simple-page .fi-fo-field-wrp-label,
    .fi-simple-page label {
        font-size: 0.875rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    /* Weniger Abstand zwischen Feldern */
    .fi-simple-page .fi-fo-field-wrp {
        margin-bottom: 0.75rem !important;
    }
    
    .fi-simple-page .space-y-6 > * + * {
        margin-top: 0.75rem !important;
    }
    
    /* Kompakterer Button */
    .fi-simple-page .fi-btn-primary,
    .fi-simple-page button[type="submit"] {
        width: 100% !important;
        padding: 0.625rem 1rem !important;
        font-size: 0.9375rem !important;
        margin-top: 0.5rem !important;
    }
    
    /* Checkbox kleiner */
    .fi-simple-page .fi-checkbox-wrp {
        margin-top: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* "Passwort vergessen" Link */
    .fi-simple-page a[href*="password"] {
        font-size: 0.8125rem !important;
    }
}

/* Smooth animations */
.fi-simple-page * {
    transition-property: color, background-color, border-color, box-shadow, transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

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

/* Remove blue outline/border from login card */
.fi-simple-main {
    outline: none !important;
    border: none !important;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.15) !important;
}

/* Dark mode shadow */
.dark .fi-simple-main {
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.5) !important;
}

/* Ensure full height and no cutoff */
.fi-simple-page {
    min-height: 100vh !important;
    min-height: 100dvh !important;
    overflow: visible !important;
    padding-bottom: 2rem !important;
}

/* Login form container - ensure enough space */
.fi-simple-main-ctn {
    padding: 2rem !important;
    overflow: visible !important;
}

/* Remove any ring/outline from form elements */
.fi-simple-page .fi-input:focus,
.fi-simple-page input:focus,
.fi-simple-page button:focus {
    outline: none !important;
    ring: none !important;
}

/* Fix potential overflow issues */
.fi-simple-page form {
    overflow: visible !important;
}

/* ========================================
   TABLE GROUPING STYLES
   ======================================== */

/* Department group headers - prominent styling */
.fi-ta-group-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
    border-left: 4px solid #f59e0b !important;
}

.fi-ta-group-header td {
    padding: 0.75rem 1rem !important;
}

.fi-ta-group-header .fi-ta-group-header-label {
    font-weight: 700 !important;
    font-size: 0.9375rem !important;
    color: white !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

/* Light mode */
:root:not(.dark) .fi-ta-group-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
    border-left: 4px solid #f59e0b !important;
}

:root:not(.dark) .fi-ta-group-header .fi-ta-group-header-label {
    color: #1e293b !important;
}

/* Collapse button styling */
.fi-ta-group-header button {
    color: inherit !important;
}

.dark .fi-ta-group-header button {
    color: white !important;
}
