/* CSS Variables */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --background-color: #ffffff;
    --surface-color: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-color);
}

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

/* Navigation */
.navbar {
    background: white;
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-brand i {
    margin-right: 10px;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    padding: 8px 16px;
    border-radius: var(--border-radius);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background-color: var(--surface-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 120px 0 80px;
    margin-top: 70px;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.hero-meta span {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

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

.hero-image i {
    font-size: 12rem;
    opacity: 0.2;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: var(--surface-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

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

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

/* Main Content */
.main-content {
    padding: 80px 0;
}

section {
    margin-bottom: 80px;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    color: var(--text-primary);
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

h4 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.feature-card {
    background: white;
    padding: 40px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
}

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

.feature-card h3 {
    margin-bottom: 20px;
}

.feature-card p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.7;
}

.feature-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.feature-link:hover {
    background: var(--primary-color);
    color: white;
}

/* Technical Stack */
.technical-stack {
    background: var(--surface-color);
    padding: 80px 0;
}

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

.stack-category {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.stack-category h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.stack-category ul {
    list-style: none;
}

.stack-category li {
    padding: 10px 0;
    display: flex;
    align-items: center;
    color: var(--text-secondary);
}

.stack-category li i {
    margin-right: 12px;
    width: 20px;
    color: var(--primary-color);
}

/* Key Features */
.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 30px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.feature-item:hover {
    box-shadow: var(--shadow-md);
}

.feature-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-top: 5px;
}

.feature-item h4 {
    margin-bottom: 8px;
}

.feature-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Quick Start */
.quick-start {
    background: var(--surface-color);
    padding: 80px 0;
}

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

.quick-start-item {
    background: white;
    padding: 40px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    text-align: center;
    position: relative;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 20px;
}

.quick-start-item h3 {
    margin-bottom: 15px;
}

.quick-start-item p {
    color: var(--text-secondary);
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Code Blocks */
.code-block {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin: 20px 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
}

.code-block pre {
    margin: 0;
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--surface-color);
    font-weight: 600;
    color: var(--text-primary);
}

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

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 60px 0 20px;
}

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

.footer-section h4 {
    color: white;
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 8px;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid var(--secondary-color);
    padding-top: 20px;
    text-align: center;
    color: var(--text-secondary);
}

/* API Endpoints Styling */
.api-config {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.config-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid var(--primary-color);
}

.config-item strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
}

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

.endpoint-list {
    margin-top: 1rem;
}

.endpoint-item {
    border: 1px solid #e9ecef;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.endpoint-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    gap: 1rem;
}

.http-method {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.875rem;
    min-width: 60px;
    text-align: center;
}

.http-method.get { background: #28a745; color: white; }
.http-method.post { background: #007bff; color: white; }
.http-method.put { background: #ffc107; color: #212529; }
.http-method.delete { background: #dc3545; color: white; }

.endpoint-path {
    font-family: 'Courier New', monospace;
    background: #e9ecef;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: bold;
}

.endpoint-desc {
    color: #6c757d;
    flex-grow: 1;
}

.response-formats, .authentication-section, .error-codes {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.response-section {
    margin-bottom: 2rem;
}

.error-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.error-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #dc3545;
}

.error-item strong {
    color: #dc3545;
    display: block;
    margin-bottom: 0.5rem;
}

/* Forms Styling */
.forms-nav {
    margin-bottom: 2rem;
}

.nav-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-pill {
    padding: 0.75rem 1.5rem;
    border: none;
    background: #f8f9fa;
    color: #6c757d;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-pill:hover {
    background: #e9ecef;
    color: #495057;
}

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

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

.form-section.active {
    display: block;
}

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

.form-group h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.field-categories {
    display: grid;
    gap: 2rem;
    margin-top: 1.5rem;
}

.field-category {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.field-category h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.field-list {
    display: grid;
    gap: 0.75rem;
}

.field-item {
    display: grid;
    grid-template-columns: 1fr auto auto 2fr;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.field-name {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #495057;
}

.field-type {
    font-family: 'Courier New', monospace;
    background: #e9ecef;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.875rem;
    color: #6c757d;
}

.field-required {
    background: #dc3545;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: bold;
}

.field-optional {
    background: #6c757d;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: bold;
}

.field-desc {
    color: #6c757d;
    font-size: 0.875rem;
}

.field-desc-block {
    background: #e7f3ff;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border-left: 4px solid #007bff;
}

.field-desc-block ul {
    margin: 0.5rem 0 0 1rem;
}

.field-desc-block li {
    margin-bottom: 0.25rem;
}

/* Work Status Styling */
.work-status-guide {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 6px;
    margin-bottom: 2rem;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
}

.status-item.working { background: #d4edda; border: 2px solid #28a745; }
.status-item.standby { background: #fff3cd; border: 2px solid #ffc107; }
.status-item.not-working { background: #f8d7da; border: 2px solid #dc3545; }
.status-item.transport-going { background: #d1ecf1; border: 2px solid #17a2b8; }
.status-item.transport-back { background: #e2e3e5; border: 2px solid #6c757d; }

.status-code {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.status-name {
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.status-desc {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Approval Workflow Styling */
.approval-workflow {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.workflow-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.workflow-step {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: white;
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-content h5 {
    margin: 0 0 0.5rem 0;
    color: var(--primary-color);
}

.step-content p {
    margin: 0;
    color: #6c757d;
}

/* Evaluation Categories */
.evaluation-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.eval-category {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.eval-category h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.eval-category ul {
    margin: 0;
    padding-left: 1.5rem;
}

.eval-category li {
    margin-bottom: 0.5rem;
}

/* Filter Options */
.filter-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.filter-group {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.filter-group h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.filter-group ul {
    margin: 0.5rem 0 0 1rem;
}

/* Inspection Types */
.inspection-types {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 6px;
    margin-bottom: 2rem;
}

.type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.type-item {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: white;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    text-align: center;
}

.type-name {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.type-desc {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Authentication Styling */
.permissions-table {
    overflow-x: auto;
    margin: 1.5rem 0;
}

.permissions-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.permissions-table th,
.permissions-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.permissions-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.permissions-table tr:hover {
    background: #f8f9fa;
}

.permission-yes {
    color: #28a745;
    font-size: 1.2rem;
}

.permission-no {
    color: #dc3545;
    font-size: 1.2rem;
}

.permission-partial {
    background: #fff3cd;
    color: #856404;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Workflow Diagram */
.workflow-diagram {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.workflow-level {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.level-header h3 {
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
}

.level-header p {
    color: #6c757d;
    margin: 0;
    font-style: italic;
}

.level-details {
    margin-top: 1rem;
}

.level-details ul {
    margin: 0;
    padding-left: 1.5rem;
}

.level-details li {
    margin-bottom: 0.5rem;
    color: #495057;
}

.workflow-arrow {
    text-align: center;
    margin: 1rem 0;
}

.workflow-arrow i {
    font-size: 2rem;
    color: var(--primary-color);
}

/* Header Descriptions */
.header-descriptions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.header-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.header-item h4 {
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
    font-family: 'Courier New', monospace;
}

.header-item p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Security Features */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.feature-item {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.feature-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-item p {
    color: #6c757d;
    margin: 0;
}

/* Integration Grid */
.integration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.integration-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.integration-item h3 {
    color: var(--primary-color);
    margin: 0 0 1rem 0;
}

.integration-item p {
    margin: 0;
    color: #6c757d;
}

/* Enhanced JavaScript functionality styles */

/* Table search functionality */
.table-search-container {
    margin-bottom: 1rem;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 400px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    color: #6c757d;
    z-index: 1;
}

.table-search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.table-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.clear-search {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 3px;
    transition: color 0.3s ease;
}

.clear-search:hover {
    color: #dc3545;
}

/* Enhanced code blocks */
.code-block.with-line-numbers pre {
    padding-left: 3rem;
}

.line-number {
    position: absolute;
    left: 0;
    width: 2.5rem;
    text-align: right;
    color: #6c757d;
    font-size: 0.8rem;
    opacity: 0.7;
    user-select: none;
}

.code-language-label {
    position: absolute;
    top: 0.5rem;
    right: 3rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

/* Progress indicator */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.1s ease;
}

/* Enhanced mobile navigation */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 3px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Enhanced hover effects */
.field-item:hover {
    background: #f8f9fa;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.status-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Enhanced tooltips */
.field-item[title]:hover {
    position: relative;
}

.field-item[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    animation: tooltipFadeIn 0.3s ease forwards;
}

.field-item[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    opacity: 0;
    animation: tooltipFadeIn 0.3s ease forwards;
}

@keyframes tooltipFadeIn {
    to {
        opacity: 1;
    }
}

/* Sort icons enhancement */
.sort-icon {
    transition: all 0.3s ease;
}

th:hover .sort-icon {
    opacity: 0.8 !important;
    transform: scale(1.1);
}

/* No results message styling */
.no-results-row td {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
}

/* Copy button enhancements */
.copy-btn {
    transition: all 0.3s ease;
}

.copy-btn:hover {
    transform: scale(1.05);
}

.copy-btn:active {
    transform: scale(0.95);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Smooth animations for form sections */
.form-section {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.form-section.active {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced focus states */
.nav-pill:focus,
.table-search-input:focus,
.copy-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .nav-toggle,
    .copy-btn,
    .table-search-container,
    .reading-progress {
        display: none !important;
    }
    
    .form-section {
        display: block !important;
        page-break-inside: avoid;
    }
    
    .workflow-step,
    .field-category,
    .feature-item {
        page-break-inside: avoid;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .field-item,
    .status-item,
    .workflow-step {
        border-width: 2px;
    }
    
    .permission-partial {
        background: #fff;
        border: 2px solid #856404;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .form-section {
        transition: none;
    }
    
    .field-item:hover,
    .status-item:hover,
    .feature-item:hover {
        transform: none;
    }
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --text-color: #e0e0e0;
        --card-bg: #2d2d2d;
        --border-color: #404040;
    }
    
    .field-item,
    .status-item,
    .workflow-step,
    .feature-item {
        background: var(--card-bg);
        border-color: var(--border-color);
        color: var(--text-color);
    }
    
    .table-search-input {
        background: var(--card-bg);
        color: var(--text-color);
        border-color: var(--border-color);
    }
}

/* Mobile-specific enhancements */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 2rem;
        transition: left 0.3s ease;
        z-index: 999;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 1rem 0;
        width: 90%;
        text-align: center;
    }
    
    .nav-menu a {
        display: block;
        padding: 1rem;
        border-radius: 8px;
        transition: background-color 0.3s ease;
    }
    
    .nav-menu a:hover,
    .nav-menu a.active {
        background: var(--primary-color);
        color: white;
    }
    
    body.nav-open {
        overflow: hidden;
    }
    
    /* Mobile-specific form enhancements */
    .search-box {
        max-width: 100%;
    }
    
    .code-language-label {
        right: 1rem;
        top: 1rem;
    }
    
    .workflow-step {
        padding: 1rem;
    }
    
    .step-number {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    
    /* Touch-friendly interactive elements */
    .copy-btn,
    .clear-search,
    .nav-pill {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Architecture Diagram Enhancements */
.architecture-diagram {
    margin: 3rem 0;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

/* Enhanced Architecture Page Spacing */
.architecture-overview {
    padding: 3rem 0;
}

.architecture-overview h2 {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--primary-color);
    color: var(--text-primary);
}

.architecture-section {
    margin-bottom: 4rem;
    padding: 2rem 0;
}

.architecture-section h3 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.8rem;
}

.architecture-section h4 {
    margin: 2rem 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 600;
}

.architecture-content {
    padding: 1.5rem 0;
    line-height: 1.8;
}

.architecture-content p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.architecture-list {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.architecture-list li {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.architecture-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.architecture-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.architecture-card h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
}

.architecture-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0;
}

/* Enhanced code blocks for architecture */
.architecture-section pre {
    margin: 2rem 0;
    border-radius: 8px;
    background: #1e293b !important;
    border: 1px solid var(--border-color);
}

.architecture-section code {
    font-size: 0.9rem;
    line-height: 1.6;
}

.architecture-legend {
    margin-top: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-md);
}

.architecture-legend h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.legend-item:hover {
    background: #f1f5f9;
    transform: translateX(4px);
}

.legend-color {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.legend-line {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    flex-shrink: 0;
}

.legend-line.solid {
    background: #3b82f6;
}

.legend-line.dashed {
    background: linear-gradient(to right, #8b5cf6 40%, transparent 40%);
    background-size: 10px 4px;
    background-repeat: repeat-x;
}

.legend-item span {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.4;
}

/* SVG Responsiveness */
.architecture-diagram svg {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
}

/* Page header spacing for architecture */
.page-header {
    padding: 3rem 0 2rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 700;
}

.page-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Mobile responsiveness for architecture */
@media (max-width: 768px) {
    .architecture-diagram {
        padding: 1rem;
        margin: 2rem 0;
    }
    
    .architecture-diagram svg {
        height: 400px;
    }
    
    .architecture-section {
        padding: 1.5rem 0;
        margin-bottom: 3rem;
    }
    
    .architecture-section h3 {
        font-size: 1.5rem;
    }
    
    .architecture-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .architecture-card {
        padding: 1.5rem;
    }
    
    .legend-grid {
        grid-template-columns: 1fr;
    }
    
    .legend-item {
        justify-content: flex-start;
        padding: 0.75rem;
    }
    
    .page-header {
        padding: 2rem 0 1.5rem 0;
    }
    
    .page-header h1 {
        font-size: 2.2rem;
    }
    
    .page-description {
        font-size: 1.1rem;
    }
    
    .architecture-overview {
        padding: 2rem 0;
    }
    
    .architecture-legend {
        padding: 1.5rem;
        margin-top: 2rem;
    }
}

/* Planning & Backlog Page Styles */

/* Sprint Overview */
.sprint-overview {
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.sprint-header h2 {
    margin-bottom: 2rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sprint-info {
    display: flex;
    justify-content: center;
}

.sprint-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    min-width: 400px;
    text-align: center;
}

.sprint-card h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: white;
}

.sprint-dates {
    margin-bottom: 1.5rem;
    opacity: 0.9;
    font-size: 1rem;
}

.sprint-progress {
    margin-bottom: 1.5rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--success-color);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9rem;
    opacity: 0.9;
}

.sprint-stats {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
}

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

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Epic Overview */
.epic-overview {
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.epic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.epic-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

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

.epic-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1rem;
}

.epic-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.epic-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-in-progress {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

.status-planned {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.status-backlog {
    background: rgba(100, 116, 139, 0.1);
    color: var(--secondary-color);
}

.epic-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.epic-progress {
    margin-bottom: 1rem;
}

.epic-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

/* Backlog Management */
.backlog-management {
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.backlog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.backlog-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

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

.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: white;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Epic Sections */
.epic-section {
    margin-bottom: 3rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.epic-title {
    background: var(--surface-color);
    padding: 1rem 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-size: 1.2rem;
    border-bottom: 1px solid var(--border-color);
}

.story-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: normal;
    margin-left: auto;
}

.story-list {
    padding: 1rem;
}

/* Story Cards */
.story-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.story-card:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-color);
}

.story-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.story-id {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: var(--text-primary);
    background: var(--surface-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.story-points {
    background: #dbeafe;
    color: #1e40af;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
}

.priority {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.priority.critical {
    background: #fee2e2;
    color: #991b1b;
}

.priority.high {
    background: #fef3c7;
    color: #92400e;
}

.priority.medium {
    background: #dbeafe;
    color: #1e40af;
}

.priority.low {
    background: #d1fae5;
    color: #065f46;
}

.story-card h4 {
    margin: 0.5rem 0;
    font-size: 1.1rem;
    color: #1f2937;
    line-height: 1.4;
}

.story-card p {
    margin: 0.5rem 0 1rem 0;
    color: #6b7280;
    line-height: 1.5;
}

.acceptance-criteria, .tasks {
    margin-top: 1rem;
}

.acceptance-criteria strong, .tasks strong {
    color: #374151;
    font-weight: 600;
}

.acceptance-criteria ul, .tasks ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.5rem;
}

.acceptance-criteria li, .tasks li {
    margin: 0.25rem 0;
    color: #4b5563;
}

/* Sprint Planning */
.sprint-planning {
    margin: 3rem 0;
    background: #f8fafc;
    padding: 2rem;
    border-radius: 8px;
}

/* Developer Assignment Styles */
.epic-dev {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.dev-assignment {
    background: #f3f4f6;
    color: #374151;
    padding: 0.2rem 0.6rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #d1d5db;
}
