/* 
    Admin Stylesheet for STTP - Press Registration System
    Created for São João 2025 - Campina Grande
*/

/* ---------- Admin General Styles ---------- */
.admin-body {
    background-color: #f5f7fa;
    min-height: 100vh;
}

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Admin Header ---------- */
.admin-header {
    background-color: var(--white);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin: 20px 0;
}

.admin-header .logo {
    margin-bottom: 0;
    flex: 0 0 150px;
}

.admin-header .logo img {
    max-width: 150px;
}

.header-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    font-size: 22px;
    color: var(--gray-800);
    margin: 0;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 500;
}

.admin-user span {
    color: var(--gray-700);
}

/* ---------- Admin Main ---------- */
.admin-main {
    margin-bottom: 30px;
}

.admin-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.admin-card-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-300);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.admin-card-header h2 {
    margin: 0;
    font-size: 20px;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ---------- Admin Stats ---------- */
.admin-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--gray-100);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* ---------- Admin Filters ---------- */
.admin-filters {
    padding: 20px;
    border-bottom: 1px solid var(--gray-300);
}

.filter-form {
    margin: 0;
}

.search-group {
    display: flex;
    gap: 10px;
}

.search-group input {
    flex: 1;
}

/* ---------- Admin Table ---------- */
.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--gray-300);
}

.admin-table th {
    background-color: var(--gray-100);
    font-weight: 500;
    color: var(--gray-800);
    position: sticky;
    top: 0;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover {
    background-color: var(--gray-100);
}

.admin-table a {
    color: var(--primary-color);
    text-decoration: none;
}

.admin-table a:hover {
    text-decoration: underline;
}

/* ---------- Status Badges ---------- */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-approved {
    background-color: #d4edda;
    color: #155724;
}

.status-rejected {
    background-color: #f8d7da;
    color: #721c24;
}

.status-delivered {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* ---------- Action Buttons ---------- */
.actions-cell {
    white-space: nowrap;
}

.action-buttons {
    display: flex;
    gap: 5px;
}

.action-form {
    margin: 0;
}

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.pagination ul {
    display: flex;
    list-style: none;
    gap: 5px;
    margin: 0;
    padding: 0;
}

.pagination li {
    margin: 0;
}

.pagination li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--white);
    color: var(--gray-700);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--gray-300);
}

.pagination li.active a {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.pagination li a:hover {
    background-color: var(--gray-200);
}

.pagination li.active a:hover {
    background-color: var(--primary-color-dark);
}

/* ---------- Admin Login ---------- */
.admin-login-body {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-login-container {
    width: 100%;
    max-width: 420px;
}

.admin-login-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: center;
    margin-bottom: 20px;
}

.admin-login-logo {
    margin-bottom: 20px;
}

.admin-login-logo img {
    max-width: 180px;
}

.admin-login-card h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.admin-login-card p {
    color: var(--gray-600);
    margin-bottom: 30px;
}

.password-input {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--gray-600);
}

.admin-login-footer {
    margin-top: 25px;
}

.return-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.return-link:hover {
    text-decoration: underline;
}

.admin-login-info {
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    font-size: 14px;
}

.admin-login-info p {
    margin-bottom: 10px;
}

/* ---------- Modal ---------- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
}

.modal-content {
    background-color: var(--white);
    margin: 50px auto;
    width: 90%;
    max-width: 800px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    animation: modalopen 0.3s ease;
}

@keyframes modalopen {
    from {opacity: 0; transform: translateY(-20px);}
    to {opacity: 1; transform: translateY(0);}
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--gray-300);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close {
    color: var(--gray-500);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: var(--gray-900);
}

.modal-body {
    padding: 20px;
}

/* ---------- Registration Details ---------- */
.registration-details {
    position: relative;
}

.detail-status {
    position: absolute;
    top: 0;
    right: 0;
}

.detail-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-300);
}

.detail-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.detail-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-row {
    display: flex;
    margin-bottom: 10px;
}

.detail-row:last-child {
    margin-bottom: 0;
}

.detail-label {
    width: 180px;
    font-weight: 500;
    color: var(--gray-700);
}

.detail-value {
    flex: 1;
}

.detail-value code {
    background-color: var(--gray-200);
    color: var(--gray-800);
    font-family: monospace;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 14px;
}

.detail-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: center;
}

.text-success {
    color: var(--success-color);
}

.text-danger {
    color: var(--danger-color);
}

.text-warning {
    color: var(--warning-color);
}

.text-info {
    color: var(--info-color);
}

.text-muted {
    color: var(--gray-600);
}

.text-center {
    text-align: center;
}

/* ---------- Admin Footer ---------- */
.admin-footer {
    text-align: center;
    padding: 20px 0;
    color: var(--gray-600);
    font-size: 14px;
}

/* ---------- Admin Responsive ---------- */
@media (max-width: 768px) {
    .admin-container {
        padding: 0 15px;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
        padding: 15px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .admin-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .admin-stats {
        width: 100%;
        justify-content: space-between;
    }
    
    .stat {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 10px;
    }
    
    .search-group {
        flex-direction: column;
    }
    
    .detail-row {
        flex-direction: column;
    }
    
    .detail-label {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .detail-actions {
        flex-direction: column;
    }
    
    .modal-content {
        margin: 10px;
        width: calc(100% - 20px);
    }
}