/* Contracts & Admin Styles */

body.admin-page,
body.portal-page {
    background-color: var(--bg-darker);
    min-height: 100vh;
}

/* Admin Layout */
.admin-dashboard {
    display: flex;
    padding-top: 80px;
    /* Navbar height */
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background: var(--bg-dark);
    padding: 2rem 1rem;
    border-right: 1px solid var(--bubbly-border);
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav li {
    padding: 1rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: all var(--transition-fast);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.sidebar-nav li:hover,
.sidebar-nav li.active {
    color: var(--text-main);
    background: var(--bubbly-surface);
}

.admin-content {
    flex: 1;
    padding: 2rem 5%;
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    padding: 2rem;
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    margin-top: 1rem;
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    padding-top: 80px;
    min-height: 100vh;
}

.dashboard-sidebar {
    width: 300px;
    background: var(--bg-dark);
    padding: 3rem 2rem;
    border-right: 1px solid var(--bubbly-border);
}

.client-info {
    margin-bottom: 4rem;
}

.client-info h3 {
    margin-bottom: 0.5rem;
}

.client-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.dashboard-nav {
    list-style: none;
}

.dashboard-nav li {
    padding: 1.2rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: all var(--transition-fast);
    border-radius: var(--radius-sm);
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.dashboard-nav li:hover,
.dashboard-nav li.active {
    color: var(--text-main);
    background: var(--bubbly-surface);
}

.dashboard-main {
    flex: 1;
    padding: 4rem 5%;
}

/* Proofs Grid */
.proofs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.proof-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.proof-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-med);
}

.proof-card:hover .proof-thumb {
    transform: scale(1.05);
}

.proof-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.download-link {
    color: white;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill);
    backdrop-filter: blur(5px);
}

.action-group {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Forms */
.admin-form {
    max-width: 600px;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1.2rem;
    background: var(--bg-darker);
    border: 1px solid var(--bubbly-border);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--text-muted);
}

.form-actions {
    margin-top: 3rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    width: 90%;
    max-width: 500px;
    padding: 2rem;
    background: var(--bg-dark);
}

#signature-pad {
    width: 100%;
    height: 200px;
    background: white;
    margin: 1.5rem 0;
    border-radius: var(--radius-sm);
}

.portal-status {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill);
    background: var(--primary-color);
    color: var(--bg-dark);
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
}

/* Login Screen */
.login-screen {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-darker);
}

.login-form {
    width: 100%;
    max-width: 400px;
    padding: 3rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.admin-table th,
.admin-table td {
    padding: 1.2rem;
    text-align: left;
    border-bottom: 1px solid var(--bubbly-border);
}

.admin-table th {
    font-weight: 700;
    color: var(--text-muted);
}

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

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
}

@keyframes zoomIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .admin-dashboard {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--bubbly-border);
    }

    .action-group {
        flex-direction: column;
    }
}