/* ========================================
   Opol Tourism Custom Styles
   Design System: Red + White
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,700;1,500&display=swap');

:root {
    --red:          #b91c1c;
    --red-dark:     #7f1d1d;
    --red-mid:      #dc2626;
    --red-light:    #fef2f2;
    --red-glow:     rgba(185,28,28,0.12);

    /* Keep coral/teal for tourist-facing UI only */
    --coral:        #e85d4f;
    --coral-dark:   #c73e2f;
    --coral-glow:   rgba(232,93,79,.15);
    --teal:         #2d6a4f;
    --teal-light:   #40916c;
    --teal-dark:    #1a4a35;

    --warm-white:   #fefcf8;
    --sand:         #f5f5f5;
    --ink:          #18181b;
    --ink-2:        #52525b;
    --ink-3:        #a1a1aa;
    --border:       #eeeeee;
    --success:      #16a34a;
    --amber:        #d97706;
    --blue:         #2563eb;
    --white:        #ffffff;

    /* Bootstrap overrides */
    --primary-color:   var(--red);
    --secondary-color: var(--ink-3);
    --success-color:   var(--success);
    --danger-color:    var(--red);
}

/* ========== Base ========== */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Outfit', 'Segoe UI', sans-serif;
    background-color: var(--sand);
    color: var(--ink);
}

/* ══════════════════════════════════════════════════════════════
   SIDEBAR — red gradient, consistent across ALL admin pages
   ══════════════════════════════════════════════════════════════ */
.sidebar {
    min-height: 100vh;
    background: linear-gradient(175deg, #7f1d1d 0%, #b91c1c 55%, #991b1b 100%);
    color: white;
    padding: 20px 12px;
    position: fixed;
    width: 250px;
    box-shadow: 4px 0 20px rgba(127,29,29,0.22);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar h5 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    color: #fff;
}

.sidebar small,
.sidebar .text-white-50 {
    color: rgba(255,255,255,0.5) !important;
}

.sidebar hr {
    border-color: rgba(255,255,255,0.15);
    opacity: 1;
}

/* Nav links */
.sidebar .nav-link {
    color: rgba(255,255,255,0.78);
    padding: 9px 14px;
    margin: 2px 0;
    border-radius: 10px;
    transition: background 0.15s, color 0.15s, transform 0.15s;
    font-size: 0.86rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar .nav-link i,
.sidebar .nav-link .bi {
    font-size: 1rem;
    opacity: 0.82;
    flex-shrink: 0;
}

.sidebar .nav-link:hover {
    background: rgba(255,255,255,0.14);
    color: #ffffff;
    transform: translateX(3px);
}

.sidebar .nav-link.active {
    background: rgba(255,255,255,0.22);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.14);
}

.sidebar .nav-link.active i,
.sidebar .nav-link.active .bi {
    opacity: 1;
}

/* Badge in sidebar */
.sidebar .badge.bg-warning {
    background: #f59e0b !important;
    color: #1a1a1a !important;
    font-size: 0.66rem;
}

/* Scrollbar inside sidebar */
.sidebar::-webkit-scrollbar       { width: 3px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 4px; }

/* ========== Main Content ========== */
.main-content {
    margin-left: 250px;
    padding: 24px;
    min-height: 100vh;
    background-color: var(--sand);
}

/* ========== Page Header ========== */
.page-header {
    margin-bottom: 24px;
}

.page-header h1,
.page-header h2,
.page-header h3 {
    font-family: 'Playfair Display', serif;
    color: var(--ink);
    font-weight: 700;
}

.page-header p {
    color: var(--ink-3);
    font-size: 0.9rem;
}

/* ========== Cards ========== */
.card {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--white);
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

.card-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    border-radius: 16px 16px 0 0 !important;
    padding: 16px 20px;
    font-weight: 700;
    color: var(--ink);
}

.stat-card {
    background: var(--white);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.stat-card .icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-card .icon.red     { background: var(--red-light);             color: var(--red); }
.stat-card .icon.coral   { background: var(--coral-glow);            color: var(--coral); }
.stat-card .icon.teal    { background: rgba(45,106,79,.12);          color: var(--teal); }
.stat-card .icon.sand    { background: #f0f0f0;                      color: var(--ink-2); }
.stat-card .icon.success { background: rgba(22,163,74,.1);           color: var(--success); }
.stat-card .icon.amber   { background: rgba(217,119,6,.1);           color: var(--amber); }
.stat-card .icon.blue    { background: rgba(37,99,235,.08);          color: var(--blue); }

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1;
    letter-spacing: -0.4px;
}

.stat-card .stat-label {
    font-size: 0.75rem;
    color: var(--ink-3);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========== Tourist Spot Cards ========== */
.tourist-spot-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
    transition: all 0.22s ease;
    height: 100%;
}

.tourist-spot-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transform: translateY(-4px);
}

