/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Autofill prevention styles */
input[style*="display:none"] {
    display: none !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Prevent autofill styling */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: #333 !important;
    transition: background-color 5000s ease-in-out 0s;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
    min-height: 100vh;
}

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

/* Home Page Styles */
.home-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.home-container {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 3rem;
    max-width: 500px;
    width: 100%;
}

.home-header {
    text-align: center;
    margin-bottom: 2rem;
}

.home-logo {
    width: 120px;
    height: auto;
    margin-bottom: 1rem;
}

.home-header h1 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.home-header p {
    color: #64748b;
    font-size: 1.1rem;
}

/* Auth Container */
.auth-container {
    width: 100%;
}

.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e2e8f0;
}

.auth-tab {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-tab.active {
    color: #3CAAA0;
    border-bottom: 2px solid #3CAAA0;
}

.auth-tab-content {
    display: none;
}

.auth-tab-content.active {
    display: block;
}

.auth-form {
    width: 100%;
}

.btn-full {
    width: 100%;
    margin-top: 1rem;
}

/* App Page Styles */
.app-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* App Header */
.app-header {
    display: none;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.sidebar-toggle:hover {
    background: #f1f5f9;
    color: #3CAAA0;
}

.header-logo {
    width: 100px;
    height: auto;
    cursor: pointer;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    color: #64748b;
    font-weight: 500;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 280px;
    background: white;
    border-right: 1px solid #e2e8f0;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 200;
    padding-top: 0;
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

/* Desktop sidebar behavior */
@media (min-width: 769px) {
    .sidebar {
        transform: translateX(0) !important;
    }
    
    .sidebar.collapsed {
        transform: translateX(-100%) !important;
    }
    
    .app-main {
        margin-left: 280px;
    }
    
    .sidebar.collapsed + .app-main {
        margin-left: 0;
    }
}

/* Sidebar Header */
.sidebar-header {
    padding: 1rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-user-info .user-info {
    font-weight: 600;
    color: #1e293b;
    font-size: 1rem;
}

.sidebar-user-info .btn {
    width: 100%;
    justify-content: center;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

.sidebar-nav {
    padding: 1rem 0;
    padding-bottom: 0.5rem; /* Reduced to bring chat management closer */
}

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

.sidebar-item {
    margin-bottom: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    transition: all 0.2s;
    border-radius: 0 0.5rem 0.5rem 0;
}

.sidebar-link:hover {
    background: #f1f5f9;
    color: #3CAAA0;
}

.sidebar-link.active {
    background: #3CAAA0;
    color: white;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
}

/* Sidebar Footer */
.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem 2rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    text-align: center;
}

.sidebar-footer p {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0;
}

/* Main Content */
.app-main {
    flex: 1;
    padding: 0.5rem; /* Further reduce padding */
    margin-left: 0;
    margin-top: 0;
    margin-bottom: 0;
    transition: margin-left 0.3s ease;
    overflow: hidden;
    min-height: 100vh;
}

.sidebar.open + .app-main {
    margin-left: 280px;
}

/* Sections */
.section {
    display: none !important;
}

.section.active {
    display: block !important;
}

.section h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #1e293b;
}

/* Cards */
.card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1e293b;
}

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

.manage-data-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.manage-data-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Make the first row tiles the same size as the second row */
.manage-data-row:first-child {
    grid-template-columns: repeat(3, 1fr);
}

/* Manage Data Card Styles */
.manage-data-row .card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.manage-data-row .card h3 {
    margin-bottom: 1rem;
}

.manage-data-row .card p {
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.manage-data-row .card form {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.manage-data-row .card form .form-group {
    margin-bottom: 1rem;
}

.manage-data-row .card form .btn {
    margin-top: auto;
    align-self: flex-start;
}

.manage-data-row .card .btn {
    align-self: flex-start;
    margin-top: auto;
}

.manage-data-row .card .status {
    margin-top: 1rem;
}

/* Chat Layout */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px); /* Further reduce height */
    background: #f8fafc;
    border-radius: 0.75rem;
    border: 1px solid #f8fafc;
    overflow: hidden;
}

/* Welcome Message Styles */
.welcome-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: calc(100vh - 120px);
}

.welcome-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin: 2rem;
    flex: 1;
}

.welcome-message h2 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.welcome-message p {
    font-size: 1.25rem;
    color: #64748b;
    max-width: 500px;
    line-height: 1.6;
}

