@import 'flickity.css';
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');


* {
    box-sizing: border-box;
    font-smoothing: antialiased;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}



*:focus:not(:focus-visible) {
    outline: none;
}

*:focus:focus-visible {
    outline: 1px solid var(--primary-color) !important;
    outline-offset: 3px;
    border-radius: var(--border-radius);
}

.editing *:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    outline: none !important;
}


html, body {
    font-family: 'Inter', Arial, sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-size: 18px;
    line-height: 1.5;
    margin: 0;
    padding: 0;
}

body {
   position: relative;
   overflow-x: hidden;
}

body.no-header {
    padding-left: 0 !important;
}

:root {
    --sidebar-width: 0;
    --icon-sidebar-width: 0;
    --nav-panel-width: 0;
    --sidebar-padding: 1.5em;
    --view-padding: 1em;
    --border-radius: 0.5em;
    --primary-color: #E8830C;
    --editing-background-color: rgba(224, 223, 219, 0.5);
    --icon-sidebar-bg: #e8e6e2;
    --nav-panel-bg: #F7F5F2;

    /* Light mode (default) */
    --bg-color: #ffffff;
    --bg-secondary: #f8f8f8;
    --bg-tertiary: #f5f5f5;
    --text-color: #333333;
    --text-secondary: #666666;
    --text-muted: #888888;
    --border-color: #e0dfdb;
    --border-light: #f0f0f0;
    --card-bg: #ffffff;
    --input-bg: #ffffff;
    --input-bg-alt: #e0dfdb;
    --hover-bg: #fafafa;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

/* Dark mode */
body.dark-mode {
    --bg-color: #1a1a1a;
    --bg-secondary: #242424;
    --bg-tertiary: #2a2a2a;
    --text-color: #e8e8e8;
    --text-secondary: #b0b0b0;
    --text-muted: #808080;
    --border-color: #3a3a3a;
    --border-light: #2e2e2e;
    --card-bg: #242424;
    --input-bg: #2a2a2a;
    --input-bg-alt: #3a3a3a;
    --hover-bg: #2e2e2e;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --icon-sidebar-bg: #1a1a1a;
    --nav-panel-bg: #212121;
    --editing-background-color: rgba(40, 40, 40, 0.5);
}

/* Apply dark mode colors */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

body.dark-mode .view {
    color: var(--text-color);
}

body.dark-mode .mobile-header {
    border-color: var(--border-color);
}

body.dark-mode .mobile-menu {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

body.dark-mode .mobile-menu-section {
    border-color: var(--border-light);
}

body.dark-mode .mobile-menu-section a {
    color: var(--text-color);
}

body.dark-mode .mobile-menu-user {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

body.dark-mode .mobile-menu-user a {
    color: var(--text-color);
}

body.dark-mode .mobile-menu-toggle {
    color: var(--text-color);
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background: var(--input-bg);
    border-color: var(--border-color);
    color: var(--text-color);
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: var(--text-muted);
}

body.dark-mode .button {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-color);
}

body.dark-mode .button:hover {
    background: var(--hover-bg);
}

body.dark-mode .form-group label {
    color: var(--text-secondary);
}

body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode h4, body.dark-mode h5, body.dark-mode h6 {
    color: var(--text-color);
}

body.dark-mode table th {
    color: var(--text-secondary);
    border-color: var(--border-color);
}

body.dark-mode table td {
    border-color: var(--border-color);
}

body.dark-mode table tr:hover td {
    background: var(--hover-bg);
}

/* Dark mode - Cards and common elements */
body.dark-mode .card,
body.dark-mode .dashboard-card,
body.dark-mode .foster-card,
body.dark-mode .income-card,
body.dark-mode .expense-card,
body.dark-mode .document-card,
body.dark-mode .request-item,
body.dark-mode .movement-item,
body.dark-mode .documents-list li,
body.dark-mode .documents-filters,
body.dark-mode .upload-modal-content,
body.dark-mode .stat-card {
    background: var(--card-bg);
    border-color: var(--border-color);
}

body.dark-mode .dashboard-card-header,
body.dark-mode .foster-card-header {
    background: var(--bg-tertiary);
    border-color: var(--border-light);
}

body.dark-mode .foster-detail-row,
body.dark-mode .income-detail-row,
body.dark-mode .expense-detail-row {
    border-color: var(--border-light);
}

body.dark-mode .no-documents-message,
body.dark-mode .empty-state,
body.dark-mode .no-documents {
    color: var(--text-muted);
}

body.dark-mode .badge,
body.dark-mode .type-badge,
body.dark-mode .entity-badge,
body.dark-mode .status-badge {
    background: var(--bg-tertiary);
}

body.dark-mode .end-placement-form {
    background: #3d3520;
    border-color: #5a4d2e;
}

body.dark-mode .upload-form {
    background: var(--bg-secondary);
}

body.dark-mode .filter-bar select,
body.dark-mode .filter-bar input,
body.dark-mode .filter-group select,
body.dark-mode .filter-group input {
    background: var(--input-bg);
    border-color: var(--border-color);
    color: var(--text-color);
}

body.dark-mode .status-toggle a,
body.dark-mode .sort-toggle a,
body.dark-mode .view-toggle button {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

body.dark-mode .status-toggle a.active,
body.dark-mode .sort-toggle a.active,
body.dark-mode .view-toggle button.active {
    background: var(--card-bg);
    color: var(--text-color);
}

body.dark-mode .btn-delete {
    background: var(--card-bg);
}

body.dark-mode .current-avatar,
body.dark-mode .association-item,
body.dark-mode .avatar-upload-area {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

/* Dark mode - Navigation panel */
body.dark-mode .nav-panel {
    background: var(--nav-panel-bg);
}

body.dark-mode .nav-item {
    color: var(--text-secondary);
}

body.dark-mode .nav-item:hover {
    background: var(--hover-bg);
    color: var(--text-color);
}

body.dark-mode .nav-item.active {
    color: var(--text-color);
}

body.dark-mode .icon-sidebar {
    background: var(--icon-sidebar-bg);
}

body.dark-mode .icon-sidebar-item {
    color: var(--text-secondary);
}

body.dark-mode .icon-sidebar-item:hover,
body.dark-mode .icon-sidebar-item.active {
    color: var(--text-color);
}

/* Dark mode - Messages */
body.dark-mode .messages-list {
    background: var(--card-bg);
    border-color: var(--border-color);
}

/* Dark mode - Links and text */
body.dark-mode .doc-name a,
body.dark-mode .request-title a,
body.dark-mode .movement-title a {
    color: var(--text-color);
}

body.dark-mode .doc-meta,
body.dark-mode .request-meta,
body.dark-mode .movement-meta {
    color: var(--text-muted);
}

body.dark-mode .label,
body.dark-mode .foster-detail-row .label,
body.dark-mode .income-detail-row .label {
    color: var(--text-muted);
}

body.dark-mode .value,
body.dark-mode .foster-detail-row .value,
body.dark-mode .income-detail-row .value {
    color: var(--text-color);
}

/* Dark mode - Drag overlay */
body.dark-mode .drag-overlay {
    background: rgba(232, 131, 12, 0.95);
}

@media (min-width: 1100px) {
    :root {
        --icon-sidebar-width: 3.5em;
        --nav-panel-width: 15em;
        --sidebar-width: calc(var(--icon-sidebar-width) + var(--nav-panel-width));
        --view-padding: 2em;
    }
}

body {
    padding-left: var(--sidebar-width);
}

* > *:first-child { margin-top: 0 !important; }
* > *:last-child { margin-bottom: 0 !important; }

a {
    color:inherit;
    text-decoration: underline;
}

header {
    background-color: var(--nav-panel-bg);
    display: block;
}

@media (min-width: 1100px) {
    header {
        display: flex;
        padding: 0;
        height: 100vh;
        width: var(--sidebar-width);
        position: fixed;
            top: 0;
            left: 0;
            z-index: 99999999;
            display: flex;
            flex-direction: row;
        }
    }

    header.onboarding {

    }

/* Mobile Header */
.mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75em 1em;
    border-bottom: 1px solid #e0dfdb;
}

.mobile-header .logo {
    width: 7em;
    display: block;
}

.mobile-header .logo svg {
    width: 100%;
    height: auto;
}

.mobile-menu-toggle {
    background: none;
    border: none;
    font-size: 1.5em;
    color: #333;
    cursor: pointer;
    padding: 0.25em;
}

.mobile-menu {
    display: none;
    background: #fff;
    border-bottom: 1px solid #e0dfdb;
    max-height: 70vh;
    overflow-y: auto;
}

.mobile-menu.open {
    display: block;
}

.mobile-menu-section {
    padding: 0.75em 1em;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-section:last-of-type {
    border-bottom: none;
}

.mobile-menu-section-header {
    font-weight: 600;
    color: #666;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5em;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.mobile-menu-section-header i {
    font-size: 1.2em;
}

.mobile-menu-section a {
    display: block;
    padding: 0.5em 0 0.5em 1.75em;
    color: #333;
    text-decoration: none;
    font-size: 0.95em;
}

.mobile-menu-section a.active {
    color: var(--primary-color);
    font-weight: 500;
}

.mobile-menu-user {
    padding: 0.75em 1em;
    border-top: 1px solid #e0dfdb;
    background: #fafafa;
}

.mobile-menu-user a {
    display: flex;
    align-items: center;
    gap: 0.75em;
    text-decoration: none;
    color: #333;
}

.mobile-menu-user .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0dfdb;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.mobile-menu-user .user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-menu-user .user-avatar .initials {
    font-size: 0.8em;
    font-weight: 600;
    color: #666;
}

@media (min-width: 500px) {
    .mobile-header,
    .mobile-menu {
        display: none !important;
    }
}

/* Tablet Header (500px - 1100px) */
.tablet-header {
    display: none;
}

@media (min-width: 500px) and (max-width: 1099px) {
    .tablet-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5em 1em;
        border-bottom: 1px solid #e0dfdb;
        background: var(--nav-panel-bg);
    }
}

.tablet-header .logo {
    width: 6em;
    display: block;
    flex-shrink: 0;
}

.tablet-header .logo svg {
    width: 100%;
    height: auto;
}

.tablet-nav {
    display: flex;
    align-items: center;
    gap: 0.25em;
}

.tablet-nav-item {
    position: relative;
}

.tablet-nav-btn {
    background: none;
    border: none;
    width: 2.5em;
    height: 2.5em;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    font-size: 1.1em;
    transition: background 0.15s, color 0.15s;
}

.tablet-nav-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

.tablet-nav-btn.active {
    background: var(--primary-color);
    color: #fff;
}

.tablet-submenu {
    position: absolute;
    top: calc(100% + 0.5em);
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid #e0dfdb;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s;
    z-index: 100;
}

.tablet-nav-item.open .tablet-submenu {
    opacity: 1;
    visibility: visible;
}

.tablet-submenu-header {
    padding: 0.5em 0.75em;
    font-weight: 600;
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #999;
    border-bottom: 1px solid #f0f0f0;
}

.tablet-submenu a {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.6em 0.75em;
    color: #333;
    text-decoration: none;
    font-size: 0.9em;
    transition: background 0.1s;
}

.tablet-submenu a:hover {
    background: #f5f5f5;
}

.tablet-submenu a.active {
    color: var(--primary-color);
    font-weight: 500;
}

.tablet-submenu a i {
    font-size: 1.1em;
    width: 1.25em;
    text-align: center;
    color: #888;
}

.tablet-submenu a.active i {
    color: var(--primary-color);
}

.tablet-user-link {
    flex-shrink: 0;
}

.tablet-user-link .user-avatar {
    width: 2em;
    height: 2em;
    border-radius: 50%;
    background: #e0dfdb;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tablet-user-link .user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tablet-user-link .user-avatar .initials {
    font-size: 0.7em;
    font-weight: 600;
    color: #666;
}

/* Icon Sidebar */
.icon-sidebar {
    display: none;
}

@media (min-width: 1100px) {
    .icon-sidebar {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: var(--icon-sidebar-width);
        height: 100vh;
        background: var(--icon-sidebar-bg);
        padding: 1em 0;
        padding-top: 6.25rem;
        gap: 0.25em;
        flex-shrink: 0;
    }

    .icon-sidebar-top {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.25em;
        flex: 1;
    }

    .icon-sidebar-collapse {
        width: 2.5em;
        height: 2.5em;
        border: none;
        background: transparent;
        border-radius: var(--border-radius);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1em;
        color: #999;
        transition: all 0.15s ease;
        margin-bottom: 0.5em;
    }

    .icon-sidebar-collapse:hover {
        background: rgba(0, 0, 0, 0.08);
        color: #333;
    }

    .icon-sidebar-collapse i {
        transition: transform 0.2s ease;
    }

    body.sidebar-collapsed .icon-sidebar-collapse i {
        transform: rotate(180deg);
    }

    body.sidebar-collapsed {
        padding-left: var(--icon-sidebar-width);
    }

    body.sidebar-collapsed header {
        width: var(--icon-sidebar-width);
    }

    body.sidebar-collapsed .nav-panel {
        display: none;
        position: fixed;
        left: var(--icon-sidebar-width);
        top: 0;
        height: 100vh;
        box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 100;
    }

    body.sidebar-collapsed .nav-panel.overlay-open {
        display: flex;
    }
}

.icon-sidebar-btn {
    width: 2.5em;
    height: 2.5em;
    border: none;
    background: transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
    color: #666;
    transition: all 0.15s ease;
    position: relative;
}

.icon-sidebar-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #333;
}

.icon-sidebar-btn.active {
    background: linear-gradient(135deg, #E8830C 0%, #f5a742 100%);
    color: #fff;
}

.icon-sidebar-btn.tooltip-hidden::after {
    opacity: 0 !important;
    transform: translateY(-50%) translateX(-8px) !important;
}

/* Icon sidebar tooltip */
.icon-sidebar-btn::after {
    content: attr(title);
    position: absolute;
    left: calc(100% + 0.75em);
    top: 50%;
    transform: translateY(-50%) translateX(-8px);
    background: #fff;
    color: #333;
    height: 2.5em;
    display: flex;
    align-items: center;
    padding: 0 0.75em;
    border-radius: var(--border-radius);
    font-size: 0.9em;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 1000;
}

.icon-sidebar-btn:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* Navigation Panel */
.nav-panel {
    display: none;
}

@media (min-width: 1100px) {
    .nav-panel {
        display: flex;
        flex-direction: column;
        width: var(--nav-panel-width);
        height: 100vh;
        background: var(--nav-panel-bg);
        padding: var(--sidebar-padding);
        overflow-y: auto;
    }
}

.nav-panel-header {
    margin-bottom: 1.5em;
}

.nav-panel-header .logo {
    display: block;
    width: 10em;
    margin-bottom: 0.5em;
}

/* Category Header */
.nav-category-header {
    font-size: 0.7em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    margin-bottom: 0.75em;
    padding-left: 0.5em;
}

header .logo {
    display: block;
    width: 10em;
    aspect-ratio: 10/2.25;
    overflow: hidden;
    white-space: nowrap;
}

    header .logo svg {
        width: 100%;
        height: 100%;
    }

    @media (min-width: 1100px) {
        header .logo {
            
        }
    }

    header .association-name {
        color: var(--primary-color);
        font-weight: 500;
        font-size: 0.85em;
        margin-top: 0.5em;
    }

    header .association-dropdown {
        position: relative;
        margin-top: 0.5em;
        width: 100%;
    }

    header .association-current {
        color: var(--primary-color);
        font-weight: 500;
        font-size: 0.85em;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 0.3em;
        padding: 0.3em 0.5em;
        margin: -0.3em -0.5em;
        border-radius: var(--border-radius);
        transition: background 0.2s;
    }

    header .association-current:hover {
        background: rgba(0,0,0,0.05);
    }

    header .association-current i {
        font-size: 0.9em;
        transition: transform 0.2s;
    }

    header .association-dropdown.open .association-current i {
        transform: rotate(180deg);
    }

    header .association-dropdown-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: -0.5em;
        right: -0.5em;
        background: #fff;
        border: 1px solid #e0dfdb;
        border-radius: var(--border-radius);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        z-index: 1000;
        padding: 0.5em 0;
        margin-top: 0.25em;
    }

    header .association-dropdown.open .association-dropdown-menu {
        display: block;
    }

    header .association-dropdown-menu .association-item {
        display: flex;
        align-items: center;
        gap: 0.5em;
        padding: 0.6em 1em;
        text-decoration: none;
        color: #333;
        font-size: 0.85em;
        background: transparent;
        border-radius: 0;
        transition: background 0.15s;
    }

    header .association-dropdown-menu .association-item:hover {
        background: #f5f5f5;
    }

    header .association-dropdown-menu .association-item.active {
        color: var(--primary-color);
        font-weight: 500;
        background: #f5f5f5;
    }

    header .association-dropdown-menu .association-item.active i {
        color: var(--primary-color);
    }

    header .association-dropdown-menu .association-item.add-new {
        color: var(--primary-color);
    }

    header .association-dropdown-menu .association-item.add-new i {
        font-size: 1.1em;
    }

    header .association-dropdown-divider {
        height: 1px;
        background: #e0dfdb;
        margin: 0.5em 0;
    }

header nav.main-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

header nav.main-menu a {
    text-decoration: none;
    font-weight: 500;
    display: block;
    padding: 0.4em 0.5em 0.4em 0.8em;
    margin-left: -0.5em;
    position: relative;
    width: calc(100% + 1em);
    border-radius: var(--border-radius);
    transition: all 0.2s ease-out;
    font-size: 1em;
}

    @media (min-width: 1100px) {
        header nav.main-menu {
            margin-top: 0;
            flex: 1;
        }
    }

    header nav.main-menu a:hover,
    header nav.main-menu a.active {
        background-color: #e8e6e2;
    }


header nav.main-menu a i {
    margin-right: 0.5em;
    font-size: 1.2em;
    position: absolute;
    left: 0.5em;
    top: 50%;
    transform: translateY(-50%);
}

/* Pro badge for locked features */
.pro-badge {
    display: inline-block;
    background: linear-gradient(135deg, #E8830C 0%, #f5a742 100%);
    color: #fff;
    font-size: 0.65em;
    font-weight: 600;
    padding: 0.15em 0.5em;
    border-radius: 3px;
    margin-left: 0.5em;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

a.nav-locked {
    opacity: 0.7;
}

a.nav-locked:hover .pro-badge {
    transform: scale(1.05);
}

header nav.user-menu {
    display: flex;
    flex-direction: column;
    gap: 1em;
    margin-top: auto;
    padding-top: 1em;
    border-top: 1px solid #e0dfdb;
}

header nav.user-menu a {
    text-decoration: none;
}

header nav.user-menu .user-profile-link {
    display: flex;
    align-items: center;
    gap: 0.75em;
    padding: 0.5em;
    border-radius: var(--border-radius);
    transition: background 0.2s;
}

header nav.user-menu .user-profile-link:hover {
    background: rgba(0, 0, 0, 0.05);
}

header nav.user-menu .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

header nav.user-menu .user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

header nav.user-menu .user-avatar .initials {
    color: #fff;
    font-size: 0.85em;
    font-weight: 600;
}

header nav.user-menu .user-name {
    font-size: 0.9em;
    color: #333;
    font-weight: 500;
}

h1 {
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.2em;
    font-weight: 500;
    color: #666;
}

    h1 + .lead {
        margin-top: -1rem;
    }

.flex {
    display: flex;
    flex-flow: row wrap;
    align-items: flex-start;
    gap: 1em;
}

.flex.justify-between {
    justify-content: space-between;
}

.map-container {
    position: relative;
}

.geolocate-button {
    position: absolute;
    top: 1em;
    left: 1em;
    z-index: 1000;
    padding: 0.5em 1em;
    font-size: 0.8em;
    line-height: 1;
    background-color: #fff;
    border-radius: 0.5em;
    box-shadow: 0 0 1em rgba(0, 0, 0, 0.2);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.location-picker,
#googlemap {
    width: 100%;
    height: 300px;
    border-radius: 0.5em;
    margin-bottom: 1em;
}

.cat-details {
    display: flex;
    flex-flow: row wrap;
    gap: 2em;
}

    .cat-details .cat-pictures-gallery {
        flex: 1;
        max-width: 20em;
    }

    .cat-details .cat-info {
        flex: 1;
    }

    @media (min-width: 1100px) {
        .cat-details .cat-info {
            order: 1;
        }

        .cat-details .cat-pictures-gallery {
            order: 2;
        }
    }

    .cat-info {

    }

        .cat-info .cat-info-item {
            padding: 0.5em 0;
            border-bottom: 1px solid #e0dfdb;
        }


.location-picker img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cat-pictures img {
    width: auto;
    height: 20em;
    object-fit: contain;
}

/* Cat Pictures Gallery */
.cat-pictures-gallery {
    max-width: 20em;
}

.cat-pictures-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5em;
    margin-bottom: 0.75em;
}

.cat-picture-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: #f5f5f5;
}

.cat-picture-item a {
    display: block;
    width: 100%;
    height: 100%;
    cursor: zoom-in;
}

.cat-picture-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cat-picture-item:first-child:nth-last-child(1) {
    grid-column: span 2;
    aspect-ratio: 4/3;
}

.cat-picture-item .delete-picture-btn {
    position: absolute;
    top: 0.4em;
    right: 0.4em;
    width: 1.75em;
    height: 1.75em;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s ease;
    font-size: 0.9em;
}

.cat-picture-item:hover .delete-picture-btn {
    opacity: 1;
}

.cat-picture-item .delete-picture-btn:hover {
    background: rgba(200, 50, 50, 0.9);
}

.cat-picture-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5em;
}

.cat-picture-upload input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.upload-picture-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    width: 100%;
    padding: 0.75em 1em;
    border: 2px dashed #ccc;
    border-radius: var(--border-radius);
    background: #fafafa;
    color: #666;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.9em;
}

