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

html, body {
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    padding-top: 140px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #5a6fd8;
}

/* Main Navigation Bar */
.main-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    padding: 10px 16px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: 1px solid transparent;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.navbar-brand:hover {
    color: #4a5568;
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

.navbar-brand i {
    font-size: 18px;
}

/* Workflow Steps */
.workflow-steps {
    display: flex;
    align-items: center;
    gap: 12px;
}

.workflow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: #718096;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 70px;
}

.workflow-step:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.workflow-step.active {
    color: #667eea;
    background: rgba(102, 126, 234, 0.15);
    font-weight: 600;
}

.step-number {
    width: 24px;
    height: 24px;
    background: #e2e8f0;
    color: #718096;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.workflow-step:hover .step-number,
.workflow-step.active .step-number {
    background: #667eea;
    color: white;
}

.step-arrow {
    color: #cbd5e0;
    font-size: 10px;
}

.navbar-right .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.welcome-text {
    color: #4a5568;
    font-weight: 500;
    font-size: 14px;
}

/* Breadcrumb Container */
.breadcrumb-container {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 999;
    padding: 8px 0;
}

.breadcrumb {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-item {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.breadcrumb-item:hover {
    color: #5a6fd8;
}

.breadcrumb-item.active {
    color: #2d3748;
    font-weight: 500;
}

.breadcrumb-item:not(:last-child)::after {
    content: "›";
    color: #cbd5e0;
    font-weight: normal;
    margin-left: 8px;
}

/* Home Button for non-authenticated users */
.home-button-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.home-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.home-button:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Main Content */
.main-content {
    padding: 32px 0;
    min-height: calc(100vh - 140px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 40px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    line-height: 1;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #edf2f7;
    color: #2d3748;
}

.btn-outline-primary {
    background: transparent;
    color: #667eea;
    font-size: 16px;
}

/* Next Steps Section */
.next-steps-section {
    margin-bottom: 40px;
}

.next-steps-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    color: #2d3748;
    font-size: 20px;
    font-weight: 600;
}

.next-steps-title i {
    color: #667eea;
    font-size: 20px;
}

.next-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.next-step-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 24px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: block;
}

.next-step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    text-decoration: none;
    color: inherit;
    border-color: rgba(102, 126, 234, 0.2);
}

.next-step-card h4 {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #2d3748;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.next-step-card h4 i {
    color: #667eea;
    font-size: 20px;
    flex-shrink: 0;
}

.next-step-card p {
    color: #718096;
    font-size: 14px;
    margin: 0;
    line-height: 1.6;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        padding-top: 120px;
    }
    
    .navbar-container {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
    }
    
    .workflow-steps {
        gap: 8px;
        justify-content: center;
    }
    
    .workflow-step {
        min-width: 60px;
        font-size: 11px;
        padding: 6px 8px;
    }
    
    .workflow-step span {
        display: none;
    }
    
    .step-number {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
    
    .step-arrow {
        font-size: 8px;
    }
    
    .breadcrumb-container {
        top: 80px;
    }
    
    .breadcrumb {
        padding: 0 16px;
        font-size: 12px;
    }
    
    .next-steps-grid {
        grid-template-columns: 1fr;
    }
}

/* Home Button */
.home-button-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.home-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    backdrop-filter: blur(10px);
}

.home-button:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.home-button i {
    font-size: 16px;
}