/* Chat Container (when active) */
.chat-container.hidden {
    display: none;
}

/* Chat Header */
.chat-header {
    padding: 1rem 2rem 0.5rem 2rem;
    border-bottom: none; /* Remove border */
    background: transparent; /* Remove white background */
}

.chat-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

/* Chat Management Styles */
.chat-management {
    margin-top: 0;
    padding-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
}

.chat-management-header {
    display: flex;
    justify-content: space-between; /* Back to space-between */
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    gap: 0; /* Remove gap */
}

.chat-management-header h4 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 1rem; /* Add some margin to move text right */
}

.sidebar-new-chat-btn {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 1rem;
    padding: 0.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.sidebar-new-chat-btn:hover {
    background-color: #f3f4f6;
    color: #3b82f6;
    transform: scale(1.05);
}

.sidebar-new-chat-btn i {
    font-size: 1.26rem;
    margin-right: 0.5rem; /* Add back some margin to move button right */
}

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

.chat-list {
    max-height: 300px;
    overflow-y: auto;
}

.chat-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.chat-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.chat-item.active {
    background: #3CAAA0;
    border-color: #3CAAA0;
    color: white;
}

.chat-item-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.chat-title {
    font-weight: 500;
    font-size: 0.875rem;
}

.chat-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    opacity: 0.8;
}

.chat-message-count {
    color: inherit;
}

.chat-date {
    color: inherit;
}

/* Persona Selector Styles */
.persona-selector {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: end;
}

.persona-selector label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    display: block;
}

.persona-selector select {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: white;
    font-size: 0.875rem;
}

.persona-selector select:focus {
    outline: none;
    border-color: #3CAAA0;
    box-shadow: 0 0 0 3px rgba(60, 170, 160, 0.1);
}

/* Modal Styles */
.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;
}

.modal {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.5rem 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: #f8fafc;
}