.upload-picture-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #fff;
}

.upload-picture-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.upload-picture-btn i {
    font-size: 1.2em;
}

.upload-info {
    font-size: 0.8em;
    color: #999;
    text-align: center;
}

.upload-info-full {
    font-size: 0.8em;
    color: #999;
    text-align: center;
    padding: 0.5em 0;
}

@media (max-width: 768px) {
    .cat-pictures-gallery {
        max-width: 100%;
        margin-bottom: 1.5em;
    }

    .cat-picture-item .delete-picture-btn {
        opacity: 1;
    }
}

.cat-info-item {
    display: flex;
    flex-flow: row wrap;
}

.cat-info-label {
    font-weight: bold;
    width: 11.5em;
    padding-right: 1.5em;
}

.cat-info-value {
    flex: 1;
}


.view {
        padding: var(--view-padding);
}

    .view.centered > * {
        margin-left: auto;
        margin-right: auto;
    }   

    .view.centered-vertical {
        min-height: calc(100vh - calc(var(--view-padding) * 2));
        display: flex;
        flex-flow: column wrap;
        justify-content: center;
        align-items: center;
    }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.button {
    background-color: #e0dfdb;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.5em 1em;
    text-decoration: none;
    border: 1px solid #e0dfdb;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 1em;
    line-height: 1.5 !important;
    transition: all 0.2s ease-out;
}

    .button:hover,
    .button:focus,
    .button:active {
        background-color: #fff;
    }

    .button i {
        transform: scale(1.4);
        margin-right: 0.25em;
    }

    .button.highlight {
        background-color: var(--primary-color);
        color: #fff;
        box-shadow: 0 0 1em rgba(0, 0, 0, 0.2);
    }

    .button.highlight:hover,
    .button.highlight:focus,
    .button.highlight:active {
        background-color: #ba680b;
        box-shadow: 0 0 0 rgba(0, 0, 0, 0.2);
        transform: scale(0.975);
    }

