/* Serif font utility */
.font-serif {
    font-family: 'Cormorant Garamond', serif !important;
}

/* === Text Selection === */
::selection {
    background-color: #4ecdc4;
    color: #ffffff;
}

::-moz-selection {
    background-color: #4ecdc4;
    color: #ffffff;
}

/* === Libriya - Modern Tailwind Design System === */

[x-cloak] {
    display: none !important;
}

/* ===== Core Utilities ===== */

.glass-nav {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: none;
    transition: box-shadow 0.3s ease;
}

.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-gradient {
    background: linear-gradient(135deg, #1a535c 0%, #4ecdc4 100%);
}

/* ===== Cards & Components ===== */

.bento-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: white;
}

.bento-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #4ecdc4;
}

.info-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #1a535c;
}

.info-card i {
    font-size: 1.5rem;
    color: #1a535c;
}

/* ===== CSS variable definitions for color consistency ===== */
:root {
    --primary-color: #1a535c;
    --accent-color: #4ecdc4;
    --text-dark: #333;
    --text-light: #f8f9fa;
}

color: var(--primary-color);


}
}
}

body {
    font-family: 'Inter', sans-serif;
    color: #333;
    background-color: #f8f9fa;
    min-height: 100vh;
}

font-size: 1.1rem;
font-family: 'Inter',
sans-serif;
color: #1a535c;
font-weight: 700;
line-height: 1.2;
margin-bottom: 0.5rem;
}

}

font-size: 3rem;
letter-spacing: -0.02em;
}


font-size: 2.25rem;
letter-spacing: -0.01em;
}

h6 {
    font-size: 1.5rem;
}

font-size: 1rem;
font-size: 1.25rem;
}

}

font-size: 1.1rem;
}


font-size: 1rem;
}

.btn,
a.btn,
button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    border-radius: 1rem;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-primary,
.bg-primary {
    background-color: #1a535c !important;
    color: #fff;
}

.btn-primary:hover:not(:disabled),
.bg-primary:hover:not(:disabled) {
    /* Usunięto efekt scale i box-shadow na hover, badge jest statyczny */
}

.btn-accent,
.bg-accent {
    background-color: #4ecdc4;
    color: #fff;
}

.btn-accent:hover:not(:disabled),
.bg-accent:hover:not(:disabled) {
    /* Usunięto efekt scale i box-shadow na hover, aby nie było animacji */
}

.btn-outline {
    background: transparent !important;
    color: #1a535c;
    border: 2px solid #1a535c !important;
    box-shadow: none !important;
}

.btn-outline:hover:not(:disabled) {
    background: rgba(26, 83, 92, 0.1) !important;
    box-shadow: 0 4px 6px -1px rgba(26, 83, 92, 0.2) !important;
    transform: scale(1.02) !important;
}

.glass-nav {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    box-shadow: none !important;
    transition: box-shadow 0.3s ease !important;
}

.hero-gradient {
    background: linear-gradient(135deg, #1a535c 0%, #4ecdc4 100%) !important;
}

.bento-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 3rem !important;
}

.bento-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    border-color: #4ecdc4 !important;
}

/* ===== Forms ===== */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
textarea,
select {
    background-color: white !important;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="time"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #4ecdc4;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.5em 1.5em;
    background-color: white !important;
    padding-right: 2.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #1a535c;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* ===== Buttons ===== */

.btn,
a.btn,
button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    border-radius: 1rem;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

button:disabled,
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background-color: #1a535c;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.btn-accent {
    background-color: #4ecdc4;
    color: white;
}

.btn-accent:hover:not(:disabled) {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.btn-outline {
    background: transparent;
    color: #1a535c;
    border: 2px solid #1a535c;
    box-shadow: none;
}

.btn-outline:hover:not(:disabled) {
    background: rgba(26, 83, 92, 0.1);
    box-shadow: 0 4px 6px -1px rgba(26, 83, 92, 0.2);
    transform: scale(1.02);
}

.btn-danger {
    background-color: #dc2626;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.btn-success {
    background-color: #16a34a;
    color: white;
}

.btn-success:hover:not(:disabled) {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* ===== Tables ===== */

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

thead {
    background: #f8f9fa;
    border-bottom: 2px solid #e5e7eb;
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: inherit;
}

td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    color: #333;
}

tbody tr:hover {
    background: #f8f9fa;
}

tbody tr:last-child td {
    border-bottom: none;
}

/* ===== Alerts ===== */

.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #ecfdf5;
    border-color: #10b981;
    color: #065f46;
}

