/* Exotic Rajasthan Admin Panel Stylesheet */
:root {
    --primary: #d35400; /* Terracotta Orange */
    --primary-hover: #e67e22;
    --dark: #2c3e50;
    --slate: #34495e;
    --light: #f8f9fa;
    --white: #ffffff;
    --success: #27ae60;
    --info: #2980b9;
    --danger: #c0392b;
    --border: #e2e8f0;
    --text: #2d3748;
    --text-muted: #718096;
    --bg: #f7fafc;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 8px;
    --radius-lg: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: var(--primary-hover);
}

/* Auth Pages */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dark) 0%, #1a252f 100%);
    padding: 20px;
}

.auth-card {
    background-color: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 450px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    font-size: 28px;
    color: var(--dark);
    margin-bottom: 8px;
    font-weight: 700;
}

.auth-header p {
    color: var(--text-muted);
}

/* Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--dark);
    color: var(--white);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-hover);
}

.sidebar-menu {
    list-style: none;
    padding: 20px 10px;
    flex-grow: 1;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #a0aec0;
    border-radius: var(--radius);
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-link:hover, .sidebar-link.active {
    color: var(--white);
    background-color: rgba(255,255,255,0.1);
}

.sidebar-link.active {
    background-color: var(--primary);
    color: var(--white);
}

.sidebar-link svg {
    margin-right: 12px;
    width: 20px;
    height: 20px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.logout-btn {
    width: 100%;
    padding: 10px;
    background-color: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #e2e8f0;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background-color: var(--danger);
    border-color: var(--danger);
    color: var(--white);
}

/* Main Content */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.admin-header {
    background-color: var(--white);
    height: 70px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
}

.admin-header-title {
    font-size: 18px;
    font-weight: 600;
}

.admin-header-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-header-user span {
    font-weight: 500;
}

.content-body {
    padding: 30px;
    flex-grow: 1;
}

/* Alert Notification */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 25px;
    font-weight: 500;
}

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

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Cards & Widgets */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--white);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-info h3 {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.stat-info p {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(211, 84, 0, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

/* Dashboard Panels */
.dashboard-panels {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
}

@media (max-width: 992px) {
    .dashboard-panels {
        grid-template-columns: 1fr;
    }
}

.panel {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 25px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}

.panel-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    gap: 8px;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    color: var(--white);
}

.btn-secondary {
    background-color: var(--white);
    border-color: var(--border);
    color: var(--text);
}

.btn-secondary:hover {
    background-color: var(--light);
}

.btn-danger {
    background-color: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background-color: #a93226;
    color: var(--white);
}

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

/* Tables */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table th {
    background-color: var(--light);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: 15px 18px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 14px;
    vertical-align: middle;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover td {
    background-color: rgba(0,0,0,0.01);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    background-color: var(--white);
    transition: border-color 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

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

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check input {
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

/* SEO Collapsible Section */
.seo-section {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 30px;
    overflow: hidden;
}

.seo-section-header {
    background-color: var(--light);
    padding: 15px 20px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

.seo-section-body {
    padding: 20px;
    border-top: 1px solid var(--border);
}

/* Image Selection Boxes */
.image-selector-box {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    background-color: var(--light);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.image-selector-box:hover {
    border-color: var(--primary);
    background-color: rgba(211, 84, 0, 0.02);
}

.image-selector-preview {
    max-width: 100%;
    max-height: 180px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.image-selector-placeholder {
    color: var(--text-muted);
}

/* Dynamic List / Itinerary Builder */
.itinerary-row {
    background-color: var(--light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
}

.itinerary-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.itinerary-day-label {
    font-weight: 700;
    color: var(--primary);
}

/* Media Library Grid */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.media-item {
    aspect-ratio: 1;
    border: 2px solid transparent;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    box-shadow: var(--shadow);
    background-color: #ddd;
}

.media-item img {
    width: 100%;
    height: 100%;
    object-cover: cover;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.media-item:hover img {
    transform: scale(1.05);
}

.media-item.selected {
    border-color: var(--primary);
}

.media-item.selected::after {
    content: "✓";
    position: absolute;
    top: 5px;
    right: 5px;
    width: 22px;
    height: 22px;
    background-color: var(--primary);
    color: var(--white);
    font-size: 12px;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* WordPress-style Modal Popup */
.media-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.media-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.media-modal-container {
    background-color: var(--white);
    width: 90%;
    max-width: 1100px;
    height: 85%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.media-modal-header {
    padding: 15px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.media-modal-tabs {
    display: flex;
    gap: 15px;
}

.media-modal-tab {
    padding: 8px 16px;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius);
    color: var(--text-muted);
}

.media-modal-tab.active {
    color: var(--primary);
    background-color: rgba(211, 84, 0, 0.08);
}

.media-modal-body {
    flex-grow: 1;
    display: flex;
    overflow: hidden;
}

.media-modal-library-panel {
    flex-grow: 1;
    padding: 0; /* Remove padding so sidebar borders line up nicely */
    overflow: hidden; /* Prevent double scrollbars */
}

.media-modal-sidebar {
    width: 320px;
    flex-shrink: 0; /* Prevent squishing of details panel */
    border-left: 1px solid var(--border);
    background-color: var(--light);
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.media-modal-footer {
    padding: 15px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
}

.media-modal-upload-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 50px;
    height: 100%;
    width: 100%;
}

.drag-drop-zone {
    border: 3px dashed var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drag-drop-zone:hover {
    border-color: var(--primary);
    background-color: rgba(211, 84, 0, 0.02);
}

/* Badge tags */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge-pending { background-color: #fef3c7; color: #d97706; }
.badge-read { background-color: #e0f2fe; color: #0284c7; }
.badge-replied { background-color: #dcfce7; color: #15803d; }

/* Small multi-image thumbnails in forms */
.thumbnails-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.thumbnail-preview-item {
    aspect-ratio: 1;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border);
    position: relative;
}

.thumbnail-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-preview-item .remove-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: rgba(192, 57, 43, 0.85);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.thumbnail-preview-item .remove-btn:hover {
    background-color: var(--danger);
}