.app-search-form {
    position: relative;
    width: 100%;
    max-width: 20em;
}

    .app-search-form input {
        width: 100%;
        padding: 0.5em 3em 0.5em 1em;
        background-color: #e0dfdb;
        border: 1px solid #e0dfdb;
        border-radius: var(--border-radius);
        appearance: none;
        -webkit-appearance: none;
        font: inherit;
        line-height: 1.5;
        outline: none;
        transition: all 0.2s ease-out;
    }

    .app-search-form input:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 1em rgba(0, 0, 0, 0.2);
    }

    .app-search-form button {
        position: absolute;
        appearance: none;
        -webkit-appearance: none;
        right: 2px;
        top: 0;
        height: 100%;
        background-color: transparent;
        border: 0;
        font: inherit;
        font-size: 1.25em;
        color: #777;
        outline: none;
        cursor: pointer;
        transition: all 0.2s ease-out;
        padding: 0 0.5em;
    }

    .app-search-form input:focus ~ button,
    .app-search-form button:focus {
        color: #111;
    }


.filter-options {
    display: flex;
    flex-flow: row wrap;
    gap: 1em;
    display: none;
    overflow: hidden;
    transition: all 0.2s ease-out;
}

    .filter-options.active {
        display: flex;
    }

.app-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    margin-left: -0.5em;
    width: calc(100% + 0.5em);
}