.spot-image {
    height: 200px;
    background: linear-gradient(135deg, var(--red-dark) 0%, var(--red) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
}

/* ========== Buttons ========== */
.btn-primary {
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    border-color: var(--red);
    color: white;
    font-weight: 600;
    border-radius: 10px;
    padding: 8px 18px;
    transition: all 0.18s ease;
    box-shadow: 0 3px 10px rgba(185,28,28,0.25);
}

.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, var(--red-mid) 0%, var(--red) 100%);
    border-color: var(--red-mid);
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(185,28,28,0.35);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    border-color: var(--red);
    font-weight: 600;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(185,28,28,0.25);
}

.btn-danger:hover {
    background: linear-gradient(135deg, var(--red-dark) 0%, #5a0e0e 100%);
    transform: translateY(-1px);
}

.btn-outline-primary {
    border-color: var(--red);
    color: var(--red);
    font-weight: 600;
    border-radius: 10px;
}

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

.btn-outline-danger {
    border-color: var(--red);
    color: var(--red);
    font-weight: 600;
    border-radius: 10px;
}

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

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #0d7a3e 100%);
    border-color: var(--success);
    font-weight: 600;
    border-radius: 10px;
}

/* ========== Tables ========== */
.table { color: var(--ink); }

.table thead th {
    background: #f8f8f8;
    color: var(--ink-2);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
    padding: 12px 16px;
}

.table tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    border-color: var(--border);
    font-size: 0.88rem;
    color: var(--ink);
}

.table tbody tr:hover { background: var(--red-light); }

.table-striped tbody tr:nth-of-type(odd) { background: rgba(0,0,0,0.015); }

/* ========== Badges ========== */
.badge {
    font-weight: 600;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.72rem;
}

.badge.bg-primary   { background: var(--red)     !important; }
.badge.bg-danger    { background: var(--red)      !important; }
.badge.bg-success   { background: var(--success)  !important; }
.badge.bg-warning   { background: #f59e0b         !important; color: white !important; }
.badge.bg-secondary { background: var(--ink-3)    !important; }

.badge-status         { position: absolute; top: 10px; right: 10px; z-index: 1; }
.notification-badge   { position: absolute; top: -5px; right: -5px; background: var(--red); color: white; border-radius: 50%; padding: 2px 6px; font-size: 10px; }

.service-location-badge {
    display: inline-block;
    padding: 4px 10px;
    margin: 2px;
    background: var(--red-light);
    border: 1px solid var(--red);
    border-radius: 999px;
    font-size: 0.78rem;
    color: var(--red);
    font-weight: 600;
}

.pending-approval-badge {
    background: #fffbeb;
    border: 2px dashed #f59e0b;
    padding: 10px;
    border-radius: 10px;
    margin-top: 10px;
}

/* ========== Forms ========== */
.form-control, .form-select {
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.88rem;
    color: var(--ink);
    background: var(--white);
    padding: 9px 14px;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px var(--red-glow);
    outline: none;
}

.form-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ink-2);
    margin-bottom: 5px;
}

.input-group-text {
    background: #f8f8f8;
    border: 1.5px solid var(--border);
    color: var(--ink-3);
    border-radius: 10px;
}

/* ========== Widgets ========== */
.weather-widget {
    background: linear-gradient(135deg, var(--red-dark) 0%, var(--red) 100%);
    color: white;
    border-radius: 16px;
    padding: 20px;
}

.qr-scanner-container {
    max-width: 400px;
    margin: 0 auto;
    background: var(--white);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--border);
}

#qr-reader { border: 2px solid var(--red); border-radius: 10px; }

.demo-credentials {
    background: #fffbeb;
    border: 2px solid #f59e0b;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

/* ========== Progress ========== */
.completion-progress {
    background: var(--white);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.progress {
    height: 8px;
    border-radius: 999px;
    background: var(--border);
}

.progress-bar {
    background: linear-gradient(90deg, var(--red-dark), var(--red-mid));
    border-radius: 999px;
}

.progress-bar-custom {
    height: 28px;
    border-radius: 14px;
    background: linear-gradient(90deg, var(--red-dark), var(--red-mid));
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

/* ========== Map ========== */
.map-container {
    height: 500px;
    background: #f0f0f0;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
}

#interactiveMap {
    height: 450px;
    width: 100%;
    border-radius: 12px;
    z-index: 1;
}

.map-pin {
    position: absolute;
    width: 40px;
    height: 40px;
    background: var(--red);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    cursor: pointer;
    animation: bounce 2s infinite;
}

.map-pin.visited { background: var(--success); animation: none; }

.map-pin-inner {
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 10px;
    left: 10px;
    transform: rotate(45deg);
}

/* ========== Login ========== */
.login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--red-dark) 0%, var(--red) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-header {
    background: linear-gradient(135deg, var(--red-dark) 0%, var(--red) 100%);
    color: white;
    padding: 15px;
}

/* ========== Profile ========== */
.profile-avatar {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--red-dark) 0%, var(--red) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0 auto 20px;
}

