/* ============================================================
   MRB Motors - Admin Panel Styles
   ============================================================ */

.admin-body {
    background: #f0f2f5;
    min-height: 100vh;
}

/* ---- Header ---- */
.admin-header {
    background: #1c1c1c;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.admin-logo {
    display: flex;
    align-items: baseline;
    gap: 6px;
    text-decoration: none;
}

.admin-logo .logo-mark {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    background: #c0392b;
    padding: 2px 10px;
    border-radius: 4px;
}

.admin-logo .logo-text {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

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

.admin-nav a {
    color: #aaa;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color .2s;
}

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

/* ---- Main ---- */
.admin-main {
    padding: 30px 20px;
}

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ---- Title Bar ---- */
.admin-title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.admin-title-bar h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

/* ---- Buttons ---- */
.btn-admin-primary {
    display: inline-block;
    background: #c0392b;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s;
}

.btn-admin-primary:hover {
    background: #96281b;
}

.btn-admin-outline {
    display: inline-block;
    background: transparent;
    color: #333;
    border: 1px solid #ccc;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    transition: all .2s;
}

.btn-admin-outline:hover {
    border-color: #999;
    background: #f9f9f9;
}

.btn-admin-sm {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all .2s;
}

.btn-admin-sm:hover {
    background: #f0f0f0;
}

.btn-admin-danger {
    color: #c0392b;
    border-color: #c0392b;
}

.btn-admin-danger:hover {
    background: #c0392b;
    color: #fff;
}

/* ---- Alerts ---- */
.admin-alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.admin-alert-error {
    background: #fde8e8;
    color: #c0392b;
    border: 1px solid #f5c6cb;
}

.admin-alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* ---- Table ---- */
.admin-table-wrap {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th {
    text-align: left;
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    white-space: nowrap;
}

.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

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

.admin-thumb {
    width: 80px;
    height: 55px;
    object-fit: cover;
    border-radius: 4px;
}

.admin-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eee;
    color: #999;
    font-size: 0.7rem;
}

.admin-td-actions {
    white-space: nowrap;
    display: flex;
    gap: 6px;
    align-items: center;
}

.admin-td-ai {
    font-size: 0.8rem;
    color: #666;
}

/* ---- Badges ---- */
.admin-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #e8f5e9;
    color: #2e7d32;
}

.admin-badge-sold {
    background: #ffebee;
    color: #c62828;
}

.admin-badge-featured {
    background: #fff3e0;
    color: #e65100;
}

/* ---- Login ---- */
.admin-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.admin-login-card {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,.1);
    width: 100%;
    max-width: 400px;
}

.admin-login-logo {
    display: flex;
    align-items: baseline;
    gap: 6px;
    justify-content: center;
    margin-bottom: 10px;
}

.admin-login-logo .logo-mark {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    background: #c0392b;
    padding: 4px 12px;
    border-radius: 4px;
}

.admin-login-logo .logo-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.admin-login-card h1 {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 24px;
    font-weight: 400;
}

.admin-login-card .btn-admin-primary {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    margin-top: 10px;
}

.admin-login-links {
    text-align: center;
    margin-top: 16px;
}

.admin-login-links a {
    color: #888;
    font-size: 0.85rem;
    text-decoration: none;
    transition: color .2s;
}

.admin-login-links a:hover {
    color: #c0392b;
}

/* ---- Form ---- */
.admin-form {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    padding: 30px;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

@media (max-width: 900px) {
    .admin-form-grid {
        grid-template-columns: 1fr;
    }
}

.admin-form-col h2 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

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

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #444;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color .2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192,57,43,.1);
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: #888;
    font-size: 0.8rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    margin-right: 20px;
}

.form-checkbox input {
    width: auto;
}

.admin-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* ---- Image Grid ---- */
.admin-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.admin-image-item {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #eee;
}

.admin-image-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
}

.admin-image-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,.6);
    color: #fff;
    font-size: 0.65rem;
    padding: 2px 6px;
    text-align: center;
}

/* ---- Video List ---- */
.admin-video-list {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-video-item {
    text-align: center;
    font-size: 0.8rem;
    color: #666;
}

.admin-video-item video {
    border-radius: 6px;
    display: block;
    margin-bottom: 4px;
}

/* ---- Status ---- */
.admin-status {
    margin-top: 8px;
    font-size: 0.85rem;
}

.admin-muted {
    color: #999;
    font-size: 0.85rem;
    margin: 8px 0;
}

/* ---- Social Media Content ---- */
.admin-social-content {
    margin-top: 12px;
}

.admin-social-result {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    font-size: 0.9rem;
    line-height: 1.6;
    max-height: 500px;
    overflow-y: auto;
}

.admin-social-result h2,
.admin-social-result h3,
.admin-social-result h4 {
    margin-top: 16px;
    margin-bottom: 8px;
}

.admin-social-result ul {
    padding-left: 20px;
    list-style: disc;
}