.app-table thead {
    border-bottom: 2px solid #e0dfdb;
}
    .app-table th {
        font-weight: 700;
        padding: 0.5em;
    }

.app-table td {
    padding: 0.5em;
}

.app-table td a {
    text-decoration: none;
}

.app-table tr:nth-child(even) {
    background-color: #f8f8f8;
}


.color-tags {
    display: flex;
    flex-flow: row wrap;
    gap: 0.5em;
}

.color-tag {
    display: flex;
    flex-flow: row no-wrap;
    align-items: center;
    gap: 0.5em;
    background-color: rgba(224, 223, 219, 0.5);
    padding: 0.25em 0.5em;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
}

    .color-tag-clickable .color-tag {
        cursor: pointer;
    }

    .color-tag-clickable input {
        opacity: 0;
        position: absolute;
        pointer-events: none;
    }

    .color-tag-clickable input:checked + .color-tag {
        background-color: #e0dfdb;
        border-color: var(--primary-color);
    }

.color-dot {
    display: inline-block;
    width: 1em;
    height: 1em;
    border-radius: 0.25em;
}

.number-badge {
    font-size: 0.8em;
    line-height: 0.8;
    background-color: var(--primary-color);
    color: #fff;
    min-width: 2em;
    padding: 0 0.25em;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 2em;
    border-radius: 99px;
    font-size: 0.8em;
    font-weight: 700;
    line-height: 1;
}