/* ========== Tourist Bottom Navigation ========== */
.tourist-bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--white);
    box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
    z-index: 1000;
    padding: 8px 0;
    border-top: 1px solid var(--border);
}

.tourist-nav-item {
    flex: 1;
    text-align: center;
    padding: 8px 4px;
    color: var(--ink-3);
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    background: none;
    cursor: pointer;
}

.tourist-nav-item:hover  { color: var(--teal); }
.tourist-nav-item.active { color: var(--coral); font-weight: 700; }
.tourist-nav-item i      { display: block; font-size: 1.4rem; margin-bottom: 2px; }
.tourist-nav-item small  { display: block; font-size: 0.72rem; }
.tourist-content          { padding-bottom: 80px; }

/* ========== Toast Notifications ========== */
.toast-container {
    position: fixed;
    top: 20px; right: 20px;
    z-index: 9999;
}

.toast-notification {
    background: var(--white);
    border-left: 4px solid;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    min-width: 300px;
    animation: slideIn 0.3s ease-out;
    font-family: 'Outfit', sans-serif;
}

.toast-notification.success { border-color: var(--success); }
.toast-notification.error   { border-color: var(--red); }
.toast-notification.info    { border-color: var(--blue); }

/* ========== Alerts ========== */
.alert-danger  { background: var(--red-light);             border: 1px solid rgba(185,28,28,0.25); color: var(--red-dark); border-radius: 10px; }
.alert-success { background: rgba(22,163,74,0.08);         border: 1px solid rgba(22,163,74,0.25);  color: #0d7a3e;         border-radius: 10px; }
.alert-warning { background: #fffbeb;                      border: 1px solid #f59e0b;               border-radius: 10px;    color: #92400e; }
.alert-info    { background: rgba(37,99,235,0.06);         border: 1px solid rgba(37,99,235,0.2);   color: var(--blue);     border-radius: 10px; }

/* ========== Pagination ========== */
.pagination .page-link {
    color: var(--red);
    border-color: var(--border);
    border-radius: 8px !important;
    margin: 0 2px;
    font-weight: 600;
    font-size: 0.83rem;
}

.pagination .page-link:hover {
    background: var(--red-light);
    border-color: var(--red);
    color: var(--red);
}

.pagination .page-item.active .page-link {
    background: var(--red);
    border-color: var(--red);
    color: white;
    box-shadow: 0 3px 10px rgba(185,28,28,0.3);
}

/* ========== Modals ========== */
.modal-content {
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
    font-family: 'Outfit', sans-serif;
}

.modal-header {
    border-bottom: 1px solid var(--border);
    padding: 18px 24px;
    border-radius: 20px 20px 0 0;
}

.modal-header .modal-title { font-weight: 700; color: var(--ink); font-size: 1.05rem; }

.modal-footer {
    border-top: 1px solid var(--border);
    padding: 16px 24px;
    border-radius: 0 0 20px 20px;
}

/* ========== Dropdown ========== */
.dropdown-menu {
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    padding: 6px;
    font-family: 'Outfit', sans-serif;
}

.dropdown-item {
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.88rem;
    color: var(--ink);
    font-weight: 500;
    transition: background 0.12s;
}

.dropdown-item:hover { background: var(--red-light); color: var(--ink); }
.dropdown-item.text-danger:hover { background: var(--red-light); color: var(--red) !important; }

/* ========== Animations ========== */
@keyframes bounce {
    0%, 100% { transform: rotate(-45deg) translateY(0); }
    50%       { transform: rotate(-45deg) translateY(-10px); }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25%       { transform: rotate(-10deg); }
    75%       { transform: rotate(10deg); }
}

.wiggle-marker { animation: wiggle 1.5s ease-in-out infinite; }

@keyframes slideIn {
    from { transform: translateX(400px); opacity: 0; }
    to   { transform: translateX(0);     opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.4s ease both; }

/* ========== Scrollbar ========== */
::-webkit-scrollbar       { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #f0f0f0; }
::-webkit-scrollbar-thumb { background: var(--ink-3); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-2); }

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .sidebar { width: 100%; position: relative; min-height: auto; }
    .main-content { margin-left: 0; }
    .stat-card .stat-value { font-size: 1.4rem; }
}