/* =========================================================================
   Dashboard Specific Styles (Painel e Admin)
   ========================================================================= */

body.dashboard-body {
    background-color: #f0f2f5; /* Light grey from the new login image */
}

/* =========================================================================
   Auth Pages (Login Split Layout)
   ========================================================================= */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    padding: 40px 20px;
}

.auth-split-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 1000px;
    display: flex;
    overflow: hidden;
    min-height: 550px;
}

.auth-image-side {
    flex: 1;
    display: none; /* hidden on mobile */
    background-color: #f7184a;
}

.auth-image-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-form-side {
    flex: 1;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-form-side h2 {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-color);
    margin-bottom: 5px;
}

.auth-form-side h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 40px;
}

.auth-form-side .form-control {
    margin-bottom: 20px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 15px;
}

.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.85rem;
}

.auth-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-light);
}

.auth-form-side .btn {
    width: 100%;
    padding: 16px;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.auth-forgot {
    font-size: 0.85rem;
    color: var(--text-light);
    display: inline-block;
}
.auth-forgot:hover {
    color: var(--primary-color);
    text-decoration: underline;
}


/* Pricing Plans */
.pricing-section {
    padding: 60px 0;
    text-align: center;
}

.pricing-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
}

.pricing-tabs .btn {
    min-width: 180px;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 4px;
    background-color: #e2e8f0;
    color: #4a5568;
}

.pricing-tabs .btn.active {
    background-color: var(--primary-color);
    color: white;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.pricing-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    position: relative;
    border: 1px solid var(--border-color);
}

.pricing-header {
    background-color: #242933;
    padding: 20px;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
}

.pricing-popular {
    position: absolute;
    top: 25px;
    right: -35px;
    background-color: var(--primary-color);
    color: white;
    padding: 5px 40px;
    font-size: 0.8rem;
    font-weight: bold;
    transform: rotate(45deg);
}

.pricing-body {
    padding: 40px 30px;
}

.pricing-price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-color);
    line-height: 1;
    margin-bottom: 10px;
}

.pricing-subtitle {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

.pricing-features {
    text-align: left;
    margin-bottom: 40px;
}

.pricing-features li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
}

.pricing-features i {
    color: var(--text-light);
}

.pricing-card .btn {
    width: 100%;
}

/* =========================================================================
   Seller Dashboard Structure
   ========================================================================= */
.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 80px);
}

/* Desktop Sidebar */
.dash-sidebar {
    width: 250px;
    background-color: #242933; /* Dark sidebar */
    color: white;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.dash-profile {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.dash-profile img {
    margin: 0 auto 15px;
    border-radius: 4px;
    width: 120px;
    height: 120px;
    object-fit: cover;
}

.dash-profile h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.dash-profile p {
    font-size: 0.8rem;
    color: #a0aec0;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
}

.dash-profile i {
    color: var(--primary-color);
    width: 15px;
}

.dash-actions {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dash-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-white {
    background-color: white;
    color: var(--text-color);
}
.btn-red {
    background-color: var(--primary-color);
    color: white;
}
.btn-dark {
    background-color: #374151;
    color: white;
}

/* Main Area */
.dash-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-white);
}

.dash-header-menu {
    background-color: #f8fafc;
    border-bottom: 1px solid var(--border-color);
}

.dash-menu-list {
    display: flex;
    background-color: #1a202c; /* The dark top menubar */
}

.dash-menu-list li {
    flex: 1;
}

.dash-menu-list a {
    display: block;
    padding: 15px;
    color: white;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    border-right: 1px solid rgba(255,255,255,0.05);
}

.dash-menu-list a:hover {
    background-color: rgba(255,255,255,0.1);
}

.dash-menu-list a.active-tab {
    background-color: #2d3748; /* Active tab lighter */
    color: var(--primary-color);
}

.dash-content {
    padding: 30px;
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    color: white;
}

.stat-card.red {
    background-color: var(--primary-color);
}

.stat-card.dark {
    background-color: #1a202c;
}

.stat-card h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: 800;
}

