:root {
    --sidebar-width: 260px;
    --primary-color: #0077b6; /* Deep Cerulean Blue */
    --secondary-color: #00b4d8; /* Bright Cerulean Blue */
    --accent-color: #fca311; /* Tangerine */
    --background-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #343a40;
    --header-bg: #03045e; /* Midnight Blue */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
}

/* --- Lock Screen with Wave Animation --- */
#lock-screen {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: #023e8a; /* Deep blue background */
    z-index: 1056;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.waves-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    overflow: hidden;
}
.waves {
    position: relative;
    width: 100%;
    height: 15vh;
    margin-bottom: -7px;
    min-height: 100px;
    max-height: 150px;
}
.parallax > use {
    animation: move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite;
}
.parallax > use:nth-child(1) {
    animation-delay: -2s;
    animation-duration: 7s;
    fill: rgba(255,255,255,0.7);
}
.parallax > use:nth-child(2) {
    animation-delay: -3s;
    animation-duration: 10s;
    fill: rgba(255,255,255,0.5);
}
.parallax > use:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 13s;
    fill: rgba(255,255,255,0.3);
}
.parallax > use:nth-child(4) {
    animation-delay: -5s;
    animation-duration: 20s;
    fill: #fff;
}
@keyframes move-forever {
    0% { transform: translate3d(-90px,0,0); }
    100% { transform: translate3d(85px,0,0); }
}

.pin-card {
    width: 350px; animation: fadeIn 0.5s ease; position: relative; z-index: 2;
    background-color: rgba(255, 255, 255, 0.95);
    border: none;
    backdrop-filter: blur(5px);
}
.pin-inputs input {
    width: 60px; height: 60px; font-size: 2rem; text-align: center;
    border: 1px solid #dee2e6;
}
@keyframes fadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.shake { animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both; transform: translate3d(0, 0, 0); }
@keyframes shake { 10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(2px,0,0)}30%,50%,70%{transform:translate3d(-4px,0,0)}40%,60%{transform:translate3d(4px,0,0)} }

/* --- Main Layout --- */
.sidebar {
    width: var(--sidebar-width); height: 100vh; position: fixed; top: 0; left: 0;
    background-color: var(--card-bg);
    border-right: 1px solid #dee2e6;
    padding: 1.5rem 1rem;
    display: flex; flex-direction: column;
}
.sidebar .nav-link {
    color: #555; font-weight: 500; padding: 0.75rem 1rem; margin-bottom: 0.5rem;
    border-radius: 0.5rem; transition: all 0.2s ease;
    display: flex; align-items: center;
}
.sidebar .nav-link:hover { background-color: var(--background-color); color: #000; }
.sidebar .nav-link.active {
    background-color: var(--primary-color); color: #fff;
    box-shadow: 0 4px 12px rgba(0, 119, 182, 0.3);
}
.sidebar .nav-link i { margin-right: 1rem; width: 20px; text-align: center; }
.sidebar .submenu .nav-link { padding-left: 3.5rem; font-size: 0.9rem; padding-top: 0.5rem; padding-bottom: 0.5rem; color: #666; }
.sidebar .submenu .nav-link.active { background-color: #e9ecef; color: var(--primary-color); box-shadow: none; }
.sidebar-footer { margin-top: auto; }

.content-wrapper { margin-left: var(--sidebar-width); padding: 2rem; width: calc(100% - var(--sidebar-width)); height: 100vh; overflow-y: auto; }
main.active { display: block; animation: fadeInPage 0.5s ease-in-out; }
@keyframes fadeInPage { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.card { border: 1px solid #dee2e6; border-radius: 0.75rem; box-shadow: 0 4px 25px rgba(0,0,0,0.05); }
.table-responsive { border-radius: 0 0 0.75rem 0.75rem; overflow: hidden; }
.table { margin-bottom: 0; }

/* Entity List Styles */
.entity-table-header { background-color: var(--header-bg); color: white; }
.entity-table-header th { color: white !important; font-weight: 500; border: none; cursor: pointer; position: relative; user-select: none; }
.entity-table-header th.sortable::after { font-family: "bootstrap-icons"; content: "\\f533"; position: absolute; right: 8px; opacity: 0.3; }
.entity-table-header th.sort-asc::after { content: "\\f128"; opacity: 1; }
.entity-table-header th.sort-desc::after { content: "\\f125"; opacity: 1; }
.entity-logo { width: 32px; height: 32px; object-fit: cover; border-radius: 50%; }
.column-toggler .dropdown-item { cursor: pointer; }
.column-toggler .dropdown-item .form-check-input { pointer-events: none; }
th.dragging { opacity: 0.5; background: var(--primary-color); }
.pagination .page-link { cursor: pointer; }

.btn-primary { background-color: var(--primary-color); border-color: var(--primary-color); }
.btn-primary:hover { background-color: #005f8d; border-color: #005f8d; }