.alert-error {
    background: #fef2f2;
    border-color: #ef4444;
    color: #7f1d1d;
}

.alert-warning {
    background: #fffbeb;
    border-color: #f59e0b;
    color: #78350f;
}

.alert-info {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1e3a8a;
}

.alert i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* ===== Additional Existing Styles (keep important ones) ===== */


/* Adjust main-content for login page to take full height and center content */
.main-content.login-full-height {
    flex-grow: 1;
    /* Allows main-content to take up available space */
    display: flex;
    /* Make it a flex container */
    align-items: center;
    /* Center content vertically */
    justify-content: center;
    /* Center content horizontally */
    padding-top: 0 !important;
    /* Remove any padding that might interfere with centering */
    padding-bottom: 0 !important;
    margin-top: 80px;
    /* Push content down by navbar height */
    min-height: calc(100vh - 80px);
    /* Take remaining height */
}


/* Navbar */
.bg-custom-dark {
    background-color: var(--primary-color) !important;
    /* Using variable for background */
}

.navbar-brand.title-text {
    /* Removed duplicate font-family for logo, use .font-serif only */
}

.navbar-brand.title-text img {
    height: 30px;
    /* Adjusting logo size */
    width: auto;
}

.user-display {
    color: var(--text-light);
    /* User name text color */
}

.user-display:hover {
    color: var(--accent-color);
    /* User name hover color */
}

.dropdown-menu {
    border-radius: .5rem;
    box-shadow: var(--box-shadow-medium);
    /* Subtle shadow for dropdown menu */
}

/* Sidebar */
.sidebar {
    height: 100vh;
    /* Full sidebar height */
    position: fixed;
    top: 0;
    left: 0;
    padding-top: 56px;
    /* Top padding for fixed navbar */
    background-color: var(--gray-bg);
    z-index: 1000;
    /* Ensure sidebar is above other elements but below navbar */
}

.sidebar .nav-link {
    font-weight: 500;
    color: var(--text-dark);
    transition: background-color 0.2s, color 0.2s;
    border-radius: .25rem;
    /* Rounded corners for links */
    padding: .75rem 1rem;
    /* More padding for better clickability */
}

.sidebar .nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(26, 83, 92, 0.05);
    /* Very light background on hover (RGB from --primary-color) */
}

.sidebar .nav-link.active {
    color: var(--text-light);
    background-color: var(--primary-color);
    box-shadow: var(--box-shadow-light);
    /* Light shadow for active link */
}

.sidebar .nav-link.active .bx {
    color: var(--text-light);
    /* Icons white when active */
}

.sidebar .nav-link .bx {
    font-size: 1.25rem;
}

.sidebar .collapse .nav-link {
    padding-left: 2.5rem;
    /* Indentation for sub-menu items */
}

.sidebar .bx-chevron-down {
    transition: transform 0.3s ease;
}

.sidebar .nav-link:not(.collapsed) .bx-chevron-down {
    transform: rotate(180deg);
    /* Icon rotation when expanded */
}

/* Main content */
.main-content {
    padding-top: 1.5rem;
    /* Additional top spacing */
    padding-bottom: 3rem;
    /* Bottom spacing */
}

/* Flash messages */
.alert {
    border-radius: .5rem;
    box-shadow: var(--box-shadow-light);
    /* Przywrócono lżejszy cień, jak dla innych elementów informacyjnych */
    margin-bottom: 1.5rem;
    font-weight: 500;
}



/* Book count card */
.book-count-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: .5rem;
    box-shadow: var(--box-shadow-light);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 600;
}

