/* =================================
   AUTH PAGES STYLES - LEMBREI
   Estilos para login.php, admin-login.php, admin-panel.php
   ================================= */

/* Common Login Container Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    padding: 20px;
}

/* Ensure proper spacing and visibility for admin login */
body.admin-login .login-container {
    padding: 40px 20px;
    min-height: calc(100vh - 40px);
}

/* Add space at bottom for mobile devices */
@media (max-height: 700px) {
    body.admin-login .login-container {
        align-items: flex-start;
        padding-top: 20px;
        padding-bottom: 40px;
    }
}

.login-card {
    background: #333333;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    border: 1px solid #555555;
}

/* Admin login card has yellow border to match main site palette */
.admin-login .login-card {
    border: 2px solid #FFDA61;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-title {
    font-size: 2rem;
    font-weight: bold;
    color: #FFFFFF;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-subtitle {
    color: #CCCCCC;
    margin-top: 8px;
    font-size: 0.9rem;
}

.login-icon {
    color: #FFDA61;
    font-size: 2rem;
}

.admin-icon {
    color: #FFDA61;
    font-size: 2rem;
}

/* Admin Badge */
.admin-badge {
    background: #A52A2A;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 10px;
    display: inline-block;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #FFFFFF;
}

.form-input, .form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #555555;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.15s ease-in-out;
    box-sizing: border-box;
    background: #000000;
    color: #FFFFFF;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #FFDA61;
    box-shadow: 0 0 0 3px rgba(255, 218, 97, 0.1);
}

/* Admin login focus uses yellow color to match main site palette */
.admin-login .form-input:focus, .admin-login .form-select:focus {
    border-color: #FFDA61;
    box-shadow: 0 0 0 3px rgba(255, 218, 97, 0.1);
}

.form-input::placeholder {
    color: #999999;
}

/* Button Styles */
.btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.btn-login {
    width: 100%;
    background: #FFDA61;
    color: #000000;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    margin-bottom: 20px;
}

.btn-login:hover {
    background: #EAB308;
    transform: translateY(-1px);
}

.btn-admin-login {
    width: 100%;
    background: #A52A2A;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    margin-bottom: 20px;
}

.btn-admin-login:hover {
    background: #8B0000;
    transform: translateY(-1px);
}

.btn-login:disabled, .btn-admin-login:disabled {
    background: #666666;
    color: #999999;
    cursor: not-allowed;
}

.btn-primary {
    background: #FFDA61;
    color: #000000;
}

.btn-primary:hover {
    background: #EAB308;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #666666;
    color: white;
}

.btn-secondary:hover {
    background: #555555;
}

.btn-danger {
    background: #A52A2A;
    color: white;
}

.btn-danger:hover {
    background: #8B0000;
}

.btn-warning {
    background: #FFDA61;
    color: #000000;
}

.btn-warning:hover {
    background: #EAB308;
}

/* Message Styles */
.error-message, .warning-info, .credentials-hint {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.error-message {
    background: rgba(165, 42, 42, 0.1);
    border: 1px solid #A52A2A;
    color: #FF6B6B;
}

.warning-info {
    background: rgba(255, 218, 97, 0.1);
    border: 1px solid #FFDA61;
    color: #FFDA61;
}

.credentials-hint {
    background: rgba(165, 42, 42, 0.1);
    border: 1px solid #A52A2A;
    color: #CCCCCC;
    font-size: 0.85rem;
}

.credentials-hint code {
    background: #000000;
    color: #FFDA61;
    padding: 2px 4px;
    border-radius: 4px;
    font-family: monospace;
}

/* Link Styles */
.admin-link, .back-link {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #555555;
    margin-top: 20px;
}

.admin-link a {
    color: #A52A2A;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.admin-link a:hover {
    text-decoration: underline;
    color: #FF6B6B;
}

.back-link a {
    color: #CCCCCC;
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link a:hover {
    text-decoration: underline;
    color: #FFFFFF;
}

/* =================================
   ADMIN PANEL STYLES
   ================================= */

/* Override body styles for admin pages to enable scrolling */
body:has(.admin-container), 
body.admin-page {
    overflow: auto !important;
    height: auto !important;
    min-height: 100vh;
}

/* Allow scrolling for login pages when content overflows */
body.admin-login {
    overflow: auto !important;
    min-height: 100vh !important;
    scroll-behavior: smooth;
}

/* Ensure login container can scroll when needed */
body.admin-login .login-container {
    flex-shrink: 0;
}

.admin-container {
    min-height: 100vh;
    background: #000000;
    padding: 20px;
    overflow-y: auto;
}

.admin-header {
    background: #333333;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #555555;
}

.admin-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #FFFFFF;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-title i {
    color: #FFDA61;
}

.admin-actions {
    display: flex;
    gap: 12px;
}

.admin-card {
    background: #333333;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #555555;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #FFFFFF;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title i {
    color: #FFDA61;
}

/* Form Row Layout */
.form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: end;
}

.form-group {
    flex: 1;
}

.admin-card .form-label {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.admin-card .form-input, .admin-card .form-select {
    padding: 8px 12px;
    font-size: 0.9rem;
    border: 1px solid #555555;
}

/* Table Styles */
.users-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.users-table th,
.users-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #555555;
}

.users-table th {
    background: #000000;
    font-weight: 600;
    color: #FFFFFF;
    font-size: 0.9rem;
}

.users-table td {
    font-size: 0.9rem;
    color: #CCCCCC;
}

/* Badge Styles */
.user-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-master {
    background: rgba(165, 42, 42, 0.2);
    color: #A52A2A;
}

.badge-normal {
    background: rgba(255, 218, 97, 0.2);
    color: #FFDA61;
}

/* Status Colors */
.status-active {
    color: #4ADE80;
}

.status-inactive {
    color: #FF6B6B;
}

/* Actions */
.actions-cell {
    white-space: nowrap;
}

.actions-cell button {
    margin-right: 4px;
    padding: 4px 8px;
    font-size: 0.8rem;
}

/* Message Types */
.message {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.message-success {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid #4ADE80;
    color: #4ADE80;
}

.message-error {
    background: rgba(165, 42, 42, 0.1);
    border: 1px solid #A52A2A;
    color: #FF6B6B;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: #333333;
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    border: 1px solid #555555;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #FFFFFF;
}

.close {
    color: #CCCCCC;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #FFFFFF;
}

/* Welcome Info */
.welcome-info {
    background: rgba(255, 218, 97, 0.1);
    border: 1px solid #FFDA61;
    color: #FFDA61;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* Responsive Design */
/* Mobile login improvements */
@media (max-width: 768px) {
    body.admin-login .login-container {
        padding: 20px 15px;
        align-items: flex-start;
        padding-top: 30px;
    }
    
    body.admin-login .login-card {
        margin: 0 auto;
        max-width: 100%;
        width: 100%;
    }
}

/* Responsive improvements and scrolling fixes */
@media (max-width: 768px) {
    body.admin-page {
        padding: 0 !important;
    }
    
    .admin-container {
        padding: 10px;
        min-height: 100vh;
    }
    
    .form-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 15px;
    }
    
    .admin-actions {
        justify-content: center;
    }
    
    .users-table {
        font-size: 0.8rem;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .actions-cell {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    
    .actions-cell button {
        margin: 0;
        width: 100%;
    }
}

/* Smooth scrolling for better UX */
.admin-container {
    scroll-behavior: smooth;
}

/* Ensure proper spacing at bottom */
.admin-container::after {
    content: '';
    display: block;
    height: 20px;
} 