body {
    padding-top: 2rem;
    align-items: center;
}

.table-responsive {
    width: 60vw;
    margin: 0 auto;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
}

@media (max-width: 992px) {
    .table-responsive {
        width: 100%;
    }
}

.details-row {
    display: none;
    background-color: #F1F3F4;
    border-style: none !important;
}

.details-row td {
    padding: 0.75rem;
    font-size: 0.75rem;
    font-family: monospace;
}

.asset-table td:nth-child(2),
.asset-table th:nth-child(2) {
    padding-left: 0.5rem;
    width: 40%;
    text-align: left;
}

.main-row:hover {
    background-color: #E8F0FE;
    cursor: pointer;
}

thead th {
    position: sticky;
    top: 0;
    background-color: #F1F3F4;
    z-index: 1;
    color: #202124;
}

.toggle-icon {
    margin-right: 0.5rem;
    transition: transform 0.3s ease;
}

table th {
    background-color: #F1F3F4;
}

.btn-use {
    background-color: #008dd5;
    color: white;
}

.btn-use:hover {
    background-color: #0077b3;
}

.btn-admin {
    background-color: #dc3545;
    color: white;
}

.btn-admin:hover {
    background-color: #bb2d3b;
}

.btn-create {
    background-color: #008dd5;
    color: white;
    border-radius: 0.375rem;
    padding: 0.5rem 0.5rem;
    font-size: 1rem;
    position: fixed;
    bottom: 2rem;
    right: 2.5rem;
    z-index: 1000;
    animation: floaty 3s ease-in-out infinite, pulseGlow 2.5s infinite ease-in-out;
}

.btn-create:hover {
    background-color: #0077b3;
}

.btn-admin {
    background-color: #dc3545;
    color: white;
}

.btn-admin:hover {
    background-color: #bb2d3b;
}

#btn-admin-bulk {
    display: none;
    margin: 0.5rem;
    float: right;
    background-color: #dc3545;
    color: white;
}

#btn-admin-bulk:hover {
    background-color: #bb2d3b;
}

@keyframes floaty {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-6px);
    }
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 141, 213, 0.7);
    }

    70% {
        box-shadow: 0 0 10px 10px rgba(0, 141, 213, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 141, 213, 0);
    }
}

.position-header {
    position: relative;
}

.owned-toggle {
    position: absolute;
    top: 0.5rem;
    right: 0.7rem;
    font-size: 0.8rem;
    padding: 0.15rem 0.4rem;
}

/* Hover effect */
#positions-table tbody tr.main-row:hover {
    background-color: #d6e3fd;
    /* softer highlight */
}

/* Refined padding */
#positions-table td,
#positions-table th {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    vertical-align: middle;
}

/* Softer border */
#positions-table {
    border-collapse: separate;
    border-spacing: 0 6px;
    border: none;
}

#positions-table tbody tr.main-row {
    border: 1px solid #e1e4ea;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.07);
    transition: box-shadow 0.3s ease;
}

#positions-table tbody tr.main-row:hover {
    box-shadow: 0 3px 8px rgb(0 0 0 / 0.12);
}

/* Sticky header refinement */
#positions-table thead th {
    background-color: #ffffff;
    border-bottom: 2px solid #1a73e8;
    color: #1a73e8;
    font-weight: 600;
    font-size: 1rem;
}

/* Fixed width for Position ID */
#positions-table td:first-child,
#positions-table th:first-child {
    width: 50%;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Balance column */
#positions-table td:nth-child(2),
#positions-table th:nth-child(2) {
    width: 50%;
    text-align: right;
    font-weight: 600;
    color: #333;
}

/* Responsive tweaks */
@media (max-width: 768px) {

    #positions-table td,
    #positions-table th {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }

    #positions-table td:first-child,
    #positions-table th:first-child {
        width: 60%;
    }

    #positions-table td:nth-child(2),
    #positions-table th:nth-child(2) {
        width: 40%;
    }
}