.book-count-card .bx {
    font-size: 2rem;
    color: var(--accent-color);
}

/* Book list table */
.table {
    background-color: white;
    border-radius: .5rem;
    overflow: hidden;
    /* Ensures border-radius works */
    box-shadow: var(--box-shadow-medium);
    /* More prominent shadow for table */
    margin-top: 1.5rem;
}

.table thead th {
    background-color: var(--primary-color);
    /* Darker table header */
    color: var(--text-light);
    font-weight: 600;
    vertical-align: middle;
    padding: 1rem;
    /* More padding in header */
}

.table tbody tr:hover {
    background-color: rgba(26, 83, 92, 0.03);
    /* Very subtle hover effect on rows (RGB from --primary-color) */
}

.table td {
    vertical-align: middle;
    /* Vertical alignment of content in cells */
    padding: .75rem 1rem;
    /* More padding in cells */
}

.table img {
    width: 60px;
    /* Slightly larger images */
    height: 80px;
    /* Fixed height for consistency */
    object-fit: cover;
    /* Image fitting, preserving aspect ratio */
    border-radius: .25rem;
    /* Slight rounding of image corners */
    box-shadow: 0 2px 4px rgba(0, 0, 0, .08);
}

/* Increased placeholder icon size for better visibility in table cells */
.table i.bx-image {
    font-size: 40px !important;
    color: #a0a0a0 !important;
}

/* Table action buttons */
.table td .btn {
    margin-right: .25rem;
    /* Spacing between buttons */
    margin-bottom: .25rem;
    /* For wrapping on smaller screens */
    /* Removed: white-space: nowrap; */
    /* Allows text/icon breaking if needed */
    padding: .375rem .5rem;
    /* Adjusting padding for btn-sm with icons */
}

.table td .btn i {
    font-size: 1rem;
    /* Consistent icon size */
}

/* Custom colors for outline buttons */
.btn-outline-success {
    --bs-btn-color: var(--primary-color);
    --bs-btn-border-color: var(--primary-color);
    --bs-btn-hover-bg: var(--primary-color);
    --bs-btn-hover-border-color: var(--primary-color);
    --bs-btn-active-bg: var(--primary-color);
    --bs-btn-active-border-color: var(--primary-color);
    --bs-btn-active-color: var(--text-light);
    --bs-btn-hover-color: var(--text-light);
}

.btn-outline-warning {
    --bs-btn-color: var(--accent-color);
    --bs-btn-border-color: var(--accent-color);
    --bs-btn-hover-bg: var(--accent-color);
    --bs-btn-hover-border-color: var(--accent-color);
    --bs-btn-active-bg: var(--accent-color);
    --bs-btn-active-border-color: var(--accent-color);
    --bs-btn-active-color: var(--text-light);
    --bs-btn-hover-color: var(--text-light);
}

.btn-outline-primary {
    --bs-btn-active-color: var(--text-light);
    --bs-btn-hover-color: var(--text-light);
}

.btn-outline-danger {
    --bs-btn-active-color: var(--text-light);
    --bs-btn-hover-color: var(--text-light);
}

/* "Add Book" button */
.add-book-btn {
    width: 200px;
    padding: .75rem 1.5rem;
    border-radius: .5rem;
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
}

.add-book-btn:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

/* Normalize button height and alignment for all .btn elements (including <input> and <a>) */
.btn {
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: var(--bs-btn-padding-y, .375rem) var(--bs-btn-padding-x, .75rem);
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    box-sizing: border-box;
    font-size: var(--bs-btn-font-size);
    line-height: var(--bs-btn-line-height);
}

