/* NP Admin - Base Styles */

:root {
    --color-primary: #1a1a2e;
    --color-secondary: #16213e;
    --color-accent: #9EEBD3;
    --color-accent-light: #b8f2e0;
    --color-bg: #0f0f1a;
    --color-surface: #1a1a2e;
    --color-surface-hover: #252540;
    --color-text: #eaeaea;
    --color-text-muted: #9ca3af;
    --color-border: #2d2d44;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;

    --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);

    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;

    --sidebar-width: 260px;
    --header-height: 64px;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ========================================
   LAYOUT - App Shell
   ======================================== */

/* Hide sidebar toggle checkbox */
.sidebar-toggle-checkbox {
    display: none;
}

/* Header */
.header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 1.5rem;
    gap: 1rem;
}

/* Hamburger button - hidden on desktop */
.hamburger-btn {
    display: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.hamburger-btn:hover {
    background: var(--color-surface-hover);
}

.hamburger-icon {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--color-text);
    position: relative;
}

.hamburger-icon::before,
.hamburger-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    left: 0;
}

.hamburger-icon::before {
    top: -6px;
}

.hamburger-icon::after {
    top: 6px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--color-text);
}

.header .logo-image {
    height: 32px;
    width: 32px;
    object-fit: contain;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-accent);
    letter-spacing: -0.5px;
}

.logo-divider {
    width: 2px;
    height: 24px;
    background: var(--color-border);
}

.logo-subtitle {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Header actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

/* Icon buttons */
.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast);
    position: relative;
}

.icon-btn:hover {
    background: var(--color-surface-hover);
}

.notification-icon {
    font-size: 1.25rem;
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    background: var(--color-accent);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Dropdowns */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.dropdown-toggle:hover {
    background: var(--color-surface-hover);
    border-color: var(--color-text-muted);
}

.dropdown-arrow {
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    margin-top: 0.25rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition-fast);
    z-index: 200;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu-right {
    left: auto;
    right: 0;
}

.dropdown-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border);
}

.dropdown-header strong {
    display: block;
    font-weight: 600;
}

.dropdown-header small {
    color: var(--color-text-muted);
    font-size: 0.75rem;
}

.dropdown-item {
    display: block;
    padding: 0.625rem 1rem;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.875rem;
    transition: background var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--color-surface-hover);
}

.dropdown-item.active {
    color: var(--color-accent);
}

.dropdown-item.text-danger {
    color: var(--color-error);
}

.dropdown-divider {
    height: 1px;
    background: var(--color-border);
    margin: 0.25rem 0;
}

/* User menu */
.user-toggle {
    border: none;
    padding: 0.25rem;
}

.user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--color-accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50%;
}

/* ========================================
   SIDEBAR
   ======================================== */

.app-layout {
    display: flex;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    overflow-y: auto;
    z-index: 90;
    transition: transform var(--transition-normal);
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin: 0.125rem 0.75rem;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.sidebar .nav-link:hover {
    color: var(--color-text);
    background: var(--color-surface-hover);
}

.sidebar .nav-link.active {
    color: var(--color-accent);
    background: rgba(233, 69, 96, 0.1);
}

.nav-icon {
    font-size: 1.125rem;
    width: 24px;
    text-align: center;
}

.nav-text {
    flex: 1;
}

.nav-section-divider {
    height: 1px;
    background: var(--color-border);
    margin: 0.75rem 1.5rem;
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 80;
    cursor: pointer;
}

/* ========================================
   MAIN CONTENT
   ======================================== */

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

.content-container {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    width: 100%;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 1rem 2rem;
    margin-left: var(--sidebar-width);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-link {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--color-text);
}

.footer-divider {
    color: var(--color-border);
}

.footer-version {
    font-family: var(--font-mono);
    font-size: 0.625rem;
}

/* ========================================
   PAGE CONTENT STYLES
   ======================================== */

/* Page header */
.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

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

/* Hero Section */
.hero {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--color-text-muted);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Cards */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all var(--transition-normal);
}