/* My Vehicles List */
.my-vehicles-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.my-vehicle-item {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.my-vehicle-img {
    width: 200px;
    height: 140px;
    border-radius: var(--border-radius-sm);
    object-fit: cover;
}

.my-vehicle-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toggle-switch-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Base styling for iOS style toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: var(--primary-color);
}
input:checked + .slider:before {
  transform: translateX(26px);
}

.my-vehicle-title {
    font-size: 1.4rem;
    color: var(--text-color);
}

.my-vehicle-price {
    color: var(--text-light);
    font-size: 0.95rem;
}
.my-vehicle-price span {
    font-weight: bold;
    color: var(--text-color);
}

.my-vehicle-actions {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

/* =========================================================================
   Admin Panel (Users List)
   ========================================================================= */
.admin-table-container {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

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

.admin-table th, .admin-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.9rem;
}

.admin-table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #4a5568;
}

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

.user-cell {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background-color: #e2e8f0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a0aec0;
}

.user-name {
    font-weight: 600;
    color: #2b6cb0; /* WordPress link blue color */
}

.admin-actions {
    font-size: 0.8rem;
    margin-top: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.admin-table tr:hover .admin-actions {
    opacity: 1;
}

.admin-actions a {
    color: #2b6cb0;
}
.admin-actions a:hover {
    text-decoration: underline;
}
.admin-actions .text-danger {
    color: #e53e3e;
}

.btn-toggle-status {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background-color: white;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 500;
}

.btn-toggle-status:hover {
    background-color: #f1f5f9;
}

/* =========================================================================
   Forms: Criar Anuncio Layout
   ========================================================================= */
.dash-form-wrapper {
    background-color: #f8fafc;
    padding: 5px;
}

.form-section {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
}

.form-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #edf2f7;
}

.form-section-title span {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-light);
    display: block;
    margin-top: 5px;
}

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

.dash-form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: #2d3748;
}

.dash-form-group .form-control {
    background-color: #f8fafc;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Grids line */
.form-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Checkboxes massive list container */
.check-list-grid {
    column-count: 3;
    column-gap: 30px;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #4a5568;
    break-inside: avoid;
    padding: 4px 0;
}

.check-item input[type="checkbox"], 
.check-item input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

/* Add custom box for file uploads */
.file-upload-box {
    border: 2px dashed #cbd5e0;
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    transition: var(--transition);
    background-color: #f8fafc;
    cursor: pointer;
}

.file-upload-box:hover {
    border-color: var(--primary-color);
    background-color: rgba(247, 24, 74, 0.02);
}

.file-upload-box i {
    font-size: 2rem;
    color: #a0aec0;
    margin-bottom: 10px;
}

.file-upload-box h5 {
    font-size: 1rem;
    color: #4a5568;
    margin-bottom: 5px;
}

.file-upload-box span {
    font-size: 0.8rem;
    color: var(--text-light);
}

.upload-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Actions footer */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Responsiveness overrides */
@media (min-width: 768px) {
    .auth-image-side {
        display: block;
    }
}

@media (max-width: 992px) {
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-layout {
        flex-direction: column;
    }
    
    .dash-sidebar {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 10px 20px;
    }

    .dash-profile {
        padding: 0;
        border: none;
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .dash-profile img {
        width: 50px;
        height: 50px;
        margin: 0;
    }

    .dash-profile p {
        display: none;
    }

    .dash-actions {
        flex-direction: row;
        padding: 0;
    }
    
    .dash-menu-list {
        flex-wrap: wrap;
    }
    
    .dash-menu-list li {
        flex: 1 1 50%;
    }

    .form-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .check-list-grid {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    .stats-row {
        grid-template-columns: 1fr;
    }
    .my-vehicle-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .my-vehicle-img {
        width: 100%;
        height: 200px;
    }
    .admin-table-container {
        overflow-x: auto;
    }
    .auth-form-side {
        padding: 40px 30px;
    }
    .form-grid-4, .form-grid-2, .upload-grid {
        grid-template-columns: 1fr;
    }
    .check-list-grid {
        column-count: 1;
    }
    .form-section {
        padding: 20px;
    }
}