/* For specific browser quirks on <input type="submit"> - explicitly override user agent styles */
/* This rule must come AFTER the general .btn rule to apply correctly */
input[type="submit"].btn,
input[type="button"].btn,
input[type="reset"].btn {
    /* Explicitly reset properties that might cause height differences */
    -webkit-appearance: none;
    /* Remove default Webkit button styles */
    -moz-appearance: none;
    /* Remove default Mozilla button styles */
    appearance: none;
    /* Remove default button styles for other browsers */
    background-image: none;
    /* Remove default gradient/image backgrounds */
    /* Make sure all font-related properties are inherited or explicitly set */
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    /* Ensure border and outline are consistent */
    border: var(--bs-btn-border-width) var(--bs-btn-border-style) var(--bs-btn-border-color);
    outline: none;
    /* Re-apply padding and box-sizing to ensure consistency */
    padding: var(--bs-btn-padding-y, .375rem) var(--bs-btn-padding-x, .75rem);
    height: auto;
    /* Still let content and padding define height */
    /* Add a minimal margin to avoid any potential adjacent element issues, if not already handled by flexbox gap */
    margin: 0;
}

/* Responsiveness adjustments */
@media (max-width: 768px) {
    .main-content {
        padding-top: 1.5rem;
        /* Reset padding-top after removing sticky sidebar */
        margin-left: 0 !important;
        /* Remove margin-left for small screens */
    }
}

/* Responsive adjustments for filter buttons container */
@media (max-width: 767.98px) {

    /* Bootstrap's MD breakpoint for columns */
    .buttons-container {
        display: flex;
        flex-wrap: wrap;
        /* Allow buttons to wrap to the next line */
        gap: .5rem;
        /* Small gap between wrapped buttons */
        margin-top: 1rem;
        /* Add some space above buttons on small screens */
    }

    .buttons-container .btn {
        margin-top: 0;
        /* Remove top margin inherited from previous rule */
        flex-grow: 1;
        /* Allow buttons to grow to fill space */
    }
}

/* Vertical alignment for filter buttons */
.buttons-container {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.5rem;
}

/* Set fixed height for form controls and buttons */
.row.g-2 {
    align-items: flex-end;
}

/* Adjust form control container height for vertical alignment */
.row.g-2>div:not(.buttons-container) {
    margin-bottom: 0;
}