.app-tabview {
    display: flex;
    flex-flow: row wrap;
    padding-right: 1em;
    position: relative;
    border-bottom: 1px solid #e0dfdb;
    margin-left: -0.5em;
    width: calc(100% + 0.5em);
    padding: 0 0.5em;
    gap: 1.5em;
    margin-bottom: 2em;
}

.app-tabview > .tab {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background-color: transparent;
    font: inherit;
    outline: none;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.2em;
    position: relative;
    margin-bottom: 0.5em !important;
    color: #777;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    gap: 0.5em;
}

.app-tabview > .tab:focus,
.app-tabview > .tab:hover {
    color: var(--primary-color);
}

.app-tabview > .tab.active {
    color: var(--primary-color);
}

.app-tabview > .tab.active::after {
    content: '';
    position: absolute;
    display: block;
    background-color: var(--primary-color);
    height: 2px;
    left: -0.5rem;
    width: calc(100% + 1rem);
    bottom: calc(-0.5em - 2px);
}

.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55em;
    font-weight: 600;
    min-width: 1.6em;
    height: 1.6em;
    padding: 0 0.4em;
    border-radius: 999px;
    margin-left: 0.4em;
    background-color: #e0dfdb;
    color: #666;
}

.tab.active .tab-count,
.tab-count.active {
    background-color: var(--primary-color);
    color: #fff;
}