.home-button span {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .home-button-container {
        top: 15px;
        left: 15px;
    }
    
    .home-button {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .home-button span {
        display: none;
    }
    
    .home-button i {
        font-size: 18px;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.98);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2d3748;
    font-weight: 700;
    font-size: 2.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.lead {
    font-size: 1.2rem;
    color: #4a5568;
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 400;
    line-height: 1.8;
}

.controls {
    margin-bottom: 20px;
    text-align: center;
}

button {
    padding: 12px 24px;
    margin: 0 8px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

button:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Custom modal styles for question tree builder */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.custom-modal.hidden {
    display: none;
}

.custom-modal-content {
    background: white;
    padding: 30px;
    width: 90%;
    max-width: 1000px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-height: 85vh;
    overflow-y: auto;
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin: auto;
    position: relative;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
    font-size: 0.95rem;
}

input, select, textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

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

textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

.custom-modal .form-actions {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Tree Visualization Styles */
.tree-container {
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tree-node {
    position: relative;
    margin: 10px 0;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.tree-node::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 20px;
    width: 2px;
    height: 10px;
    background: #dee2e6;
}

.tree-node:not(:first-child)::after {
    content: '';
    position: absolute;
    top: -10px;
    left: 20px;
    width: 20px;
    height: 2px;
    background: #dee2e6;
}

.tree-node-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.tree-node-info {
    flex: 1;
}

.tree-node-controls {
    margin-left: 10px;
}

.tree-node-controls button {
    padding: 4px 8px;
    font-size: 12px;
    margin-left: 5px;
}

/* Condition Builder Styles */
.condition-builder {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-top: 10px;
}

.condition-help {
    margin-bottom: 10px;
    font-size: 0.95em;
    color: #444;
    background: #eef2fa;
    padding: 8px 12px;
    border-radius: 4px;
}

.field-help {
    margin-top: 5px;
    font-size: 0.9em;
    color: #666;
    line-height: 1.4;
}

.field-help code {
    background: #f1f3f4;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85em;
}

.help-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 16px;
    font-size: 12px;
    font-weight: bold;
    cursor: help;
    margin-left: 5px;
    vertical-align: middle;
}

.condition-group {
    margin-bottom: 0;
    padding: 10px 10px 0 10px;
    background: #fff;
    border: 2px solid #b3d1ff;
    border-radius: 6px;
    position: relative;
}

.group-label {
    font-weight: bold;
    color: #0056b3;
    margin-bottom: 8px;
}

.and-label {
    color: #007bff;
    font-weight: bold;
}

.or-label {
    color: #e67e22;
    font-weight: bold;
}

.or-separator {
    text-align: center;
    color: #e67e22;
    font-weight: bold;
    margin: 8px 0 16px 0;
    font-size: 1.1em;
}

.condition-rows {
    margin-bottom: 8px;
}

.condition-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.condition-row select,
.condition-row input {
    flex: 1;
}

.condition-operator {
    width: 100px;
}

.condition-value {
    flex: 2;
}

.add-condition {
    margin-top: 10px;
}

.condition-group-controls {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.hidden {
    display: none !important;
}

#jsonOutput {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

#jsonContent {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.status-message {
    margin: 10px 0 20px 0;
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 1em;
    display: none;
}
.status-message.success {
    background: #e6f9e6;
    color: #217a21;
    border: 1px solid #b6e6b6;
    display: block;
}
.status-message.error {
    background: #ffeaea;
    color: #b30000;
    border: 1px solid #ffb3b3;
    display: block;
}

/* Repeat Clause Styles */
.repeat-builder {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-top: 10px;
}

.repeat-help {
    margin-bottom: 10px;
    font-size: 0.95em;
    color: #444;
    background: #eef2fa;
    padding: 8px 12px;
    border-radius: 4px;
}

.repeat-fields {
    background: #fff;
    padding: 15px;
    border: 2px solid #b3d1ff;
    border-radius: 6px;
}

.repeat-fields .form-group {
    margin-bottom: 12px;
}

.repeat-fields .form-group:last-child {
    margin-bottom: 0;
}

.repeat-fields input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.repeat-fields input[type="number"] {
    width: 100px;
}

.repeat-toggle {
    margin-bottom: 10px;
}

.repeat-toggle input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.repeat-toggle label {
    display: inline;
    font-weight: bold;
    color: #0056b3;
}

.repeat-info {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    border-left: 3px solid #0056b3;
}

.repeat-info ul {
    list-style: none;
    padding-left: 10px;
    margin: 5px 0;
}

.repeat-info li {
    margin: 5px 0;
    color: #444;
}

.repeat-info strong {
    color: #0056b3;
}

.repeat-section {
    background: #fff;
    padding: 15px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin: 15px 0;
}

.repeat-section h4 {
    color: #0056b3;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 2px solid #e9ecef;
}

.repeat-item {
    background: #f8f9fa;
    padding: 15px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-bottom: 10px;
    position: relative;
}

.repeat-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.repeat-item-title {
    font-weight: bold;
    color: #0056b3;
}

.remove-repeat-item {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
}

.remove-repeat-item:hover {
    background: #c82333;
}

.add-item {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    margin-top: 10px;
}

.add-item:hover {
    background: #218838;
}

#idItemOptionsContainer {
    display: none;
}

#idItemOptionsContainer.visible {
    display: block;
}

/* Repeat Clause Node Styling */
.repeat-clause-node {
    border-left: 4px solid #ff9800;
    background-color: #fff3e0;
}

.repeat-clause-node .tree-node-content {
    background-color: #fffbf0;
}

.condition-toggle {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.condition-toggle input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.condition-toggle label {
    display: inline-block;
    vertical-align: middle;
    margin: 0;
    line-height: 1;
}

#customConditionInput {
    margin-bottom: 15px;
}

#customConditionInput textarea {
    width: 100%;
    min-height: 80px;
    font-family: monospace;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
}

#customConditionInput .condition-help {
    margin-top: 8px;
    font-size: 0.9em;
    color: #666;
}