/* Set fixed height for buttons - match form control height */
.buttons-container .btn {
    margin-right: 0;
    height: 40px;
    padding: 0.375rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

/* Scaling for very large screens (e.g., 4K monitors) */
@media (min-width: 1400px) {

    /* Corresponds to Bootstrap's XXL breakpoint */
    body {
        font-size: 1.05rem;
        /* Slightly larger base font size for better readability */
    }

    h2 {
        font-size: 2.25rem;
        /* Slightly larger headings */
    }

    /* Increase padding for containers on very large screens to avoid content looking too wide */
    .container-xl,
    .container-xxl {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

/* Hide the sidebar on smaller screens */
@media (max-width: 991.98px) {
    .sidebar {
        display: none;
    }
}

/* Show the sidebar on larger screens */
@media (min-width: 992px) {
    .sidebar {
        display: block;
    }
}


.form-group {
    margin-bottom: 1.5rem;
}

.form-group>label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.input-with-button {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-with-button input[type="text"] {
    /* Override the default 100% width for inputs in form-groups */
    width: auto;
    flex-grow: 1;
    /* Make the input field take up the remaining space */
}

/* STRUCTURE */

.wrapper {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    min-height: 100%;
    padding: 20px;
}

/* Apply blur effect to the form content */
#formContent {
    -webkit-border-radius: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 30px;
    width: 90%;
    max-width: 450px;
    position: relative;
    -webkit-box-shadow: 0 30px 60px 0 rgba(0, 0, 0, 0.3);
    box-shadow: 0 30px 60px 0 rgba(0, 0, 0, 0.3);
    text-align: center;
}



#formFooter {
    background-color: #f6f6f6;
    border-top: 1px solid #dce8f1;
    padding: 25px;
    text-align: center;
    border-radius: 0 0 10px 10px;
}




/* TABS */

h2.inactive {
    color: #cccccc;
}

h2.active {
    color: #0d0d0d;
    border-bottom: 2px solid #5fbae9;
}



/* FORM TYPOGRAPHY*/

/* Removed conflicting global input[type=submit] rule. */
/* Styles for login button (fadeIn.fourth) are now self-contained below */


input[type=text],
input[type=password] {
    /* background-color, border, color, font-size, etc. can stay if needed, but REMOVE margin/padding/width for form alignment */
    background-color: #f6f6f6;
    border: none;
    color: #0d0d0d;
    font-size: 16px;
    border: 2px solid #f6f6f6;
    -webkit-transition: all 0.5s ease-in-out;
    -moz-transition: all 0.5s ease-in-out;
    -ms-transition: all 0.5s ease-in-out;
    -o-transition: all 0.5s ease-in-out;
    transition: all 0.5s ease-in-out;
    -webkit-border-radius: 5px 5px 5px 5px;
    border-radius: 5px 5px 5px 5px;
}

input[type=text]:focus,
input[type=password]:focus {
    background-color: #fff;
    border-bottom: 2px solid #5fbae9;
}

input[type=text]::placeholder,
input[type=password]::placeholder {
    color: #cccccc;
}

/* For general form inputs in this specific login form */
input[type=text],
input[type=password] {
    background-color: rgba(246, 246, 246, 0.8);
}


/* ANIMATIONS */

/* Simple CSS3 Fade-in-down Animation */
.fadeInDown {
    -webkit-animation-name: fadeInDown;
    animation-name: fadeInDown;
    -webkit-animation-duration: 1s;
    animation-duration: 1s;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
}

@-webkit-keyframes fadeInDown {
    0% {
        opacity: 0;
        -webkit-transform: translate3d(0, -100%, 0);
        transform: translate3d(0, -100%, 0);
    }

    100% {
        opacity: 1;
        -webkit-transform: none;
        transform: none;
    }
}

@keyframes fadeInDown {
    0% {
        opacity: 0;
        -webkit-transform: translate3d(0, -100%, 0);
        transform: translate3d(0, -100%, 0);
    }

    100% {
        opacity: 1;
        -webkit-transform: none;
        transform: none;
    }
}

/* Simple CSS3 Fade-in Animation */
@-webkit-keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@-moz-keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fadeIn {
    opacity: 0;
    -webkit-animation: fadeIn ease-in 1;
    -moz-animation: fadeIn ease-in 1;
    animation: fadeIn ease-in 1;

    -webkit-animation-fill-mode: forwards;
    -moz-animation-fill-mode: forwards;
    animation-fill-mode: forwards;

    -webkit-animation-duration: 1s;
    -moz-animation-duration: 1s;
    animation-duration: 1s;
}

.fadeIn.first {
    -webkit-animation-delay: 0.4s;
    -moz-animation-delay: 0.4s;
    animation-delay: 0.4s;
}

.fadeIn.second {
    -webkit-animation-delay: 0.6s;
    -moz-animation-delay: 0.6s;
    animation-delay: 0.6s;
}

.fadeIn.third {
    -webkit-animation-delay: 0.8s;
    -moz-animation-delay: 0.8s;
    animation-delay: 0.8s;
}

/* Specific styling for the login button to prevent it from affecting other .btn elements */
.fadeIn.fourth {
    background-color: #56baed;
    /* Specific color for login button */
    border: none;
    color: white;
    padding: 15px 40px;
    /* Adjusted padding for better responsiveness */
    text-align: center;
    text-decoration: none;
    display: inline-block;
    text-transform: uppercase;
    font-size: 13px;
    /* Specific font size for login button */
    -webkit-box-shadow: 0 10px 30px 0 rgba(95, 186, 233, 0.4);
    box-shadow: 0 10px 30px 0 rgba(95, 186, 233, 0.4);
    -webkit-border-radius: 5px 5px 5px 5px;
    border-radius: 5px 5px 5px 5px;
    margin: 5px 20px 40px 20px;
    /* Specific margin for login button */
    -webkit-transition: all 0.3s ease-in-out;
    -moz-transition: all 0.3s ease-in-out;
    -ms-transition: all 0.3s ease-in-out;
    -o-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
}

/* Hover and active states for login button */
.fadeIn.fourth:hover {
    background-color: #39ace7;
}

.fadeIn.fourth:active {
    -moz-transform: scale(0.95);
    -webkit-transform: scale(0.95);
    -o-transform: scale(0.95);
    -ms-transform: scale(0.95);
    transform: scale(0.95);
}


/* Simple CSS3 Fade-in Animation */
.underlineHover:after {
    display: block;
    left: 0;
    bottom: -10px;
    width: 0;
    height: 2px;
    background-color: #56baed;
    content: "";
    transition: width 0.2s;
}

.underlineHover:hover {
    color: #0d0d0d;
}

.underlineHover:hover:after {
    width: 100%;
}



/* OTHERS */

*:focus {
    outline: none;
}

#icon {
    width: 60%;
}

/* Styles for photo credit on login page */
.photo-credit {
    margin-top: 20px;
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

/* Style for links within photo credit */
.photo-credit a {
    color: var(--accent-color);
    text-decoration: none;
}

.photo-credit a:hover {
    text-decoration: underline;
}

/* --- Default Credentials Section Styling --- */
.default-credentials {
    background-color: #f0f0f0;
    border-top: 1px solid #e0e0e0;
    padding: 20px;
    margin-top: 20px;
    border-radius: 10px 10px 10px 10px;
    text-align: center;
}

.default-credentials h4 {
    /* Removed duplicate font-family for logo, use .font-serif only */
}

.default-credentials .section-title {
    font-weight: 600;
    margin-bottom: 15px;
    color: #555;
}

.credential-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
    line-height: 1.4;
}

.credential-item:last-child {
    margin-bottom: 0;
}

.credential-label {
    font-weight: 500;
    color: #666;
    margin-bottom: 5px;
}

.credential-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
}