.app-tabview .app-tabview-dropdown {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 1.5em;
    color: #777;
}

.app-tabview-content {
    display: none;
}

.app-tabview-content.active {
    display: block;
}

.editable {
    cursor: pointer;
    position: relative;
}

.editable i.la-edit {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-60%) translateX(-1.5em);
    opacity: 0;
}

.editable:hover i.la-edit {
    opacity: 1;
}

.editable.is-editing {
    display: none;
}

.editing {
    display: none;
}

.editable.is-editing ~ .editing {
    display: flex;
    position: relative;
}

.editable.is-editing ~ .editing:before {
    content: '';
    position: absolute;
    left: -0.5em;
    top: -0.25em;
    width: calc(100% + 0.5em);
    height: calc(100% + 0.5em);
    background-color: var(--editing-background-color);
    border-radius: var(--border-radius);
    z-index: -1;
}

.inline-input {
    width: 100%;
    padding: 0;
    border: 0;
    background-color: transparent;
    font: inherit;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

    select.inline-input {
        padding-right: 1.5em;
        background-image: url(../img/dropdown.svg);
        background-repeat: no-repeat;
        background-position: right 0.75em center;
        background-size: 0.5em auto;
    }


.messages {
    position: fixed;
    bottom: 1em;
    right: 1em;
    width: calc(100% - 2em);
    max-width: 20em;
    z-index: 99999999;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

    .messages .message {
        background-color: #fff;
        padding: 1em;
        border-radius: var(--border-radius);
        box-shadow: 0 0 1em rgba(0, 0, 0, 0.2);
        margin-bottom: 1em;
        font-weight: 700;
        cursor: pointer;
        transform: translateX(120%);
        transition: all 0.2s ease-out;
        width: fit-content;
        max-width: 100%;
        margin: 0 0 0 auto !important;
    }

    .messages .message.show {
        transform: translateX(0);
    }

    .messages .message.type-success {
        background-color: #55DA93;
        color: #fff;
    }

    .messages .message.type-error {
        background-color: #f8d7da;
        color: #721c24;
    }

    .messages .message.type-info {
        background-color: #d1ecf1;
        color: #0c5460;
    }



.stepped-form {
    display: flex;
    flex-direction: column;
    gap: 1em;
    margin-top: 3em;
    position: relative;
}

.stepped-form .step {
    display: block;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease-out;
    transform: translateX(10em);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 30em;
}

    .stepped-form .step.active {
        display: block;
        opacity: 1;
        pointer-events: auto;
        transform: translateX(0);
    }

    .stepped-form .step.past {
        transform: translateX(-10em);
    }

    .stepped-form .form-group {
        display: block
    }

    .stepped-form .form-group label {
        font-weight: 500;
    }

    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="password"],
    .form-group input[type="number"],
    .form-group select {
        width: 100%;
        padding: 1em;
        background-color: #e0dfdb;
        border: 1px solid #e0dfdb;
        border-radius: var(--border-radius);
        appearance: none;
        -webkit-appearance: none;
        font: inherit;
        outline: none;
        transition: all 0.2s ease-out;
    }

    .form-group input.error {

    }

    .form-group input:focus,
    .form-group select:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 1em rgba(0, 0, 0, 0.2);
    }

    .stepped-form p.hint {
        font-size: 0.8em;
        line-height: 1.2;
        color: #666;
        margin-top: 0 !important;
        margin-bottom: 1em;
    }

    .stepped-form .form-group p.hint + input {
        margin-top: 0 !important;
    }

    .stepped-form .form-group label + input {
        margin-top: 0.5em !important;
    }

    .stepped-form .button,
    .stepped-form input[type="submit"],
    .form-group input[type="submit"] {
        cursor: pointer;
        border: 0;
        appearance: none;
        -webkit-appearance: none;
        font: inherit;
        display: flex;
        align-items: center;
        gap: 0.5em;
        margin-top: 2em;
        padding: 1em;
        text-decoration: none;
        border-radius: var(--border-radius);
        font-weight: 500;
        font-size: 1em;
        line-height: 1;
        transition: all 0.2s ease-out;
        background-color: var(--primary-color);
        color: #fff;
        width: fit-content;
    }

    .stepped-form .button.association-type {
        background-color: #f8f8f8;
        border: 1px solid #ccc;
        color: #777;
        padding: 2em;
    }

    .stepped-form .button.association-type:hover,
    .stepped-form .button.association-type:focus,
    .stepped-form .button.association-type:active {
        background-color: #fff !important;
        border: 1px solid #e0dfdb !important;
        padding: 2em !important;
        box-shadow: none !important;
        transform: scale(1) !important;
    }

    .stepped-form .button:hover,
    .stepped-form .button:focus,
    .stepped-form .button:active,
    .form-group input[type="submit"]:active,
    .form-group input[type="submit"]:hover,
    .form-group input[type="submit"]:focus {
        background-color: #ba680b;
        box-shadow: 0 0 0 rgba(0, 0, 0, 0.2);
        transform: scale(0.975);
    }

    .stepped-form * + * {
        margin-top: 1em !important;
    }

    .stepped-form .form-group .flex {
        display: flex;
        flex-flow: row wrap;
        gap: 1em;
    }

    .stepped-form .form-group .flex > * {
        flex: 1;
        margin-top: 0 !important;
    }

.login-form {

}

    .login-form .login-form-cat {
        width: 10em;
        aspect-ratio: 4/3;
        object-fit: contain;
        object-position: center;
        display: block;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: -1em;
    }

    .login-form a {
        text-decoration: none;
        color: var(--primary-color);
        font-weight: 700;
    }

.login-form form {
    width: 100%;
    max-width: 25em;
    margin: 0 auto;
}

    .login-form .form-group {
        margin-bottom: 1em;
    }

    .login-form input[type="submit"] {
        margin-top: 2em;
    }

@media (max-width: 600px) {
    .mobile-hide {
        display: none;
    }
}

.highlight {
    color: var(--primary-color);
}