/* Focused Tree Visualization Styles */
#focusedTreeGraph {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 10px 0;
    overflow: hidden;
}

#focusedTreeGraph .vis-network {
    outline: none;
}

#focusedTreeGraph .vis-node {
    cursor: pointer;
}

#focusedTreeGraph .vis-node:hover {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#focusedTreeGraph .vis-edge {
    cursor: pointer;
}

#focusedTreeGraph .vis-edge:hover {
    stroke-width: 3px;
}

/* Remove the old tree visualization modal styles */
#treeVisualizationModal {
    display: none;
}

/* Navbar styling */
.navbar {
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    background: #1d3557 !important; /* solid dark blue */
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
    color: white !important;
}

.navbar-nav {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

.navbar-nav .nav-item {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}

.navbar-nav .nav-link {
    color: #fff !important;
    background: none;
    border-radius: 2rem;
    padding: 0.5rem 1.5rem !important;
    font-size: 1rem;
    font-weight: 500;
    margin: 0 0.1rem;
    transition: background 0.2s, color 0.2s;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background: rgba(255,255,255,0.12) !important;
    color: #fff !important;
    text-decoration: none;
}

/* Remove bullets from all navs */
ul, ol {
    list-style: none;
}

/* Homepage styling */
.hero-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 60px 40px;
    text-align: center;
    margin-bottom: 60px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

/* Removed heavy hero shimmer animation for better performance */

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #2d3748, #4a5568);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.hero-section .lead {
    font-size: 1.4rem;
    font-weight: 500;
    color: #4a5568;
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

/* Feature cards */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 32px 28px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.feature-card .card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.feature-card .card-title i {
    color: #667eea;
    font-size: 1.5rem;
}

.feature-card .card-description {
    color: #4a5568;
    margin-bottom: 24px;
    line-height: 1.7;
    font-size: 0.95rem;
}

.feature-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.2);
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.feature-btn:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
    transform: translateY(-1px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
    color: white;
    text-decoration: none;
}

.feature-btn i {
    font-size: 16px;
}

/* How it works section */
.how-it-works {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 60px 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.how-it-works h3 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 50px;
    text-align: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.step {
    text-align: center;
    padding: 20px;
    border-radius: 16px;
    transition: transform 0.2s ease;
}

.step:hover {
    transform: translateY(-2px);
}

.step-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
    transition: transform 0.2s ease;
}

.step:hover .step-icon {
    transform: scale(1.05);
}

.step-icon i {
    font-size: 2rem;
    color: white;
}

.step h6 {
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.step p {
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* --- Button Improvements (fixed) --- */
.btn, .btn-primary {
    padding: 0.6rem 1.5rem !important;
    min-width: 120px;
    min-height: 44px;
    font-size: 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(37,99,235,0.08);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.btn-primary {
    color: #fff !important;
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    border: none !important;
}

.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, #1d4ed8, #1e40af) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(37,99,235,0.12);
}

.btn:active {
    color: #fff !important;
    background: #1e40af !important;
}

.btn-primary * {
    color: #fff !important;
}

/* Templates Page Styles */
.templates-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Upload Form Section */
.upload-section {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 32px;
    border: 1px solid #e5e7eb;
}

.upload-form .form-row {
    display: flex;
    gap: 16px;
    align-items: end;
    flex-wrap: wrap;
}

.upload-form .form-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.upload-form .form-group {
    flex: 1;
    min-width: 200px;
}

.upload-form .form-column .form-group {
    flex: none;
    min-width: auto;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
}

.template-name-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    background: white;
}

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

.file-input {
    display: none;
}

.file-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px 16px;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: #f9fafb;
}

.file-label:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.file-button {
    background: #3b82f6;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.file-name {
    color: #6b7280;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.save-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.save-btn:hover:not(:disabled) {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.save-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Templates Grid */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.template-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: all 0.2s ease;
}

.template-card:hover {
    /* Removed hover effect since cards are not clickable */
}

.card-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    min-width: 0;
}

.template-name {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    flex: 1;
    margin-right: 12px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    min-width: 0;
}