.credential-value .bx {
    font-size: 1.1em;
    vertical-align: middle;
    margin: 0 5px;
}

.card-link {
    text-decoration: none;
    color: inherit;
    transition: background-color 0.3s ease;
}

.card-link:hover {
    background-color: #f8f9fa;
}

.card-button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    text-align: left;
    cursor: pointer;
}

.card-button:hover {
    opacity: 0.8;
}

.card-footer {
    padding: 0.75rem 1.25rem;
    background-color: transparent;
    border-top: 1px solid rgba(0, 0, 0, 0.125);
}

.card-footer .btn {
    margin-left: auto;
}

.filter-input {
    margin-top: auto;
}

.form-select {
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
    height: 40px;
}

.form-control {
    height: 40px;
    background-color: white !important;
}

textarea.comment-input {
    height: auto;
    min-height: 8rem;
}

#title {
    margin-top: 0.0rem;
}

select.form-control[multiple] {
    height: auto;
    min-height: 200px;
    background-color: white !important;
    color: #333 !important;
}

.libriya-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    /* Removed duplicate font-family for logo, use .font-serif only */
}

/* Boxicons styling */
.bx {
    display: inline-block;
    font-size: 1.25rem;
    vertical-align: middle;
    margin-right: 0.25rem;
}

/* Icons in buttons */
button .bx,
a .bx {
    font-size: 1rem;
}

/* Icons in navigation */
.navbar-nav .bx {
    font-size: 1.25rem;
}

/* Icons in action buttons */
.btn-group .bx,
.btn .bx {
    font-size: 1rem;
}

/* Spinning animation for loading icons */
.bx-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Heart icon styling */
.bx-heart {
    color: #dc3545;
}

.bx-heart:hover {
    transform: scale(1.2);
}

/* Ensure icons have proper sizing */
i.bx {
    font-weight: 400;
    font-style: normal;
    font-size: 1.25rem;
    line-height: 1;
    vertical-align: middle;
}

/* Fix input-group alignment for select fields */
.input-group {
    display: flex;
    align-items: center;
}

.input-group .input-group-text {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 1rem;
    border: 1px solid #dee2e6;
    min-width: 2.5rem;
    width: auto;
    flex-shrink: 0;
    background: #f8f9fa;
    box-sizing: border-box;
}

.input-group .input-group-text i.bx {
    font-size: 1.7rem;
    line-height: 1;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: inherit;
    visibility: visible !important;
}

