:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --background-color: #f8f9fa;
    --text-color: #2c3e50;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.navbar {
    background: var(--primary-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.navbar-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--secondary-color);
}

.logout-btn {
    background: none;
    border: 1px solid white;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.chart-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.data-table {
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    position: relative;
}

th:hover {
    background: #1a252f;
}

/*
th.sort-asc::after {
    content: '↑';
    margin-left: 0.5rem;
    color: #007bff;
}

th.sort-desc::after {
    content: '↓';
    margin-left: 0.5rem;
    color: #007bff;
}
*/

/*
.sort-arrow {
    margin-left: 8px;
    font-size: 0.8em;
    opacity: 0.6;
}

th {
    position: relative;
}

th.asc .sort-arrow {
    color: #3f51b5;
}

th.desc .sort-arrow {
    color: #ff4081;
}
*/

.alert {
    padding: 12px 15px; /* Slightly increased padding for better readability */
    margin-bottom: 12px; /* Slightly increased margin for spacing */
    border-radius: 4px;
    border: 1px solid transparent; /* Default transparent border */
}

.alert.success {
    background-color: #e8f8f0; /* Very light green */
    color: #3498db; /* Use your secondary color or a dark green */
    border-color: #bce8c5; /* Light green border */
}

.alert.error {
    background-color: #fdeded; /* Very light pink/red */
    color: #c0392b; /* Darker red for error text */
    border-color: #f8c0c0; /* Light red border */
}

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.auth-btn {
    background: var(--primary-color);
    color: white;
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .navbar-links {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .logout-btn {
        width: 100%;
    }
}

/* Error Page Styles */
.error-container {
    text-align: center;
    padding: 4rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.error-title {
    color: var(--danger-color);
    margin-bottom: 2rem;
}

.error-message {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 4px;
    margin: 2rem 0;
}

.error-stack {
    text-align: left;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-top: 1rem;
    color: #666;
}

.error-cta {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.error-cta:hover {
    background: var(--secondary-color);
}

/* Point Cost Highlight */
td.highlight {
    color: var(--success-color);
    font-weight: bold;
}

/* Hotel Directory Styles */
.hotel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.hotel-card {
    padding: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.search-box {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

.search-box input {
    flex: 1;
    padding: 0.8rem;
}

/* Sorting Arrow Styling */
.sort-arrow {
    margin-left: 8px;
    width: 12px;
    position: relative;
}

.sort-arrow::before,
.sort-arrow::after {
    content: '';
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    position: absolute;
    opacity: 0.6;
}

.sort-arrow::before {
    border-bottom: 4px solid #666;
    top: -3px;
}

.sort-arrow::after {
    border-top: 4px solid #666;
    bottom: -3px;
}

th.asc .sort-arrow::before {
    border-bottom-color: #48b53f;
    opacity: 1;
}

th.desc .sort-arrow::after {
    border-top-color: #ff4081;
    opacity: 1;
}

.positive {
    color: #28a745;
    font-weight: 500;
}

.alert {
    padding: 1rem;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
    margin: 2rem 0;
}

/* Add to your main CSS file */
.hotel-link {
    color: #3f51b5; /* Match your theme's primary color */
    text-decoration: none;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.hotel-link:hover {
    color: #283593; /* Darker shade on hover */
    text-decoration: underline;
}

.hotel-link:focus {
    outline: 2px solid rgba(63, 81, 181, 0.3);
    outline-offset: 2px;
}

.hotel-link:active {
    color: #1a237e; /* Even darker for active state */
}

/* Dropdown Styles */
/* Dropdown container */
.dropdown {
  position: relative;
  display: inline-block;
}

/* Dropdown button styling */
.dropbtn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  font-family: inherit;
}

/* Dropdown content hidden by default */
.dropdown-content {
  display: none;
  position: absolute;
  background-color: var(--primary-color);
  min-width: 160px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  z-index: 1;
  flex-direction: column;
}

/* Dropdown links styling */
.dropdown-content a {
  color: white;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

/* Hover effect for links */
.dropdown-content a:hover {
  background-color: var(--secondary-color);
  color: white;
}

/* Show dropdown on hover or when active */
.dropdown:hover .dropdown-content,
.dropdown.active .dropdown-content {
  display: flex;
}