.card-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.view-btn, .edit-btn, .delete-btn {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.view-btn {
    color: #6b7280;
}

.view-btn:hover {
    color: #10b981;
    background: #ecfdf5;
}

.edit-btn {
    color: #6b7280;
}

.edit-btn:hover {
    color: #3b82f6;
    background: #eff6ff;
}

.delete-btn {
    color: #6b7280;
}

.delete-btn:hover {
    color: #ef4444;
    background: #fef2f2;
}

.card-body {
    padding: 16px 24px 24px;
}

.template-date {
    color: #6b7280;
    font-size: 14px;
    margin: 0 0 16px 0;
}

.view-details-btn {
    display: inline-flex;
    align-items: center;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s ease;
}

.view-details-btn:hover {
    color: #1d4ed8;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 64px 32px;
    color: #6b7280;
}

.empty-icon {
    margin-bottom: 24px;
    opacity: 0.7;
}

.empty-icon svg {
    stroke: #9ca3af;
}

.empty-state h3 {
    font-size: 20px;
    color: #374151;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 16px;
    margin: 0;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal:not(.hidden) {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

.modal.hidden {
    display: none !important;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    z-index: 1001;
    animation: slideIn 0.2s ease;
}

.modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

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

.modal-body {
    padding: 24px;
}

.modal-body p {
    margin: 0 0 12px 0;
    color: #374151;
}

.warning-text {
    color: #6b7280;
    font-size: 14px;
}

.modal-footer {
    padding: 16px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.btn-danger {
    background: #ef4444;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Bootstrap Button Overrides for Template Detail Page */
.btn.btn-secondary {
    background: #6c757d !important;
    color: white !important;
    border: 1px solid #6c757d !important;
    padding: 8px 16px !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    display: inline-block !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.btn.btn-secondary:hover {
    background: #5a6268 !important;
    border-color: #545b62 !important;
    color: white !important;
}

.btn.btn-danger {
    background: #dc3545 !important;
    color: white !important;
    border: 1px solid #dc3545 !important;
    padding: 8px 16px !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    display: inline-block !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.btn.btn-danger:hover {
    background: #c82333 !important;
    border-color: #bd2130 !important;
    color: white !important;
}

.btn.btn-outline-primary {
    background: transparent !important;
    color: #007bff !important;
    border: 1px solid #007bff !important;
    padding: 6px 12px !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    display: inline-block !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.btn.btn-outline-primary:hover {
    background: #007bff !important;
    color: white !important;
}

.btn.btn-success {
    background: #28a745 !important;
    color: white !important;
    border: 1px solid #28a745 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .upload-form .form-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .upload-form .form-column {
        gap: 16px;
    }
    
    .upload-form .form-group {
        min-width: unset;
    }
    
    .templates-grid {
        grid-template-columns: 1fr;
    }
    
    .templates-container {
        padding: 16px;
    }
    
    .upload-section {
        padding: 20px;
        margin-bottom: 24px;
    }
}

/* Chart-specific styles */
.chart-card {
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 20px;
    transition: all 0.2s ease;
    height: fit-content;
}

.chart-card:hover {
    /* Removed hover effect since cards are not clickable */
}

.chart-viewer {
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.chart-header {
    background: #f8f9fa;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.chart-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.chart-content {
    padding: 20px;
    max-height: 600px;
    overflow-y: auto;
    line-height: 1.6;
    color: #374151;
    white-space: pre-wrap;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 14px;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.meta-info {
    color: #6b7280;
    font-size: 14px;
    margin: 4px 0 0 0;
}

.card-preview {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
    margin: 12px 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

/* Enhanced Card Styles */
.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    overflow: hidden;
}

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

.card-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    padding: 20px 24px;
    border-radius: 16px 16px 0 0;
}

.card-header h5 {
    color: #2d3748;
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body {
    padding: 24px;
}



/* Alert Enhancements */
.alert {
    border-radius: 12px;
    border: none;
    padding: 16px 20px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.alert-success {
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.1), rgba(56, 161, 105, 0.1));
    color: #2f855a;
    border: 1px solid rgba(72, 187, 120, 0.2);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(237, 137, 54, 0.1), rgba(221, 107, 32, 0.1));
    color: #c05621;
    border: 1px solid rgba(237, 137, 54, 0.2);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(245, 101, 101, 0.1), rgba(229, 62, 62, 0.1));
    color: #c53030;
    border: 1px solid rgba(245, 101, 101, 0.2);
}

.alert-info {
    background: linear-gradient(135deg, rgba(66, 153, 225, 0.1), rgba(49, 130, 206, 0.1));
    color: #2c5282;
    border: 1px solid rgba(66, 153, 225, 0.2);
}

.alert-close {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    opacity: 0.7;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 4px;
    margin-left: 10px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
}

.alert-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.1);
    transform: none;
    box-shadow: none;
}

.alert {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Form Enhancements */
.form-select, .form-control {
    border-radius: 12px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    padding: 12px 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

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

.form-label {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

/* Button Enhancements */
.btn {
    border-radius: 50px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    color: white;
}

.btn-outline-primary {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
    box-shadow: none;
}

.btn-outline-primary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-outline-secondary {
    background: transparent;
    color: #6c757d;
    border: 2px solid #6c757d;
    box-shadow: none;
}

.btn-outline-secondary:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

/* Table Enhancements */
.table {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.9);
}

.table thead th {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border: none;
    color: #2d3748;
    font-weight: 700;
    padding: 16px;
    font-size: 0.9rem;
}

.table tbody td {
    border: none;
    padding: 16px 12px;
    vertical-align: middle;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.table tbody td .d-flex {
    align-items: center;
}

.table tbody td .badge {
    line-height: 1.2;
}

.table tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.table-striped tbody tr:nth-of-type(odd) {
    background: rgba(248, 250, 252, 0.5);
}

/* Badge Enhancements */
.badge {
    border-radius: 50px;
    padding: 6px 12px;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.badge.bg-success {
    background: linear-gradient(135deg, #48bb78, #38a169) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #ed8936, #dd6b20) !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #f56565, #e53e3e) !important;
}

.badge.bg-secondary {
    background: linear-gradient(135deg, #a0aec0, #718096) !important;
}

/* Empty State Enhancement */
.text-center.text-muted {
    padding: 60px 40px;
    background: rgba(248, 250, 252, 0.5);
    border-radius: 16px;
    border: 2px dashed rgba(102, 126, 234, 0.2);
}

.text-center.text-muted i {
    color: #667eea;
    margin-bottom: 20px;
}

.text-center.text-muted h5 {
    color: #4a5568;
    font-weight: 600;
    margin-bottom: 10px;
}

.text-center.text-muted p {
    color: #718096;
}

/* User Status and Auth Enhancements */
.user-status {
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 40px;
}

.user-info, .auth-buttons {
    text-align: right;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.user-info span {
    margin-right: 15px;
    font-weight: 600;
    color: #4a5568;
    text-shadow: none;
}

.auth-btn {
    display: inline-block;
    padding: 10px 20px;
    margin-left: 12px;
    text-decoration: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.login-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: rgba(102, 126, 234, 0.5);
}

.login-btn:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.signup-btn {
    background: rgba(72, 187, 120, 0.9);
    color: white;
    border-color: rgba(72, 187, 120, 1);
}

.signup-btn:hover {
    background: rgba(56, 161, 105, 1);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.4);
}

.logout-btn {
    background: rgba(245, 101, 101, 0.9);
    color: white;
    border-color: rgba(245, 101, 101, 1);
}

.logout-btn:hover {
    background: rgba(229, 62, 62, 1);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 101, 101, 0.4);
}

.admin-btn {
    background: rgba(102, 126, 234, 0.9);
    color: white;
    border-color: rgba(102, 126, 234, 1);
}

.admin-btn:hover {
    background: rgba(90, 111, 216, 1);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.docs-btn {
    background: rgba(245, 158, 11, 0.9);
    color: white;
    border-color: rgba(245, 158, 11, 1);
}

.docs-btn:hover {
    background: rgba(217, 119, 6, 1);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.home-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: rgba(102, 126, 234, 0.5);
}

.home-btn:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Info Section for Unauthenticated Users */
.info-section {
    margin: 60px 0;
}

.info-card {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.info-card h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.info-card p {
    font-size: 1.1rem;
    color: #4a5568;
    margin-bottom: 30px;
    line-height: 1.7;
}

.auth-buttons-large {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.auth-btn-large {
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 140px;
    text-align: center;
}

.auth-btn-large.signup-btn {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.3);
}

.auth-btn-large.signup-btn:hover {
    background: linear-gradient(135deg, #38a169, #2f855a);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(72, 187, 120, 0.4);
    color: white;
}

.auth-btn-large.login-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.auth-btn-large.login-btn:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
    color: white;
}

/* Analysis Page Enhancements */
.page-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.page-header h1 i {
    color: #667eea;
}

.usage-stats-inline {
    display: flex;
    gap: 32px;
    align-items: center;
    flex-wrap: wrap;
}

.usage-stat-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.usage-stat-inline strong {
    font-size: 1rem;
    font-weight: 700;
}

/* Analysis page section spacing */
.analysis-section {
    margin-bottom: 2.5rem;
}

.analysis-section:last-child {
    margin-bottom: 0;
}

/* Enhanced card body spacing for analysis page */
.analysis-page .card-body {
    padding: 2rem;
}

.analysis-page .card-header {
    padding: 1.5rem 2rem;
}

/* Specific spacing for analysis page cards */
.analysis-page .card.mb-5 {
    margin-bottom: 3rem !important;
}

.analysis-page .card.mt-5 {
    margin-top: 3rem !important;
}



.analysis-page .alert {
    padding: 1.25rem 1.5rem;
}

/* Analysis page form improvements */
.analysis-page .form-actions {
    margin-top: 2.5rem;
    padding-top: 2rem;
}

.analysis-page .mb-3 {
    margin-bottom: 1.75rem !important;
}

.analysis-page #tokenEstimate {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.usage-stat {
    text-align: center;
    padding: 10px;
}

.usage-stat .stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d3748;
    margin-top: 4px;
}

.form-actions {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 700;
}

/* Modal Positioning Fix */

/* Ensure modal content is always visible */
@media (max-height: 600px) {
    .custom-modal {
        align-items: flex-start;
        padding-top: 40px;
    }
    
    .custom-modal-content {
        max-height: calc(100vh - 80px);
        margin-top: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section .lead {
        font-size: 1.2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .feature-card {
        padding: 24px 20px;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .how-it-works {
        padding: 40px 20px;
    }
    
    .how-it-works h3 {
        font-size: 1.8rem;
    }
    
    .container {
        padding: 20px;
    }
    
    .page-header h1 {
        font-size: 2rem;
        flex-direction: column;
        text-align: center;
    }
    
    .page-header h1 i {
        margin-bottom: 10px;
    }
    
    /* Mobile modal adjustments */
    .custom-modal {
        padding: 10px;
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .custom-modal-content {
        width: 95%;
        max-height: calc(100vh - 40px);
        padding: 20px;
    }
    
    /* Mobile usage stats */
    .usage-stats-inline {
        gap: 16px;
        justify-content: center;
        margin-top: 12px;
    }
    
    .usage-stat-inline {
        font-size: 0.85rem;
    }
}

/* Dashboard Workflow Progress */
.workflow-progress-section {
    margin-bottom: 40px;
}

.workflow-progress-section h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    color: #2d3748;
    font-size: 24px;
    font-weight: 600;
}

.workflow-progress-section h3 i {
    color: #667eea;
    font-size: 24px;
}

.progress-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.progress-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.progress-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.progress-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.progress-icon i {
    color: white;
    font-size: 24px;
}

.progress-content h4 {
    color: #2d3748;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.progress-stats {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 16px;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
    line-height: 1;
}

.stat-label {
    color: #718096;
    font-size: 14px;
    font-weight: 500;
}

.progress-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.progress-actions .btn {
    font-size: 14px;
    padding: 8px 16px;
}

.progress-actions .text-muted {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #a0aec0;
    font-size: 14px;
    font-style: italic;
}

/* Token Usage Section */
.token-usage-section {
    margin-bottom: 40px;
}

.token-usage-section h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: #2d3748;
    font-size: 20px;
    font-weight: 600;
}

.token-usage-section h3 i {
    color: #f6ad55;
    font-size: 20px;
}

.token-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.token-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.token-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.token-number {
    font-size: 28px;
    font-weight: 700;
    color: #38a169;
    line-height: 1;
}

.token-label {
    color: #718096;
    font-size: 14px;
    font-weight: 500;
    margin-top: 4px;
}

.token-progress {
    flex: 1;
    max-width: 300px;
}

.progress-text {
    display: block;
    text-align: center;
    color: #718096;
    font-size: 12px;
    margin-top: 8px;
}

/* Recent Activity Section */
.recent-activity-section {
    margin-bottom: 40px;
}

.activity-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.activity-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.activity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.activity-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #2d3748;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.activity-header h3 i {
    color: #667eea;
    font-size: 18px;
}

.view-all-btn {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.view-all-btn:hover {
    color: #5a6fd8;
    text-decoration: none;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f7fafc;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-content {
    flex: 1;
}

.activity-content h4 {
    color: #2d3748;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.activity-preview {
    color: #718096;
    font-size: 13px;
    margin: 4px 0;
    line-height: 1.4;
}

.activity-date {
    color: #a0aec0;
    font-size: 12px;
    margin: 0;
}

.activity-actions {
    display: flex;
    gap: 8px;
}

.btn-small {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7fafc;
    color: #4a5568;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-small:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
}

.empty-activity {
    text-align: center;
    padding: 40px 20px;
}

.empty-activity i {
    font-size: 48px;
    color: #cbd5e0;
    margin-bottom: 16px;
}

.empty-activity p {
    color: #718096;
    margin-bottom: 16px;
}

.empty-activity .btn {
    font-size: 14px;
    padding: 8px 16px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .progress-cards {
        grid-template-columns: 1fr;
    }
    
    .activity-grid {
        grid-template-columns: 1fr;
    }
    
    .token-stats {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .token-progress {
        max-width: 100%;
    }
    
    .activity-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .activity-actions {
        align-self: flex-end;
    }
}

/* Create Section Styles */
.create-section {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.section-header {
    text-align: center;
    margin-bottom: 24px;
}

.section-header h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #2d3748;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.section-header h3 i {
    color: #667eea;
    font-size: 24px;
}

.section-header p {
    color: #718096;
    font-size: 16px;
    margin: 0;
}

.create-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.create-divider {
    color: #a0aec0;
    font-weight: 500;
    font-size: 16px;
}

/* Templates Section */
.templates-section {
    margin-bottom: 32px;
}

.templates-section .section-header {
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.templates-section .section-header h3 {
    justify-content: flex-start;
    margin-bottom: 4px;
}

/* Prerequisites Section */
.prerequisite-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.prerequisite-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: white;
}

.prerequisite-icon i {
    font-size: 20px;
}

.prerequisite-content h6 {
    color: #2d3748;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.prerequisite-content p {
    color: #718096;
    font-size: 14px;
    margin: 0 0 12px 0;
}

/* Button enhancements */
.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.page-header h1 {
    color: #2d3748;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.page-header h1 i {
    color: #667eea;
    font-size: 32px;
}

.page-header .lead {
    color: #718096;
    font-size: 18px;
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Home Button */
.home-button-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

/* PHI Warning */
.phi-warning-notice {
    background: #fffbeb;
    border: 1px solid #f6e05e;
    border-left: 4px solid #f39c12;
    padding: 24px;
    margin-bottom: 32px;
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.warning-icon {
    flex-shrink: 0;
    color: #d68910;
}

.warning-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #8b4513;
}

.warning-main {
    color: #744210;
    margin-bottom: 16px;
    font-weight: 500;
}

.deidentification-details {
    font-size: 0.875rem;
}

.phi-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 4px;
    margin: 8px 0 12px 0;
    color: #744210;
}

.harbor-link a {
    color: #667eea;
    font-weight: 500;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;
}

.modal.hidden {
    opacity: 0;
    visibility: hidden;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.modal-content {
    background: white;
    padding: 0;
    width: 90%;
    max-width: 500px;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    transform: scale(1);
    transition: transform 0.3s ease;
}

.modal.hidden .modal-content {
    transform: scale(0.9);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
    color: #2d3748;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #a0aec0;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f7fafc;
    color: #4a5568;
}

.modal-body {
    padding: 24px;
}

.modal-body p {
    margin-bottom: 12px;
    color: #4a5568;
}

.warning-text {
    color: #e53e3e;
    font-size: 0.875rem;
    font-style: italic;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 16px 24px 24px 24px;
    border-top: 1px solid #e2e8f0;
}

/* PHI Warning Modal Styles */
.phi-alert {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 10px;
    background: rgba(220, 53, 69, 0.05);
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 8px;
    margin-bottom: 10px;
}

.phi-alert-icon {
    flex-shrink: 0;
    color: #dc3545;
    font-size: 24px;
    margin-top: 2px;
}

.phi-alert-content {
    flex: 1;
}

.phi-alert-content p {
    margin: 0 0 12px 0;
    color: #721c24;
    font-weight: 500;
}

.phi-patterns-list {
    background: rgba(220, 53, 69, 0.08);
    border-radius: 6px;
    padding: 12px 16px;
    margin: 12px 0;
    list-style: none;
}

.phi-patterns-list li {
    color: #dc3545;
    font-weight: 600;
    margin: 4px 0;
    position: relative;
    padding-left: 16px;
}

.phi-patterns-list li::before {
    content: "•";
    color: #dc3545;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.phi-warning-text {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(220, 53, 69, 0.2);
}

.phi-warning-text p {
    margin: 0 0 8px 0;
    color: #721c24;
    font-weight: 600;
}

.phi-warning-text ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.phi-warning-text li {
    color: #6c757d;
    font-weight: 400;
    margin: 4px 0;
    line-height: 1.4;
}

#phiWarningModal .modal-content {
    max-width: 600px;
}

#phiWarningModal .modal-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

#phiWarningModal .btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#phiWarningModal .btn-danger:hover {
    background: #c82333;
}

/* Analysis Page Styles */
.analysis-page {
    width: 100%;
}

.prerequisite-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.prerequisite-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: white;
}

.prerequisite-icon i {
    font-size: 20px;
}

.prerequisite-content h6 {
    color: #2d3748;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.prerequisite-content p {
    color: #718096;
    font-size: 14px;
    margin: 0 0 12px 0;
}

/* Card Styles */
.card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
}

.card-header h5 {
    color: #2d3748;
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body {
    padding: 24px;
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
    margin: -24px;
    padding: 24px;
}

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

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.table th {
    background: #f7fafc;
    font-weight: 600;
    color: #2d3748;
    font-size: 0.875rem;
}

.table tbody tr:hover {
    background: #f7fafc;
}

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

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
}

.badge.bg-success {
    background: #c6f6d5;
    color: #22543d;
}

.badge.bg-warning {
    background: #fef5e7;
    color: #744210;
}

.badge.bg-danger {
    background: #fed7d7;
    color: #742a2a;
}

.badge.bg-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.badge.bg-info {
    background: #bee3f8;
    color: #2c5282;
}

.badge.bg-primary {
    background: #e6fffa;
    color: #234e52;
}

/* Text Utilities */
.text-muted {
    color: #a0aec0;
}

.text-success {
    color: #38a169;
}

.text-warning {
    color: #d69e2e;
}

.text-danger {
    color: #e53e3e;
}

.text-info {
    color: #3182ce;
}

.text-primary {
    color: #667eea;
}

/* Spinner */
.spinner-border {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 50%;
    border-top: 2px solid #667eea;
    animation: spin 1s linear infinite;
}

.spinner-border-sm {
    width: 0.875rem;
    height: 0.875rem;
}

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

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Form Row */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -12px;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 12px;
    margin-bottom: 16px;
}

.col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 0 12px;
}

.col-md-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
    padding: 0 12px;
}

.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 12px;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-top: 24px;
}

/* Utility Classes */
.d-flex {
    display: flex;
}

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

.justify-content-between {
    justify-content: space-between;
}

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

.text-end {
    text-align: right;
}

.mb-0 { margin-bottom: 0; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }
.mt-5 { margin-top: 3rem; }
.me-1 { margin-right: 0.25rem; }
.me-2 { margin-right: 0.5rem; }
.me-3 { margin-right: 1rem; }
.ms-2 { margin-left: 0.5rem; }
.ms-3 { margin-left: 1rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }

/* Mobile Responsive Updates */
@media (max-width: 768px) {
    body {
        padding-top: 120px;
    }
    
    .navbar-container {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
    }
    
    .workflow-steps {
        gap: 8px;
        justify-content: center;
    }
    
    .workflow-step {
        min-width: 60px;
        font-size: 11px;
        padding: 6px 8px;
    }
    
    .workflow-step span {
        display: none;
    }
    
    .step-number {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
    
    .step-arrow {
        font-size: 8px;
    }
    
    .breadcrumb-container {
        top: 80px;
    }
    
    .breadcrumb {
        padding: 0 16px;
        font-size: 12px;
    }
    
    .container {
        padding: 24px;
        margin: 0 16px;
    }
    
    .page-header h1 {
        font-size: 2rem;
        flex-direction: column;
        gap: 8px;
    }
    
    .page-header .lead {
        font-size: 1rem;
    }
    
    .progress-cards {
        grid-template-columns: 1fr;
    }
    
    .activity-grid {
        grid-template-columns: 1fr;
    }
    
    .next-steps-grid {
        grid-template-columns: 1fr;
    }
    
    .templates-grid {
        grid-template-columns: 1fr;
    }
    
    .token-stats {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .token-progress {
        max-width: 100%;
    }
    
    .activity-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .activity-actions {
        align-self: flex-end;
    }
    
    .create-actions {
        flex-direction: column;
        gap: 16px;
    }
    
    .phi-warning-notice {
        flex-direction: column;
        gap: 12px;
    }
    
    .phi-items {
        grid-template-columns: 1fr;
    }
    
    .row {
        margin: 0;
    }
    
    .col-md-6,
    .col-md-4,
    .col-md-8 {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .modal-content {
        margin: 20px;
        width: calc(100% - 40px);
    }
}

@media (max-width: 480px) {
    .home-button-container {
        top: 15px;
        left: 15px;
    }
    
    .home-button span {
        display: none;
    }
    
    .container {
        margin: 0 8px;
        padding: 16px;
    }
    
    .modal-content {
        margin: 10px;
        width: calc(100% - 20px);
    }
}