@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Bebas+Neue&display=swap');

/* === RESET Y BASE === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    min-height: 100%;
}

body {
    background-color: #0d0d0d;
    color: #ffffff;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

/* === NAVBAR === */
.navbar {
    background: #111111;
    border-bottom: 1px solid #222222;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.navbar-logo {
    height: 36px;
    display: block;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.navbar-links a {
    color: #cccccc;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    transition: background 0.15s, color 0.15s;
    border-bottom: 2px solid transparent;
}

.navbar-links a:hover {
    background: #1a1a1a;
    color: #ffffff;
}

.navbar-links a.active {
    color: #7ac900;
    border-bottom: 2px solid #7ac900;
}

.navbar-links a.danger {
    color: #e74c3c;
}

.navbar-links a.danger:hover {
    background: rgba(192, 57, 43, 0.15);
    color: #e74c3c;
}

/* === LAYOUT === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.page-content {
    padding: 32px 0;
    padding-top: calc(32px + 64px);
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 24px;
}

/* === CARDS === */
.card {
    background: #1a1a1a;
    border: 1px solid #2e2e2e;
    border-radius: 12px;
    padding: 24px;
}

.card-sm {
    background: #1a1a1a;
    border: 1px solid #2e2e2e;
    border-radius: 12px;
    padding: 16px;
}

.stat-card {
    background: #1a1a1a;
    border: 1px solid #2e2e2e;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.stat-card .stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 8px;
}

.stat-card .stat-label {
    font-size: 13px;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-card .stat-number.green {
    color: #7ac900;
}

.stat-card .stat-number.yellow {
    color: #f39c12;
}

.stat-card .stat-number.red {
    color: #e74c3c;
}

/* === FORMULARIOS === */
.form-card {
    background: #1a1a1a;
    border: 1px solid #2e2e2e;
    border-radius: 12px;
    padding: 24px;
    max-width: 680px;
    margin: 0 auto;
}

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

label {
    display: block;
    font-size: 14px;
    color: #aaaaaa;
    margin-bottom: 6px;
    font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
input[type="number"],
input[type="tel"],
textarea,
select {
    width: 100%;
    background: #0d0d0d;
    border: 1px solid #333333;
    border-radius: 8px;
    color: #ffffff;
    padding: 10px 14px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #7ac900;
    box-shadow: 0 0 0 2px rgba(122, 201, 0, 0.2);
}

input::placeholder,
textarea::placeholder {
    color: #555555;
}

select option {
    background: #1a1a1a;
    color: #ffffff;
}

textarea {
    resize: vertical;
    min-height: 60px;
}

#id_motivo_reparacion {
    min-height: 44px;
    height: 44px;
    resize: none;
    overflow: hidden;
}

/* === BOTONES === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    font-family: inherit;
    line-height: 1;
}

.btn-primary {
    background: #7ac900;
    color: #000000;
}

.btn-primary:hover {
    background: #8fd900;
    color: #000000;
}

.btn-danger {
    background: #c0392b;
    color: #ffffff;
}

.btn-danger:hover {
    background: #e74c3c;
    color: #ffffff;
}

.btn-secondary {
    background: transparent;
    border: 1px solid #333333;
    color: #cccccc;
}

.btn-secondary:hover {
    border-color: #7ac900;
    color: #7ac900;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* === TABLAS === */
table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    background: #111111;
    color: #888888;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #2e2e2e;
    font-weight: 600;
}

tbody td {
    padding: 14px 16px;
    color: #cccccc;
    border-bottom: 1px solid #1e1e1e;
    font-size: 14px;
}

tbody tr:hover {
    background: #1a1a1a;
}

.table-link {
    color: #7ac900;
    text-decoration: none;
}

.table-link:hover {
    text-decoration: underline;
}

/* === BADGES / ETIQUETAS === */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-green {
    background: rgba(122, 201, 0, 0.15);
    color: #7ac900;
}

.badge-yellow {
    background: rgba(243, 156, 18, 0.15);
    color: #f39c12;
}

.badge-red {
    background: rgba(192, 57, 43, 0.15);
    color: #e74c3c;
}

.badge-blue {
    background: rgba(52, 152, 219, 0.15);
    color: #3498db;
}

/* === BUSCADOR === */
.search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    background: #111111;
    border: 1px solid #2e2e2e;
    border-radius: 8px;
    color: #ffffff;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s;
}