.card:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card h2, .card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card p, .card-text {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Stat card variant */
.stat-card {
    text-align: left;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

/* Stub page styling */
.stub-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
}

.stub-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.stub-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stub-text {
    color: var(--color-text-muted);
    max-width: 400px;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
    background: var(--color-accent);
    color: #1a1a2e;
}

.btn:hover {
    background: var(--color-accent-light);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

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

.btn-secondary:hover {
    background: var(--color-surface-hover);
    border-color: var(--color-text-muted);
}

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

.btn-danger:hover {
    background: #dc2626;
}

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

.btn-success:hover {
    background: #059669;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn-icon {
    padding: 0.5rem;
    min-width: 36px;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
}

/* ========================================
   AUTH LAYOUT
   ======================================== */

.auth-page {
    display: flex;
    flex-direction: column;
}

.auth-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-header {
    padding: 2rem;
    text-align: center;
}

.logo-centered {
    justify-content: center;
}

.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.auth-footer {
    padding: 1.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.auth-footer-links {
    margin-top: 0.5rem;
}

.auth-footer-links a {
    color: var(--color-text-muted);
    text-decoration: none;
}

.auth-footer-links a:hover {
    color: var(--color-text);
}

.auth-footer-links span {
    margin: 0 0.5rem;
}

/* ========================================
   HTMX STATES
   ======================================== */

.htmx-request .btn {
    opacity: 0.7;
    pointer-events: none;
}

.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline-block;
}

/* ========================================
   RESPONSIVE - Mobile
   ======================================== */

@media (max-width: 768px) {
    :root {
        --sidebar-width: 280px;
    }

    /* Show hamburger on mobile */
    .hamburger-btn {
        display: block;
    }

    /* Sidebar hidden by default on mobile */
    .sidebar {
        transform: translateX(-100%);
    }

    /* Show overlay when sidebar is open */
    .sidebar-toggle-checkbox:checked ~ .app-layout .sidebar {
        transform: translateX(0);
    }

    .sidebar-toggle-checkbox:checked ~ .app-layout .sidebar-overlay {
        display: block;
    }

    /* Main content full width on mobile */
    .main-content {
        margin-left: 0;
    }

    .footer {
        margin-left: 0;
    }

    .content-container {
        padding: 1rem;
    }

    /* Adjust hero for mobile */
    .hero h1 {
        font-size: 1.5rem;
    }

    /* Stack dashboard cards */
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    /* Footer stacks on mobile */
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* ========================================
   UTILITIES
   ======================================== */

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

.text-link {
    color: #60a5fa;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.text-link:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.text-danger {
    color: var(--color-error);
}

.text-success {
    color: var(--color-success);
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }

/* ========================================
   FORM COMPONENTS
   ======================================== */

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

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.required-mark {
    color: var(--color-accent);
    margin-left: 0.125rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    color: var(--color-text);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(158, 235, 211, 0.25);
}

.form-input:disabled,
.form-textarea:disabled,
.form-select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--color-surface);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--color-text-muted);
}

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

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 0.375rem;
}

.form-error {
    font-size: 0.75rem;
    color: var(--color-error);
    margin-top: 0.375rem;
}

.form-group.has-error .form-input,
.form-group.has-error .form-textarea,
.form-group.has-error .form-select {
    border-color: var(--color-error);
}

/* Checkbox & Radio */
.form-check,
.form-radio {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.form-check-input,
.form-radio-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--color-accent);
}

.form-check-label,
.form-radio-label {
    font-size: 0.875rem;
    cursor: pointer;
}

/* ========================================
   DATA TABLE
   ======================================== */

.table-container {
    overflow-x: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th {
    background: var(--color-surface);
    font-weight: 600;
    text-align: left;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

.data-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: var(--color-surface-hover);
}

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

.col-actions {
    width: 1%;
    white-space: nowrap;
}

/* Empty state */
.table-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-text-muted);
}

.table-empty-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

/* ========================================
   ALERTS
   ======================================== */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--color-success);
    color: var(--color-success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--color-error);
    color: var(--color-error);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--color-warning);
    color: var(--color-warning);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid #3b82f6;
    color: #3b82f6;
}

.alert-message {
    flex: 1;
}