.input-group .form-select {
    height: auto;
    padding: 0.375rem 0.75rem;
    min-height: 2.5rem;
}

.input-group .form-control {
    height: 40px;
    padding: 0.375rem 0.75rem;
    min-height: 40px;
    box-sizing: border-box;
}

.input-group .btn {
    min-width: auto;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Barcode Scanner Styles */
#interactive {
    background: #000;
}

#interactive video {
    width: 100% !important;
    height: auto !important;
    display: block;
    border-radius: 8px;
}

#interactive canvas {
    display: none !important;
}

/* === Footer Styles === */
footer {
    margin-top: auto;
}

/* Ensure body takes full viewport height and has flex layout */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body>.flex {
    flex: 1;
}

/* Wymuszenie braku animacji na badge REKOMENDOWANY/RECOMMENDED */
.no-anim-badge {
    display: block !important;
    animation: none !important;
    -webkit-animation: none !important;
    -moz-animation: none !important;
    -o-animation: none !important;
    transition: none !important;
    opacity: 1 !important;
}

/* Wymuszenie koloru tła na hover dla .hover:bg-primary */
.hover\:bg-primary:hover {
    --tw-bg-opacity: 1;
    background-color: rgb(26 83 92 / var(--tw-bg-opacity, 1));
}

/* Utility to disable all transitions (for static rotate-3) */
. !transition-none {
    transition: none !important;
}

/* Utility to force text-primary color for important cases */
.text-primary-force {
    color: #1a535c !important;
}

.text-primary {
    --tw-text-opacity: 1;
    color: rgb(26 83 92 / var(--tw-text-opacity, 1));
}

/* Force white background on all form selects */
select,
select.flex-1,
.flex-1 select {
    background-color: white !important;
    color: #333 !important;
}

/* Additional specificity for wrapped selects */
.flex.items-center select {
    background-color: white !important;
}

/* Ultra-specific select styling - maximum priority */
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: #333;
}

/* Final select rule with highest priority */
*select,
div select,
form select {
    background-color: white !important;
}

input[type="text"]::-webkit-outer-spin-button,
input[type="text"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* BOMBOWY SELECTOR - wymuszenie białego background'u na WSZYSTKICH selectach */
select {
    background-color: white !important;
    color: #333 !important;
    border: 1px solid #d1d5db !important;
}

/* Agresywny CSS dla select[multiple] */
select[multiple],
select[multiple="multiple"] {
    background-color: white !important;
    color: #333 !important;
    border: 1px solid #d1d5db !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

/* Force white background on all form fields with bg-white class */
input.bg-white,
textarea.bg-white,
select.bg-white {
    background-color: white !important;
}

/* ===== Mobile Card Layout for Books ===== */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.book-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.book-card:hover {
    box-shadow: 0 10px 25px rgba(26, 83, 92, 0.1);
    border-color: #4ecdc4;
    transform: translateY(-4px);
}

.book-card-header {
    position: relative;
    overflow: hidden;
    height: 200px;
    background: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
}

.book-card-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a535c;
    margin: 0 0 0.5rem 0;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    display: -webkit-box;
}

.book-card-author {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 0.75rem 0;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    display: -webkit-box;
}

.book-card-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: #9ca3af;
    margin: 0 0 1rem 0;
}

.book-card-meta span {
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.book-card-status {
    margin: 0.5rem 0;
}

.book-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

.book-card-actions button,
.book-card-actions a {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    text-align: center;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: white;
    color: #1a535c;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.book-card-actions button:hover,
.book-card-actions a:hover {
    background: #f3f4f6;
    border-color: #4ecdc4;
}

/* ===== Table View (Desktop) ===== */
@media (min-width: 768px) {
    .books-table-container {
        display: block !important;
    }

    .books-grid {
        display: none !important;
    }
}

@media (max-width: 1023px) {
    .books-table-container {
        display: none !important;
    }

    .books-grid {
        display: grid !important;
    }
}

/* ===== Users Card Layout ===== */
.users-grid,
.tenants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

/* ===== Tenant Card Layout ===== */
.tenant-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

.user-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.user-card:hover {
    box-shadow: 0 10px 25px rgba(26, 83, 92, 0.1);
    border-color: #4ecdc4;
    transform: translateY(-4px);
}

.user-card-header {
    padding: 1rem;
    background: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
}

.user-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a535c;
    margin: 0 0 0.5rem 0;
}

.user-card-role {
    display: inline-block;
    background: #4ecdc4;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.user-card-body {
    padding: 1rem;
    flex: 1;
}

.user-card-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.user-card-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
}