.search-input:focus {
    outline: none;
    border-color: #7ac900;
}

.search-input::placeholder {
    color: #555555;
}

/* === MENSAJES === */
.alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: rgba(192, 57, 43, 0.15);
    border: 1px solid #c0392b;
    color: #e74c3c;
}

.alert-success {
    background: rgba(122, 201, 0, 0.15);
    border: 1px solid #7ac900;
    color: #7ac900;
}

/* === LOGIN === */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0d0d0d;
}

.login-card {
    background: #1a1a1a;
    border: 1px solid #2e2e2e;
    border-radius: 16px;
    padding: 48px 40px;
    width: 100%;
    max-width: 400px;
}

.login-logo {
    display: block;
    max-width: 200px;
    margin: 0 auto 32px;
}

/* === PLACA COLOMBIANA === */
.placa-badge {
    display: inline-block;
    background: #f5c518;
    color: #000000;
    font-family: 'Bebas Neue', 'Courier New', monospace;
    font-size: 28px;
    font-weight: 400;
    letter-spacing: 5px;
    text-transform: uppercase;
    padding: 6px 16px 8px;
    border-radius: 6px;
    border: 3px solid #000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    min-width: 160px;
    text-align: center;
}

/* === STATS GRID === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #555555;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state-text {
    font-size: 16px;
}

/* === SWITCH / TOGGLE === */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    margin-left: 8px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333333;
    border-radius: 24px;
    transition: 0.3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    border-radius: 50%;
    transition: 0.3s;
}

input:checked + .slider {
    background-color: #7ac900;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* === AUTOCOMPLETE DROPDOWN === */
#autocomplete-results,
#moto-autocomplete,
#moto-suggestions {
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 8px;
    list-style: none;
    overflow-y: auto;
}

#autocomplete-results li,
#moto-autocomplete li,
#moto-suggestions li {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #2e2e2e;
    font-size: 14px;
    color: #cccccc;
    transition: background 0.15s;
}

#autocomplete-results li:hover,
#moto-autocomplete li:hover,
#moto-suggestions li:hover {
    background: #222222;
}

#autocomplete-results li:last-child,
#moto-autocomplete li:last-child,
#moto-suggestions li:last-child {
    border-bottom: none;
}

.hidden {
    display: none !important;
}

/* === PAGINACION === */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 24px 0 32px;
}

.pagination a {
    padding: 8px 16px;
    background: #1a1a1a;
    border: 1px solid #2e2e2e;
    color: #cccccc;
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
}

.pagination a:hover {
    border-color: #7ac900;
    color: #7ac900;
}

.pagination span {
    color: #888888;
    font-size: 14px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }

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

    .navbar {
        padding: 10px 12px;
    }

    .navbar-links {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        gap: 0;
    }

    .navbar-links a {
        padding: 6px 10px;
        font-size: 13px;
        white-space: nowrap;
    }

    .table-wrapper {
        overflow-x: auto;
    }

    .page-title {
        font-size: 20px;
    }

    .form-card {
        padding: 20px 16px;
    }

    .page-content {
        padding-top: calc(16px + 56px);
    }
}

@media (max-width: 480px) {
    .login-wrapper {
        padding: 16px;
        align-items: flex-start;
        padding-top: 40px;
    }

    .login-card {
        padding: 28px 20px;
        width: 100%;
        max-width: 100%;
        border-radius: 12px;
    }

    .login-logo {
        max-width: 160px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .navbar-links {
        gap: 0;
    }

    .navbar-links a {
        font-size: 12px;
        padding: 5px 8px;
    }

    .btn {
        font-size: 14px;
        padding: 10px 16px;
    }

    .form-card {
        padding: 16px 14px;
    }

    .placa-badge {
        font-size: 22px;
        min-width: 130px;
    }
}