.alert-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    padding: 0;
    line-height: 1;
}

.alert-close:hover {
    opacity: 1;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: calc(var(--header-height) + 1rem);
    right: 1rem;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 0.875rem;
    animation: toast-enter 0.3s ease-out;
    min-width: 280px;
    max-width: 400px;
}

@keyframes toast-enter {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-success { border-left: 3px solid var(--color-success); }
.toast-error { border-left: 3px solid var(--color-error); }
.toast-warning { border-left: 3px solid var(--color-warning); }
.toast-info { border-left: 3px solid #3b82f6; }

.toast-message {
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0;
    line-height: 1;
}

/* ========================================
   BADGES
   ======================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    white-space: nowrap;
}

.badge-default {
    background: var(--color-surface-hover);
    color: var(--color-text-muted);
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
}

.badge-error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-error);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-warning);
}

.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

/* ========================================
   SPINNER
   ======================================== */

.spinner {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.spinner-svg {
    animation: spin 0.8s linear infinite;
}

.spinner-sm .spinner-svg { width: 16px; height: 16px; }
.spinner-md .spinner-svg { width: 24px; height: 24px; }
.spinner-lg .spinner-svg { width: 32px; height: 32px; }

.spinner-track {
    opacity: 0.2;
}

.spinner-head {
    stroke: var(--color-accent);
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spinner-text {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

/* ========================================
   PAGINATION
   ======================================== */

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    font-size: 0.875rem;
}

.pagination-info {
    color: var(--color-text-muted);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn {
    padding: 0.5rem 0.875rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.pagination-btn:hover:not(.disabled) {
    background: var(--color-surface-hover);
    border-color: var(--color-accent);
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-pages {
    color: var(--color-text-muted);
    padding: 0 0.5rem;
}

/* ========================================
   LINK STYLES
   ======================================== */

.link-accent {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.link-accent:hover {
    color: var(--color-accent-light);
}

/* ========================================
   SEARCH FORM
   ======================================== */

.search-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.search-input-group {
    display: flex;
    gap: 0.75rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--color-text);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(158, 235, 211, 0.25);
}

.search-spinner {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* ========================================
   PROPERTY CARDS
   ======================================== */

.property-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.property-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.property-card:hover {
    border-color: var(--color-accent);
    background: var(--color-surface-hover);
}

.property-card-content {
    flex: 1;
}

.property-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.property-address {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.property-card-actions {
    margin-left: 1rem;
}

/* ========================================
   EMPTY STATE
   ======================================== */

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    color: var(--color-text-muted);
    opacity: 0.5;
}

.empty-state-icon svg {
    width: 100%;
    height: 100%;
}

.empty-state-text {
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

/* ========================================
   PAGE HEADER VARIANTS
   ======================================== */

.page-header-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

@media (max-width: 768px) {
    .page-header-content {
        flex-direction: column;
    }

    .search-input-group {
        flex-direction: column;
    }
}

/* ========================================
   TABLE STYLES
   ======================================== */

.table-responsive {
    overflow-x: auto;
}

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

.table th {
    background: var(--color-bg);
    font-weight: 600;
    text-align: left;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

.table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

.table tbody tr:hover {
    background: var(--color-surface-hover);
}

.table-actions {
    display: flex;
    gap: 0.5rem;
}

.inline-form {
    display: inline;
}

/* ========================================
   FILTER BAR
   ======================================== */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Icon in buttons */
.btn .icon {
    width: 16px;
    height: 16px;
}

/* Badge variants */
.badge-muted {
    background: var(--color-surface-hover);
    color: var(--color-text-muted);
}

/* Form control alias */
.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    color: var(--color-text);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(158, 235, 211, 0.25);
}

.btn-primary {
    background: var(--color-accent);
    color: #1a1a2e;
}

.btn-primary:hover {
    background: var(--color-accent-light);
    color: #1a1a2e;
}

.badge-secondary {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.badge-primary {
    background: rgba(233, 69, 96, 0.15);
    color: var(--color-accent);
}

/* ========================================
   BACK LINK
   ======================================== */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

.back-link:hover {
    color: var(--color-accent);
}

/* ========================================
   PROPERTY DETAIL
   ======================================== */

.property-detail {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.property-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.property-header-info h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.property-header-info .property-address {
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.property-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.property-section {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.property-section h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

.property-description {
    color: var(--color-text);
    line-height: 1.7;
}

/* ========================================
   PHOTO GALLERY
   ======================================== */

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.photo-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-bg);
    aspect-ratio: 4/3;
}

.photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.photo-card:hover img {
    transform: scale(1.05);
}

.photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    font-size: 0.75rem;
}

/* ========================================
   DETAILS GRID
   ======================================== */

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.detail-card {
    background: var(--color-bg);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.detail-card h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.detail-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.detail-item dt {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.detail-item dd {
    font-size: 0.875rem;
    font-weight: 500;
    text-align: right;
}

.detail-item a {
    color: var(--color-accent);
    text-decoration: none;
}

.detail-item a:hover {
    text-decoration: underline;
}

/* ========================================
   ACTION CARDS
   ======================================== */

.action-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.action-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--color-text);
    transition: all var(--transition-fast);
}

.action-card:hover {
    border-color: var(--color-accent);
    background: var(--color-surface-hover);
}

.action-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(233, 69, 96, 0.1);
    border-radius: var(--radius-md);
    color: var(--color-accent);
}

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

.action-card-content {
    flex: 1;
}

.action-card-content h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.action-card-content p {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin: 0;
}

.action-card-arrow {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    transition: transform var(--transition-fast);
}

.action-card:hover .action-card-arrow {
    transform: translateX(4px);
    color: var(--color-accent);
}

@media (max-width: 768px) {
    .photo-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .details-grid {
        grid-template-columns: 1fr;
    }

    .property-header {
        flex-direction: column;
    }

    .property-header-info h1 {
        font-size: 1.5rem;
    }
}

/* ========================================
   ROOM TYPES PAGE
   ======================================== */

.room-types-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.page-title-section {
    margin-bottom: 0.5rem;
}

.page-title-section h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.room-type-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.room-type-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.room-type-card:hover {
    border-color: var(--color-accent);
    background: var(--color-surface-hover);
}

.room-type-card.room-type-inactive {
    opacity: 0.7;
}

.room-type-card-content {
    flex: 1;
}

.room-type-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.room-type-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.room-type-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.room-type-meta .meta-item {
    display: flex;
    align-items: center;
}

.room-type-meta .meta-item:not(:last-child)::after {
    content: "•";
    margin-left: 0.5rem;
    color: var(--color-border);
}

.room-type-desc {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.room-type-card-actions {
    margin-left: 1rem;
}

@media (max-width: 768px) {
    .room-type-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .room-type-card-actions {
        margin-left: 0;
        align-self: flex-end;
    }

    .room-type-meta {
        flex-direction: column;
        gap: 0.25rem;
    }

    .room-type-meta .meta-item::after {
        display: none;
    }
}

/* Collapsible Room Type Cards on Property Detail */
.room-type-card {
    display: block;
}

.room-type-card[open] .room-type-header {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.room-type-card summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    transition: all var(--transition-fast);
}

.room-type-card summary::-webkit-details-marker {
    display: none;
}

.room-type-card summary:hover {
    background: var(--color-surface-hover);
}

.room-type-card .room-type-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.room-type-card .room-type-code {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
    min-width: 4ch;
    text-align: center;
}

.room-type-content {
    padding: 0 1.25rem 1.25rem 1.25rem;
}

.room-type-photos {
    margin: 1rem 0;
}

.photo-thumbnails {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.photo-thumb {
    position: relative;
    width: 150px;
}

.photo-thumb img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.photo-thumb .copy-url-btn {
    position: absolute;
    bottom: 4px;
    right: 4px;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    opacity: 0.9;
}

.photo-thumb:hover .copy-url-btn {
    opacity: 1;
}

.room-type-actions {
    margin-top: 1rem;
}

/* ========================================
   ROOM TYPE DETAIL PAGE
   ======================================== */

.room-type-detail-page {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.room-type-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Room Type Photo Gallery */
.room-type-photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.room-type-photo-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-bg);
    aspect-ratio: 4/3;
}

.room-type-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.room-type-photo-item:hover img {
    transform: scale(1.05);
}

/* No Photos Placeholder */
.no-photos-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-align: center;
}

.no-photos-placeholder svg {
    width: 64px;
    height: 64px;
    color: var(--color-text-muted);
    opacity: 0.5;
    margin-bottom: 1rem;
}

.no-photos-placeholder p {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    margin: 0;
}

/* Room Type Info Grid */
.room-type-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.info-section {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.info-section h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

/* Detail list with labels and values (ul/li structure) */
.info-section .detail-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.info-section .detail-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.detail-label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.detail-value {
    font-size: 0.875rem;
    font-weight: 500;
    text-align: right;
}

.detail-value code {
    background: var(--color-bg);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
}

.room-type-description {
    color: var(--color-text);
    line-height: 1.7;
    margin: 0;
}

@media (max-width: 768px) {
    .room-type-photo-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .room-type-info-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   SHARE LINK PAGE
   ======================================== */

.share-link-page {
    max-width: 800px;
    margin: 0 auto;
}

.share-link-container {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--color-border);
}

.share-link-input-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.share-link-input {
    flex: 1;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.875rem 1rem;
    color: var(--color-text);
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.share-link-input:hover {
    background: var(--color-surface);
    border-color: var(--color-accent);
}

.share-link-input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

.copy-feedback {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-success);
    font-size: 0.9375rem;
    font-weight: 500;
    animation: fadeIn var(--transition-normal);
}

.copy-feedback svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

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

.btn-success {
    background: var(--color-success) !important;
    color: white !important;
}

.btn-success:hover {
    background: #059669 !important;
}

.share-link-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
}

.info-list li {
    padding: 0.625rem 0;
    padding-left: 1.75rem;
    position: relative;
    color: var(--color-text);
    line-height: 1.6;
}

.info-list-check li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-success);
    font-weight: bold;
    font-size: 1.125rem;
}

.info-list-cross li::before {
    content: '×';
    position: absolute;
    left: 0;
    color: var(--color-error);
    font-weight: bold;
    font-size: 1.375rem;
    line-height: 1;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn svg {
    display: inline-block;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .share-link-container {
        padding: 1.5rem;
    }

    .share-link-input-group {
        flex-direction: column;
    }

    .share-link-info {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   MESSAGING
   ======================================== */

.message-thread {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
}

.message-bubble {
    max-width: 75%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.message-bubble.guest {
    align-self: flex-start;
    background: var(--color-surface-hover);
}

.message-bubble.hotel {
    align-self: flex-end;
    background: var(--color-secondary);
    border-color: var(--color-accent);
}

.message-bubble.np_system {
    align-self: center;
    background: rgba(158, 235, 211, 0.1);
    border-color: var(--color-accent);
    font-style: italic;
    text-align: center;
    max-width: 85%;
}

.message-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.375rem;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.message-sender {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.message-time {
    white-space: nowrap;
}

.message-content {
    font-size: 0.9375rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.compose-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.compose-form .form-group {
    margin-bottom: 0;
}

/* Room type code badge - monospace for alignment */
.room-type-code-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    display: inline-block;
    min-width: 4ch;
    text-align: center;
}

/* Copy URL pill button */
.copy-url-pill {
    background: rgba(30, 30, 50, 0.95);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 9999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.copy-url-pill:hover {
    background: rgba(50, 50, 80, 0.95);
}

/* Detail value links - accent color */
.detail-value a,
.detail-value a:visited {
    color: var(--color-accent);
    text-decoration: none;
}

.detail-value a:hover {
    color: var(--color-accent-light);
    text-decoration: underline;
}

/* Contacts table - top-align for multi-line cells */
.table-contacts td {
    vertical-align: top;
}

/* Alert info - link styling and alignment */
.alert-info {
    text-align: left;
}

.alert-info a {
    color: inherit;
    text-decoration: underline;
    font-weight: 600;
}

.alert-info a:hover {
    opacity: 0.8;
}
