:root {
    /* Madras Stays Brand Colors */
    --bg-color: #fdfaf5;
    --card-bg: #ffffff;
    --primary-green: #143b23;
    --primary-green-hover: #0e2a18;
    --text-main: #1c1c1c;
    --text-muted: #6b6b6b;
    --border-color: #eae9e5;
    --accent-color: #d05d29;
    --star-color: #d19a2e;
    
    /* Dashboard specific */
    --sidebar-width: 260px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
}

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

.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--card-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
}

/* ---------------- SIDEBAR ---------------- */
.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.badge {
    background: #e8f0eb;
    color: var(--primary-green);
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.sidebar-nav {
    flex: 1;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
}

/* Custom scrollbar for sidebar nav */
.sidebar-nav::-webkit-scrollbar {
    width: 5px;
}
.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: #eae9e5;
    border-radius: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: #dcdad4;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.nav-item i {
    font-size: 20px;
}

.nav-item:hover {
    background: #f5f5f5;
    color: var(--text-main);
}

.nav-item.active {
    background: var(--primary-green);
    color: white;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border-color);
}

.sidebar-footer .nav-item {
    padding: 8px 12px;
    font-size: 13px;
    gap: 8px;
}

.sidebar-footer .nav-item i {
    font-size: 16px;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 0 12px;
}

.avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--text-muted);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-info strong {
    font-size: 12px;
    color: var(--text-main);
    line-height: 1.2;
}

.user-info span {
    font-size: 10px;
    color: var(--text-muted);
}

/* ---------------- HEADER ---------------- */
.main-header {
    height: 70px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f5f5f5;
    padding: 10px 16px;
    border-radius: var(--radius-lg);
    width: 300px;
}

.header-search input {
    border: none;
    background: transparent;
    outline: none;
    font-family: inherit;
    font-size: 13px;
    width: 100%;
}

.header-actions {
    display: flex;
    gap: 16px;
}

.icon-btn {
    background: transparent;
    border: none;
    font-size: 22px;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.icon-btn:hover {
    color: var(--primary-green);
}

.notification-dot {
    position: absolute;
    top: 0;
    right: 2px;
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    border: 2px solid var(--card-bg);
}

/* ---------------- CONTENT AREA ---------------- */
.content-area {
    padding: 32px;
    width: 100%;
    overflow-x: hidden;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-pane.active {
    display: block;
}

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

.page-header {
    margin-bottom: 24px;
}

.page-title {
    font-size: 28px;
    color: var(--primary-green);
    margin-bottom: 8px;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 14px;
}

/* ---------------- CARDS & GRIDS ---------------- */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    padding: 24px;
    border: 1px solid var(--border-color);
}

.mt-20 {
    margin-top: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: #e8f0eb;
    color: var(--primary-green);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-details {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 500;
}

.stat-value {
    font-size: 24px;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-weight: 700;
}

/* ---------------- TABLES ---------------- */
.table-responsive {
    overflow-x: auto;
    width: 100%;
    margin-top: 10px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    text-align: left;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 13px;
    background: #fafaf7;
    white-space: nowrap;
}

.admin-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    font-size: 13px;
    white-space: nowrap;
}

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

.status-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status-pending {
    background: #fff4e5;
    color: #b77b21;
}

.status-approved {
    background: #e8f0eb;
    color: var(--primary-green);
}

/* ---------------- BUTTONS ---------------- */
.btn {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

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

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
}

.btn-secondary {
    background: #f0f0f0;
    color: var(--text-main);
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* ---------------- CHANNELS GRID ---------------- */
.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.channel-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.channel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.channel-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.channel-icon {
    width: 40px;
    height: 40px;
    background: #f5f5f5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary-green);
}

.channel-name {
    font-weight: 600;
    font-size: 16px;
}

.channel-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.channel-status.connected { color: #10b981; }
.channel-status.connected .dot { background: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2); }

.channel-status.pending { color: #f59e0b; }
.channel-status.pending .dot { background: #f59e0b; }

.channel-metrics {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-top: 1px solid #f5f5f5;
    border-bottom: 1px solid #f5f5f5;
    margin-bottom: 16px;
}

.metric {
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: 11px;
    color: var(--text-muted);
}

.metric-val {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

/* ---------------- LIVE SYNC LOGS ---------------- */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-header h3 {
    font-size: 16px;
    font-family: 'Inter', sans-serif;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
}

.status-indicator.active .dot {
    background: #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.log-stream {
    height: 250px;
    overflow-y: auto;
    background: #1e1e1e;
    border-radius: var(--radius-sm);
    padding: 16px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    color: #a0a0a0;
}

.log-entry {
    margin-bottom: 8px;
    border-bottom: 1px solid #333;
    padding-bottom: 4px;
}

.log-time { color: #569cd6; margin-right: 8px; }
.log-source { color: #ce9178; font-weight: bold; margin-right: 8px; }
.log-action { color: #dcdcaa; }
.log-success { color: #4ec9b0; }

/* ---------------- MODAL ---------------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: var(--card-bg);
    width: 500px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.show .modal-card {
    transform: translateY(0);
}

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

.modal-header h3 {
    font-size: 18px;
}

.close-btn {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-body {
    padding: 24px;
}

.hotel-preview {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.hotel-preview img {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
}

.hotel-preview-info h4 {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    margin-bottom: 4px;
}

.hotel-preview-info p {
    font-size: 13px;
    color: var(--text-muted);
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #fafaf7;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* MMT Special Nav Item */
.nav-item.special-mmt {
    background: linear-gradient(135deg,#e8f5ff,#d0eaff);
    color: #0056b3;
    border-left: 3px solid #0056b3;
    font-weight: 700;
}
.nav-item.special-mmt:hover {
    background: linear-gradient(135deg,#d0eaff,#bfe0ff);
    color: #003a8c;
}
.nav-item.special-mmt.active {
    background: var(--primary-green);
    color: white;
    border-left: none;
}

/* Admin Login Layout */
.admin-login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top right, #e8f0eb 0%, var(--bg-color) 100%);
    padding: 20px;
    width: 100%;
}

.login-card {
    background: var(--card-bg);
    width: 100%;
    max-width: 440px;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(20, 59, 35, 0.08);
    border: 1px solid var(--border-color);
    text-align: center;
    animation: loginFadeIn 0.5s ease-out;
}

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

.login-logo {
    height: 60px;
    margin-bottom: 24px;
}

.login-card h2 {
    color: var(--primary-green);
    font-size: 26px;
    margin-bottom: 8px;
    font-weight: 700;
}

.login-card p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 30px;
}

.login-form-group {
    text-align: left;
    margin-bottom: 20px;
}

.login-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

.login-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-wrapper i {
    position: absolute;
    left: 14px;
    font-size: 20px;
    color: var(--text-muted);
}

.login-input-wrapper input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    background: #fafaf9;
}

.login-input-wrapper input:focus {
    border-color: var(--primary-green);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(20, 59, 35, 0.05);
}

.login-error {
    background: #fdf2f2;
    color: #ec5b5b;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 20px;
    display: none;
    align-items: center;
    gap: 8px;
    text-align: left;
    border: 1px solid #fbd5d5;
}


