/* Make admin page full screen */
.page:has(.admin-top-bar) {
    height: 100vh;
    overflow: hidden;
}

/* Remove padding from parent containers when showing admin page */
.content:has(.admin-page-container) {
    padding-top: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Hide footer on admin page */
.page:has(.admin-top-bar) .footer {
    display: none;
}

.admin-top-bar {
    flex-shrink: 0;
    height: 60px;
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
}

.admin-top-bar__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.admin-top-bar__user {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.admin-top-bar__email {
    font-size: 0.9rem;
    color: #6c757d;
}

.admin-top-bar__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.admin-top-bar__avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.admin-top-bar__menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 160px;
    z-index: 1000;
}

.admin-top-bar__menu-item {
    display: block;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: transparent;
    text-align: left;
    color: #333;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.admin-top-bar__menu-item:hover {
    background-color: #f8f9fa;
}

.admin-top-bar__menu-item:first-child {
    border-radius: 8px 8px 0 0;
}

.admin-top-bar__menu-item:last-child {
    border-radius: 0 0 8px 8px;
}

.admin-page-container {
    display: flex;
    height: calc(100vh - 60px); /* 60px is the height of the top bar */
    margin: 0;
    padding: 0;
}

.admin-nav-panel {
    flex: 0 0 200px;
    background-color: #f8f9fa;
    padding: 20px;
    border-right: 1px solid #dee2e6;
}

.admin-nav-panel .nav-item {
    margin-bottom: 4px;
}

/* Modern Navigation Link Styles */
.admin-nav-link {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: #495057;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.admin-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: #007bff;
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 4px 4px 0;
}

.admin-nav-link:hover {
    background-color: rgba(0, 123, 255, 0.08);
    color: #007bff;
    transform: translateX(4px);
}

.admin-nav-link:hover::before {
    transform: scaleY(1);
}

.admin-nav-link.active {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.15) 0%, rgba(0, 123, 255, 0.08) 100%);
    color: #007bff;
    font-weight: 600;
    transform: translateX(4px);
}

.admin-nav-link.active::before {
    transform: scaleY(1);
}

.admin-nav-link__text {
    flex: 1;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-nav-link:active {
    transform: translateX(2px) scale(0.98);
}

.admin-content-panel {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

/* Table headers */
.admin-content-panel table thead {
    background: linear-gradient(90deg, #eef3fb 0%, #e5ecf7 100%);
}

.admin-content-panel table thead th {
    border-color: #dee2e6;
    color: #2f3a4a;
    font-weight: 600;
}

.admin-menu-strip {
    margin-bottom: 20px;
}

.data-entry-panel {
    position: fixed;
    top: 0;
    right: -400px; /* Start off-screen */
    width: 400px;
    height: 100%;
    background-color: white;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    transition: right 0.3s ease-in-out;
    z-index: 1050;
    display: flex;
    flex-direction: column;
}

.data-entry-panel.visible {
    right: 0;
}

.data-entry-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.data-entry-panel-body {
    padding: 1rem;
    overflow-y: auto;
    flex-grow: 1;
}

.data-entry-panel-footer {
    padding: 1rem;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-start;
}

.data-entry-panel-footer .btn {
    margin-right: 10px;
}

.data-entry-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.data-entry-panel-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.actions-menu {
    position: relative;
    display: inline-block;
}

.actions-menu-dropdown {
    position: absolute;
    right: 0;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: .25rem;
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    min-width: 160px;
}

.actions-menu-dropdown .btn {
    text-align: left;
    padding: .5rem 1rem;
    border-radius: 0;
}

/* Ensure main content area takes full width */
main {
    width: 100%;
    max-width: none;
}

article.content {
    width: 100%;
    max-width: none;
}

/* Overview Dashboard Styles */
.overview-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Stat Card Styles */
.stat-card {
    background-color: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #6c757d;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.stat-card--primary {
    border-left-color: #007bff;
}

.stat-card--success {
    border-left-color: #28a745;
}

.stat-card--info {
    border-left-color: #17a2b8;
}

.stat-card__value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.stat-card__label {
    font-size: 1rem;
    color: #6c757d;
    font-weight: 500;
}

.stat-card__sublabel {
    font-size: 0.875rem;
    color: #adb5bd;
    margin-top: 4px;
}

/* Tenant Breakdown Styles */
.tenant-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* Tenant Summary Card Styles */
.tenant-summary-card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #dee2e6;
    transition: box-shadow 0.2s;
}

.tenant-summary-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.tenant-summary-card__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #007bff;
}

.tenant-summary-card__stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 12px;
}

.tenant-summary-card__stat {
    text-align: center;
}

.tenant-summary-card__stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 4px;
}

.tenant-summary-card__stat-label {
    display: block;
    font-size: 0.875rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tenant-summary-card__roles {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e9ecef;
}
