/* =============================================================================
   AUTH PAGES STYLES
   Login, verification, and authentication UI
   ============================================================================= */

.auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 10;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 420px;
    width: 100%;
    text-align: center;
}

.auth-logo {
    margin-bottom: 24px;
}

.auth-logo img {
    max-width: 200px;
    height: auto;
}

.auth-title {
    font-size: 28px;
    color: #333;
    margin: 0 0 24px 0;
    font-weight: 600;
}

.auth-description {
    color: #666;
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 24px;
}

.auth-note {
    color: #888;
    font-size: 13px;
    margin-top: 16px;
}

.auth-form {
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #444;
    margin-bottom: 8px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-group input::placeholder {
    color: #aaa;
}

.auth-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, #0066cc, #0052a3);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-btn-secondary {
    width: 100%;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    background: transparent;
    color: #0066cc;
    border: 2px solid #0066cc;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    margin-top: 16px;
}

.auth-btn-secondary:hover {
    background: #0066cc;
    color: white;
}

.auth-error {
    background: #fee;
    color: #c00;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 16px;
    display: none;
}

.auth-error.visible {
    display: block;
}

.auth-success-icon {
    color: #00aa55;
    margin-bottom: 16px;
}

.auth-loading {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #eee;
    border-top-color: #0066cc;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.auth-footer {
    margin-top: 32px;
    opacity: 0.7;
}

.auth-footer img {
    max-width: 120px;
    height: auto;
}

/* Admin Page Styles */
.admin-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 10;
    overflow: hidden;
}

.admin-header {
    background: rgba(255, 255, 255, 0.95);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.admin-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-header-logo img {
    height: 40px;
}

.admin-header-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-user-info {
    font-size: 14px;
    color: #666;
}

.admin-user-info strong {
    color: #333;
}

.admin-nav {
    background: rgba(0, 0, 0, 0.8);
    padding: 0 24px;
}

.admin-nav-tabs {
    display: flex;
    gap: 4px;
}

.admin-nav-tab {
    padding: 12px 24px;
    color: #aaa;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.admin-nav-tab:hover {
    color: #fff;
}

.admin-nav-tab.active {
    color: #fff;
    border-bottom-color: #0066cc;
}

.admin-content {
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
    flex: 1;
    overflow-y: auto;
}

.admin-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.admin-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.admin-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.admin-table-wrapper {
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 8px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead th {
    position: sticky;
    top: 0;
    background: #f8f8f8;
    z-index: 1;
}

.admin-table th,
.admin-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    font-weight: 600;
    color: #666;
    font-size: 13px;
    text-transform: uppercase;
}

.admin-table td {
    color: #333;
    font-size: 14px;
}

.admin-table tr:hover {
    background: #f9f9f9;
}

.role-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.role-badge.admin {
    background: #ffe0e0;
    color: #c00;
}

.role-badge.editor {
    background: #e0f0ff;
    color: #0066cc;
}

.role-badge.viewer {
    background: #e8e8e8;
    color: #666;
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.btn-small:hover {
    opacity: 0.8;
}

.btn-edit {
    background: #0066cc;
    color: white;
}

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

.btn-primary {
    background: linear-gradient(135deg, #0066cc, #0052a3);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

/* Personas List Container */
#personasList {
    max-height: calc(100vh - 320px);
    overflow-y: auto;
    padding-right: 8px;
}

/* Persona Enhancement Card */
.persona-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: background 0.2s;
}

.persona-card:hover {
    background: #f0f0f0;
}

.persona-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.persona-info {
    flex: 1;
}

.persona-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.persona-meta {
    font-size: 13px;
    color: #666;
}

.persona-actions {
    display: flex;
    gap: 8px;
}

.enhancement-badge {
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 6px;
}

.enhancement-badge.applied {
    background: #28a745;
}

.enhancement-badge.pending {
    background: #ff9800;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.2s;
}

.modal-overlay.visible .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-card {
        padding: 24px;
    }

    .admin-header {
        flex-direction: column;
        gap: 12px;
    }

    .admin-nav-tabs {
        overflow-x: auto;
    }

    .admin-section {
        padding: 16px;
    }

    .admin-table {
        font-size: 13px;
    }

    .admin-table th,
    .admin-table td {
        padding: 8px;
    }
}