.message {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.message.user {
    align-items: flex-end;
}

.message.assistant {
    align-items: flex-start;
}

.message.system {
    align-items: center;
}

.message-content {
    max-width: 70%;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.message.user .message-content {
    background: #3CAAA0;
    color: white;
    border-color: #3CAAA0;
}

.message.assistant .message-content {
    background: white;
    color: #1e293b;
}

.message.system .message-content {
    background: #f1f5f9;
    color: #64748b;
    text-align: center;
    font-style: italic;
}

.chat-input-container {
    padding: 0.25rem 1.5rem 0.5rem 1.5rem; /* Further reduce padding */
    background: transparent;
    border-top: 1px solid #f8fafc;
    margin-top: auto; /* Push to bottom */
}

.chat-form {
    width: 100%;
}

.input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.75rem;
    transition: all 0.2s;
}

.input-wrapper:focus-within {
    border-color: #3CAAA0;
    box-shadow: 0 0 0 3px rgba(60, 170, 160, 0.1);
}

.input-wrapper textarea {
    flex: 1;
    border: none;
    background: none;
    resize: none;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    color: #1e293b;
    outline: none;
    min-height: 24px;
    max-height: 120px;
}

.send-button {
    background: #3CAAA0;
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-button:hover {
    background: #2d8a82;
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.new-chat-button {
    background: #3CAAA0;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 0.5rem;
}

.new-chat-button:hover {
    background: #2a8a82;
    transform: scale(1.05);
}

.new-chat-button i {
    font-size: 1rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #1e293b;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3CAAA0;
    box-shadow: 0 0 0 3px rgba(60, 170, 160, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    gap: 0.5rem;
}

.btn-primary {
    background: #3CAAA0;
    color: white;
}

.btn-primary:hover {
    background: #2d8a82;
}

.btn-secondary {
    background: #64748b;
    color: white;
}

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

.btn:disabled {
    background: #cbd5e1;
    color: #64748b;
    cursor: not-allowed;
}

/* Status Messages */
.status {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
}

.status.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.status.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.status.info {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.status.loading {
    background: #fef3c7;
    color: #d97706;
    border: 1px solid #fed7aa;
}

/* Checkbox styles */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: #374151;
    margin-bottom: 0.5rem;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 16px;
    height: 16px;
    accent-color: #3CAAA0;
}

/* Progress bar styles */
.progress-container {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8fafc;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.progress-container.hidden {
    display: none;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background-color: #3CAAA0;
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 0.9rem;
    color: #64748b;
    text-align: center;
}

/* Stats */
.stats {
    color: #64748b;
}

.stats p {
    margin-bottom: 0.5rem;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-overlay.hidden {
    display: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #3CAAA0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Admin-only elements */
[data-admin-only] {
    display: none;
}

[data-admin-only].admin-visible {
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .home-container {
        padding: 2rem;
        margin: 1rem;
    }
    
    .app-header {
        display: none;
    }
    
    .app-main {
        padding: 1rem;
        margin-top: 0;
        margin-bottom: 0;
        min-height: 100vh;
        overflow: hidden;
    }
    
    .sidebar {
        width: 100%;
        top: 0;
        height: 100vh;
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar.open + .app-main {
        margin-left: 0;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .manage-data-grid {
        grid-template-columns: 1fr;
    }
    
    .chat-container {
        height: 75vh;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .welcome-message {
        margin: 1rem;
        padding: 2rem 1rem;
    }
    
    .welcome-message h2 {
        font-size: 2rem;
    }
    
    .welcome-message p {
        font-size: 1.125rem;
    }
    
    .chat-header {
        padding: 1rem;
    }
    
    .chat-header h2 {
        font-size: 1.25rem;
    }
    
    .chat-management-header {
        padding: 0.75rem 1rem;
    }
    
    .sidebar-new-chat-btn {
        width: 28px;
        height: 28px;
    }
    
    .sidebar-new-chat-btn i {
        font-size: 1.08rem;
    }
}

@media (min-width: 769px) {
    .sidebar-toggle {
        display: none;
    }
}

/* Footer */
.footer {
    background: white;
    color: #64748b;
    padding: 0.7rem 0;
    text-align: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-top: 1px solid #e2e8f0;
    height: 42px;
}

/* Hide footer when app page is visible (not on login page) */
.app-page:not(.hidden) ~ .footer {
    display: none;
}

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

.footer p {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 400;
}

/* Ensure footer stays at bottom */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: auto;
}

/* Prevent scrolling only when app page is visible */
body.app-page-visible {
    overflow: hidden;
}

/* Allow scrolling on home page */
.home-page {
    overflow: auto;
}

.app-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.app-main {
    flex: 1;
    overflow: hidden;
}

/* Manage Persona Styles */
.manage-persona-container {
    max-width: 800px;
    margin: 0 auto;
}

.persona-editor {
    margin-top: 1rem;
}

.persona-display {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.persona-text {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    min-height: 120px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: inherit;
    line-height: 1.6;
    color: #374151;
}

.persona-edit {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.persona-edit.hidden {
    display: none;
}

.persona-textarea {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.875rem;
    line-height: 1.6;
    resize: vertical;
    background-color: white;
}

.persona-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.persona-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.persona-actions .btn {
    min-width: 80px;
} 

/* Invite Code Management Styles */
.invite-code-management {
    margin-top: 1rem;
}

.invite-code-create {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.invite-code-create h4 {
    margin-bottom: 1rem;
    color: #1e293b;
    font-weight: 600;
}

.invite-code-form {
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    gap: 1rem;
    align-items: end;
}

.invite-code-form .form-group {
    margin-bottom: 0;
}

.invite-code-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.invite-code-form input,
.invite-code-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: border-color 0.15s ease-in-out;
}

.invite-code-form input:focus,
.invite-code-form textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.invite-code-form textarea {
    resize: vertical;
    min-height: 80px;
}

.invite-code-list h4 {
    margin-bottom: 1rem;
    color: #1e293b;
    font-weight: 600;
}

.invite-codes-table {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

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

.invite-codes-table th {
    background: #f8fafc;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.invite-codes-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

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

.invite-codes-table tr:hover {
    background: #f8fafc;
}

.invite-codes-table code {
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.75rem;
    color: #1e293b;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-badge.status-used {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.status-expired {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.status-revoked {
    background: #f3f4f6;
    color: #374151;
}

.btn-small {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 0.375rem;
}

@media (max-width: 768px) {
    .invite-code-form {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .invite-codes-table {
        font-size: 0.75rem;
    }
    
    .invite-codes-table th,
    .invite-codes-table td {
        padding: 0.5rem;
    }
} 

/* Ensure the dashboard section can scroll */
#dashboard {
    overflow-y: auto;
    max-height: calc(100vh - 100px);
} 