/* ========================================
   ADMIN - LOGIN SCREEN
   ======================================== */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 400px;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
}

.login-form input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    margin-top: 15px;
    display: none;
}

.error-message.show {
    display: block;
}

.login-info {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background: var(--light-color);
    border-radius: 5px;
}

.back-to-home {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: var(--primary-color);
    font-weight: 600;
}

/* ========================================
   ADMIN - PANEL
   ======================================== */
.admin-panel {
    min-height: 100vh;
    background: #f0f2f5;
}

.admin-header {
    background: var(--dark-color);
    color: white;
    padding: 15px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-logo h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    display: inline;
    margin-right: 15px;
}

.admin-badge {
    background: var(--primary-color);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-logout {
    background: rgba(255,255,255,0.1);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-logout:hover {
    background: var(--primary-color);
}

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    padding: 30px 20px;
}

/* ========================================
   ADMIN - SIDEBAR
   ======================================== */
.admin-sidebar {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 90px;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    margin-bottom: 5px;
    border-radius: 5px;
    color: var(--text-color);
    transition: all 0.3s;
    font-weight: 500;
}

.admin-nav-item:hover {
    background: var(--light-color);
    color: var(--primary-color);
}

.admin-nav-item.active {
    background: var(--primary-color);
    color: white;
}

.admin-nav-item i {
    width: 20px;
}

/* ========================================
   ADMIN - MAIN CONTENT
   ======================================== */
.admin-main {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--shadow);
    min-height: calc(100vh - 120px);
}

.admin-title {
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--dark-color);
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-color);
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

/* ========================================
   ADMIN - STATS
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, #b71c1c 100%);
    color: white;
    padding: 25px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow);
}

.stat-icon {
    font-size: 3rem;
    opacity: 0.3;
}

.stat-info h3 {
    font-size: 2.5rem;
    margin-bottom: 5px;
}

.stat-info p {
    opacity: 0.9;
}

/* ========================================
   ADMIN - RECENT ACTIVITY
   ======================================== */
.recent-activity {
    margin-top: 40px;
}

.recent-activity h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
}

.recent-list {
    display: grid;
    gap: 15px;
}

.recent-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--light-color);
    border-radius: 8px;
    transition: transform 0.3s;
}

.recent-item:hover {
    transform: translateX(5px);
}

.recent-item img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

.recent-item-info h4 {
    margin-bottom: 5px;
    color: var(--dark-color);
}

.recent-item-info p {
    font-size: 0.9rem;
    color: #666;
}

/* ========================================
   ADMIN - FILTERS
   ======================================== */
.admin-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.admin-filters input,
.admin-filters select {
    flex: 1;
    min-width: 200px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
}

/* ========================================
   ADMIN - TABLE
   ======================================== */
.admin-table-wrapper {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.admin-table thead {
    background: var(--dark-color);
    color: white;
}

.admin-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.admin-table th:last-child {
    text-align: center;
}

.admin-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.admin-table td.table-actions {
    text-align: center;
}

.admin-table tbody tr {
    transition: background 0.3s;
}

.admin-table tbody tr:hover {
    background: var(--light-color);
}

.table-car-image {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

.table-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    width: fit-content;
}

.btn-icon {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
}

.btn-edit {
    background: var(--secondary-color);
    color: white;
}

.btn-edit:hover {
    background: #1565c0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-delete {
    background: var(--danger-color);
    color: white;
}

.btn-delete:hover {
    background: #c62828;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* ========================================
   ADMIN - FORM
   ======================================== */
.vehicle-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.vehicle-form .form-group {
    margin-bottom: 20px;
}

.vehicle-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
}

.vehicle-form input,
.vehicle-form select,
.vehicle-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.vehicle-form input:focus,
.vehicle-form select:focus,
.vehicle-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.image-upload-area {
    position: relative;
}

.image-upload-area input[type="file"] {
    display: none;
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    border: 3px dashed var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--light-color);
}

.upload-label:hover {
    border-color: var(--primary-color);
    background: white;
}

.upload-label i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.upload-label span {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.upload-label small {
    color: #666;
}

.image-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.image-preview {
    position: relative;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: move;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.image-preview:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-controls {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 5px;
    flex-direction: column;
}

.image-preview-btn {
    background: rgba(33, 150, 243, 0.9);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 12px;
}

.image-preview-btn:hover:not(:disabled) {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.image-preview-btn:disabled {
    background: rgba(150, 150, 150, 0.5);
    cursor: not-allowed;
}

.image-preview-remove {
    background: rgba(211, 47, 47, 0.9);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.image-preview-remove:hover {
    background: var(--danger-color);
    transform: scale(1.1);
}

.image-preview-number {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.form-actions .btn {
    flex: 1;
}

.form-feedback {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    display: none;
}

.form-feedback.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.form-feedback.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    .admin-container {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
    }

    .admin-nav {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .vehicle-form .form-row {
        grid-template-columns: 1fr;
    }

    .admin-table {
        font-size: 0.9rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 10px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }
}

/* ========================================
   BEFORWARD IMPORT SECTION
   ======================================== */
.beforward-search-box {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.beforward-results {
    margin-top: 30px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
}

.vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.bf-vehicle-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.bf-vehicle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.bf-vehicle-checkbox {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
}

.bf-vehicle-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.bf-vehicle-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.bf-vehicle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bf-vehicle-info {
    padding: 15px;
}

.bf-vehicle-info h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.bf-vehicle-details {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #666;
}

.bf-vehicle-details span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.bf-vehicle-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 10px 0;
}

.bf-vehicle-note {
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
}

.loader {
    text-align: center;
    padding: 40px;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.loader i {
    font-size: 2rem;
    margin-right: 10px;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.1rem;
}

/* ========================================
   MODAL DE CONTACTO
   ======================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 30px;
    border: 1px solid #888;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.modal-content h2 {
    margin-bottom: 20px;
    color: var(--dark-color);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    line-height: 20px;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000;
}

.contact-detail .form-group {
    margin-bottom: 20px;
}

.contact-detail label {
    display: block;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.contact-detail p {
    margin: 0;
    padding: 10px;
    background: var(--light-color);
    border-radius: 5px;
}

.contact-detail .form-control {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

.contact-detail .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* ========================================
   BADGE DE NOTIFICACIONES
   ======================================== */
.badge-count {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-left: 5px;
    display: inline-block;
}

.admin-nav-item {
    position: relative;
}

/* ========================================
   ESTILOS PARA TESTIMONIOS
   ======================================== */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.badge {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-secondary {
    background: #e2e3e5;
    color: #383d41;
}

.form-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.form-container h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
}