.user-card-value {
    font-size: 0.875rem;
    color: #1a535c;
    word-break: break-all;
}

.user-card-actions {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid #f3f4f6;
}

.user-card-btn {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    text-align: center;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: white;
    color: #1a535c;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.user-card-btn:hover {
    background: #f3f4f6;
    border-color: #4ecdc4;
}

.user-card-btn-danger {
    color: #dc2626;
}

.user-card-btn-danger:hover {
    background: #fee2e2;
    border-color: #dc2626;
}

/* ===== Loans Card Layout ===== */
.loans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.loan-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.loan-card:hover {
    box-shadow: 0 10px 25px rgba(26, 83, 92, 0.1);
    border-color: #4ecdc4;
    transform: translateY(-4px);
}

.loan-card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.loan-card-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.loan-card-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
}

.loan-card-value {
    font-size: 0.875rem;
    color: #1a535c;
}

.loan-card-status {
    margin-top: 0.5rem;
}

.loan-card-actions {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid #f3f4f6;
}

.loan-card-btn {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    text-align: center;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: white;
    color: #1a535c;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.loan-card-btn:hover {
    background: #f3f4f6;
    border-color: #4ecdc4;
}

/* ===== Invitation Codes Card Layout ===== */
.invitation-codes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.invitation-code-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.invitation-code-card:hover {
    box-shadow: 0 10px 25px rgba(26, 83, 92, 0.1);
    border-color: #4ecdc4;
}

.invitation-code-card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.invitation-code-card-code {
    background: #f3f4f6;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-family: monospace;
    font-weight: 600;
    color: #1a535c;
    text-align: center;
    word-break: break-all;
}

.invitation-code-card-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.invitation-code-card-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
}

.invitation-code-card-value {
    font-size: 0.875rem;
    color: #1a535c;
}

.invitation-code-card-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
    margin-top: 0.5rem;
}

.invitation-code-card-btn {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    text-align: center;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: white;
    color: #1a535c;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.invitation-code-card-btn:hover {
    background: #f3f4f6;
    border-color: #4ecdc4;
}

.invitation-code-card-btn-danger:hover {
    background: #fee2e2;
    border-color: #dc2626;
    color: #dc2626;
}

/* ===== Responsive Table/Card Toggle ===== */
@media (max-width: 1023px) {

    .users-table-container,
    .loans-table-container,
    .invitation-codes-table-container,
    .tenants-table-container {
        display: none !important;
    }

    .users-grid,
    .loans-grid,
    .invitation-codes-grid,
    .tenants-grid {
        display: grid !important;
    }
}

@media (min-width: 768px) {

    .users-table-container,
    .loans-table-container,
    .invitation-codes-table-container,
    .tenants-table-container {
        display: block !important;
    }

    .users-grid,
    .loans-grid,
    .invitation-codes-grid,
    .tenants-grid {
        display: none !important;
    }
}

.bg-gray-bg {
    --tw-bg-opacity: 1;
    background-color: rgb(248 249 250 / var(--tw-bg-opacity, 1));
}

/* ===== Custom Tooltip ===== */
#custom-tooltip {
    position: fixed;
    z-index: 9999;
    background: #1f2937;
    color: #f9fafb;
    font-size: 0.9375rem;
    /* ~1.5x default ~10px browser tooltip */
    padding: 0.4em 0.75em;
    border-radius: 0.375rem;
    pointer-events: none;
    white-space: normal;
    max-width: 300px;
    line-height: 1.4;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transition: opacity 0.15s ease;
}