/* Modern Office-like Color Palette */
:root {
    /* Layout tokens */
    --navbar-height: 4rem; /* 64px - altura fija del navbar */
    
    /* Brand tokens */
    --brand-primary: #0F6CBD;    /* Office blue */
    --brand-primary-600: #0B5CAD;
    --brand-primary-700: #094C8F;
    --brand-accent:  #D83B01;    /* Office orange */
    --brand-success: #107C10;
    --brand-warning: #FDE300;
    --brand-danger:  #D13438;

    /* Neutrals for light UI */
    --color-white: #FFFFFF;
    --color-bg: #F7F8FA;
    --color-surface: #FFFFFF;
    --color-border: #E4E7EB;
    --text-primary: #1F2937;
    --text-secondary: #4B5563;
    --text-muted: #6B7280;

    /* Legacy grayscale (compat) */
    --color-gray-50: #F9FAFB;
    --color-gray-100: #F3F4F6;
    --color-gray-200: #E5E7EB;
    --color-gray-300: #D1D5DB;
    --color-gray-400: #9CA3AF;
    --color-gray-500: #6B7280;
    --color-gray-600: #4B5563;
    --color-gray-700: #374151;
    --color-gray-800: #1F2937;
    --color-gray-900: #111827;

    /* Compatibility aliases */
    --color-primary: #1F2D3D; /* used in some dark blocks */
    --color-accent: var(--brand-primary);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Default light theme for work screens */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--color-bg);
    min-height: 100vh;
    font-size: 16px;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* No padding needed with sticky navbar */
    padding: 0;
    margin: 0;
}

/* Prevent horizontal scroll only for home page */
body.home-dark {
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

p, span, div {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    color: var(--text-secondary);
}

/* Navigation */
.navbar {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--navbar-height);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    height: var(--navbar-height);
    gap: 2rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo {
    height: 56px;
    width: auto;
    border-radius: 0.5rem;
    object-fit: contain;
}

.nav-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--brand-primary);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
    justify-content: center;
    margin-left: 2rem;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    min-width: 100px;
    text-align: center;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--brand-primary);
    background: rgba(15, 108, 189, 0.08);
}

.nav-link.active {
    color: var(--brand-primary);
    background: rgba(15, 108, 189, 0.12);
    font-weight: 600;
}

.nav-icon {
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.95rem;
    height: 1.95rem;
    flex-shrink: 0;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.125rem;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: capitalize;
}

.user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: rgba(15, 108, 189, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
    font-weight: 600;
    font-size: 0.875rem;
}

.logout-btn {
    padding: 0.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: #6b7280;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    color: #a8845c;
    background: rgba(168, 132, 92, 0.1);
}

/* Main content */
.main-content {
    margin: 0 auto;
    padding: 1rem;
    padding-top: calc(1rem + 30px); /* 30px extra de separación con navbar */
    min-height: calc(100vh - var(--navbar-height));
    max-width: 1400px;
}

/* Login page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    background: white;
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(229, 231, 235, 0.5);
    width: 100%;
    max-width: 400px;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo img {
    width: 45%;
    height: auto;
    object-fit: contain;
    margin-bottom: 1rem;
    max-width: 120px;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: #6b7280;
    font-size: 0.875rem;
}

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

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

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 400;
    transition: all 0.2s ease;
    background: var(--color-white);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
}

.form-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(15, 108, 189, 0.2);
    background: var(--color-white);
}

.form-input::placeholder {
    color: var(--color-gray-400);
}

.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-accent);
    font-size: 0.875rem;
}

.password-toggle:hover {
    color: #a8845c;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--brand-primary);
    color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--brand-primary-600);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(15, 108, 189, 0.25);
}

.btn-secondary {
    background: #F3F4F6;
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-weight: 400;
}

.btn-secondary:hover {
    background: #E5E7EB;
    transform: translateY(-1px);
}

/* Page header styles */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.375rem;
    border-bottom: 1px solid var(--color-border);
}

.page-header h1 {
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Smaller buttons in page header */
.page-header-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    height: 32px;
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .page-header-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Icon styles for Heroicons SVGs */
.icon {
    width: 0.875rem;
    height: 0.875rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-sm {
    width: 0.875rem;
    height: 0.875rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-tab {
    width: 1rem;
    height: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-lg {
    width: 1.25rem;
    height: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-xl {
    width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-2xl {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-3xl {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* SVG specific alignment fixes */
.icon svg, 
.icon-sm svg, 
.icon-xs svg,
.icon-tab svg,
.icon-lg svg, 
.icon-xl svg,
.icon-2xl svg,
.icon-3xl svg,
.nav-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* Ensure icons in navigation links are properly aligned */
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link .nav-icon {
    flex-shrink: 0;
}

/* Button icon alignment and color inheritance */
.btn .icon,
.btn .icon-sm,
.btn .icon-xs,
.btn .icon-lg,
.btn .icon-xl {
    flex-shrink: 0;
    color: currentColor;
}

.btn .icon svg,
.btn .icon-sm svg,
.btn .icon-xs svg,
.btn .icon-tab svg,
.btn .icon-lg svg,
.btn .icon-xl svg {
    color: inherit;
    stroke: currentColor;
    fill: none;
}

/* Badge icon alignment and color inheritance */
.badge .icon,
.badge .icon-sm,
.badge .icon-xs,
.badge .icon-lg {
    flex-shrink: 0;
    color: currentColor;
}

.badge .icon svg,
.badge .icon-sm svg,
.badge .icon-xs svg,
.badge .icon-tab svg,
.badge .icon-lg svg {
    color: inherit;
    stroke: currentColor;
    fill: none;
}

/* Ensure badges maintain proper height with icons */
.badge {
    min-height: 1.5rem;
    line-height: 1;
}

/* Ensure buttons maintain proper alignment with icons */
.btn {
    min-height: 2.5rem;
    line-height: 1;
}

.btn-sm {
    min-height: 2rem;
}

/* Special handling for icon-only buttons */
.btn .icon:only-child,
.btn .icon-sm:only-child,
.btn .icon-xs:only-child {
    margin: 0;
}

/* Icon container for proper styling */
.icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Color current for SVG icons */
/* Legacy img filter rules for backward compatibility */
.nav-icon img,
.detail-actions img,
.page-header img {
    filter: brightness(0) saturate(100%) invert(41%) sepia(6%) saturate(1010%) hue-rotate(202deg) brightness(93%) contrast(90%);
}

.nav-link.active .nav-icon img {
    filter: brightness(0) saturate(100%) invert(51%) sepia(25%) saturate(846%) hue-rotate(11deg) brightness(93%) contrast(84%);
}

/* SVG color rules for new inline SVG icons */
.nav-icon svg {
    color: currentColor;
    stroke: currentColor;
}

.detail-actions svg,
.page-header svg {
    color: #6b7280;
    stroke: currentColor;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

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

/* Help card styles */
.placeholder-help {
    margin-top: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.help-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.help-card p {
    color: #6b7280;
    margin-bottom: 1rem;
}

.help-card ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.help-card li {
    padding: 0.5rem 0;
    color: #4b5563;
    border-bottom: 1px solid #f3f4f6;
}

.help-card li:last-child {
    border-bottom: none;
}

.help-card .btn {
    margin-top: 1rem;
}

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

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

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

.btn-full {
    width: 100%;
}

/* Cards */
.card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(229, 231, 235, 0.5);
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.card-subtitle {
    color: #6b7280;
    font-size: 0.875rem;
}

.card-body {
    padding: 1.5rem;
}

/* Hero section */
.hero {
    text-align: center;
    padding: 2rem 1rem;
    margin-bottom: 0;
    border-radius: 1rem 1rem 0 0;
    background: white;
}

.hero-with-bg {
    position: relative;
    background-image: url('/static/images/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 250px;
    padding: 2rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem 1rem 0 0;
    margin-bottom: 0;
}

.hero-with-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(250, 248, 245, 0.95) 0%, 
        rgba(250, 248, 245, 0.85) 50%, 
        rgba(168, 132, 92, 0.05) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    width: 100%;
}

.hero-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.hero-with-bg .hero-title {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.hero-subtitle {
    font-size: 0.95rem;
    color: #6b7280;
    margin-bottom: 1rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.hero-with-bg .hero-subtitle {
    font-size: 1.25rem;
    color: #4a5568;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.8);
    padding: 1rem 2rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-with-bg .hero-actions {
    gap: 1.5rem;
}

.hero-with-bg .hero-actions .btn {
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    transform: translateY(0);
    transition: all 0.3s ease;
}

.hero-with-bg .hero-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* Grid */
.grid {
    display: grid;
    gap: 2rem;
}

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

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
    .grid-cols-2,
    .grid-cols-3 {
        grid-template-columns: 1fr;
    }
}

/* Feature cards */
.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(229, 231, 235, 0.5);
    transition: all 0.3s ease;
}

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

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
}

.feature-icon img {
    width: 100%;
    height: 100%;
    filter: brightness(0) saturate(100%) invert(53%) sepia(61%) saturate(2878%) hue-rotate(18deg) brightness(101%) contrast(101%);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.feature-description {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Table */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 13px;
}

.table th,
.table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.table th {
    background: #f9fafb;
    font-weight: 600;
    color: #4b5563;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    position: relative;
}

.table th:hover {
    background: #f3f4f6;
    color: #374151;
}

.table th.sortable::after {
    content: '⇅';
    position: absolute;
    right: 0.5rem;
    opacity: 0.4;
    font-size: 10px;
}

.table th.sort-asc::after {
    content: '↑';
    opacity: 0.8;
    color: #3b82f6;
}

.table th.sort-desc::after {
    content: '↓';
    opacity: 0.8;
    color: #3b82f6;
}

.table td {
    font-size: 13px;
    line-height: 1.4;
}

.table tr:hover {
    background: #f9fafb;
}

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

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

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

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

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(31, 45, 61, 0.7);
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--color-primary);
    border-radius: 0.75rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(199, 164, 94, 0.3);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(199, 164, 94, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-white);
}

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

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

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    color: white;
    font-weight: 500;
    font-size: 0.875rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    background: #059669;
}

.toast-error {
    background: #dc2626;
}

.toast-info {
    background: #2563eb;
}

.toast-warning {
    background: #d97706;
}

/* Loading spinner */
.spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Utilities */
.text-center {
    text-align: center;
}

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

.hidden {
    display: none;
}

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

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

.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

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

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

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

.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.w-full {
    width: 100%;
}

.max-w-md {
    max-width: 28rem;
}

.max-w-lg {
    max-width: 32rem;
}

.max-w-xl {
    max-width: 36rem;
}

.max-w-2xl {
    max-width: 42rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* Resizable panels */
.resizable-layout {
    display: flex;
    height: 100%;
    position: relative;
}

.resizable-panel {
    min-width: 200px;
    overflow: hidden;
}

.resizable-divider {
    width: 6px;
    background: #e5e7eb;
    cursor: col-resize;
    flex-shrink: 0;
    position: relative;
    transition: background-color 0.2s ease;
}

.resizable-divider:hover {
    background: #9ca3af;
}

.resizable-divider::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 3px;
    height: 30px;
    background: repeating-linear-gradient(
        to bottom,
        #9ca3af 0px,
        #9ca3af 3px,
        transparent 3px,
        transparent 6px
    );
    opacity: 0.6;
}

.resizable-divider:hover::before {
    opacity: 1;
}

.resizable-divider.dragging {
    background: #3b82f6;
}

.text-sm {
    font-size: 0.875rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.text-gray-600 {
    color: #6b7280;
}

.text-gray-700 {
    color: #374151;
}

.text-gray-900 {
    color: #1f2937;
}

/* Hide nav text on small screens for space saving */
@media (max-width: 1024px) {
    .nav-text {
        display: none;
    }
    
    .nav-link {
        min-width: auto;
        padding: 0.75rem;
        gap: 0;
    }
    
    .nav-menu {
        gap: 0.75rem;
    }
    
    .nav-icon {
        margin: 0;
    }
    
    /* Hide user info text, show only avatar */
    .user-info {
        display: none;
    }
    
    .user-menu-button {
        padding: 0.5rem;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 0 1rem;
    }
    
    .nav-container {
        height: 3.5rem;
    }
    
    .nav-menu {
        gap: 0.5rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.75rem;
        min-width: 100px;
        font-size: 0.8rem;
    }
    
    .nav-icon {
        width: 1.625rem;
        height: 1.625rem;
    }
    
    .user-info {
        display: none;
    }
    
    .main-content {
        padding: 1rem 1.5rem;
    }
    
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero-with-bg {
        min-height: 400px;
        padding: 2rem 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-with-bg .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-with-bg .hero-subtitle {
        font-size: 1.125rem;
        padding: 0.75rem 1.5rem;
        margin-bottom: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-with-bg .hero-actions {
        gap: 1rem;
    }
    
    .login-card {
        padding: 2rem;
    }
    
    .card-header,
    .card-body {
        padding: 1rem;
    }
    
    .modal-content {
        margin: 1rem;
    }
}
/* Auth Modal Styles */
.auth-modal .modal-content {
    max-width: 450px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}


.auth-modal .modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.auth-modal .modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.auth-modal .close {
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    background: none;
    border: none;
}

.auth-modal .close:hover {
    color: #1f2937;
    background: #f3f4f6;
}

.auth-form {
    padding: 1.5rem 2rem 2rem;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

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

.auth-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s;
    background: #ffffff;
}

.auth-form input:focus {
    outline: none;
    border-color: #a8845c;
    box-shadow: 0 0 0 3px rgba(168, 132, 92, 0.1);
}

.auth-form .password-field input {
    padding-right: 3rem;
}

.auth-form .form-actions {
    margin-top: 2rem;
}

.error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 1rem;
    padding: 0.75rem;
    background: #fee2e2;
    border-radius: 0.375rem;
}

/* User Menu Dropdown */
.user-menu-container {
    position: relative;
}

.user-menu-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #C7A45E;
    border: none;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    transition: all 0.2s;
    color: white;
}

.user-menu-button:hover {
    background-color: #D4B76A;
    transform: translateY(-1px);
}

.user-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    display: none;
    z-index: 1001;
}

.user-dropdown.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: #f3f4f6;
}

.dropdown-divider {
    margin: 0.5rem 0;
    border: none;
    border-top: 1px solid #e5e7eb;
}

/* Button sizes */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
}

/* Task Status Styles */
.task-status {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    gap: 0.25rem;
}

.status-pending {
    background-color: #fbbf24;
    color: #92400e;
}

.status-processing {
    background-color: #3b82f6;
    color: #ffffff;
    animation: pulse 2s infinite;
}

.status-processing-progress {
    background: linear-gradient(90deg, #007bff 0%, #17a2b8 100%);
    color: white;
    animation: pulse 2s infinite;
}

.status-completed {
    background-color: #10b981;
    color: #ffffff;
}

.status-failed {
    background-color: #ef4444;
    color: #ffffff;
}

.status-incomplete {
    background-color: #f59e0b;
    color: #ffffff;
}

.status-input_required {
    background-color: #8b5cf6;
    color: #ffffff;
}

/* Environment Badge Styles */
.environment-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.environment-badge.production {
    background: #dcfce7;
    color: #166534;
}

.environment-badge.development {
    background: #fef3c7;
    color: #92400e;
}

/* Template compact styles */
.template-name {
    font-weight: 500;
    font-size: 0.875rem;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.template-description-compact {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.3;
    opacity: 0.8;
}

/* Pulse animation for processing status */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Task Detail Panel Styles */
.task-detail-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.detail-header {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    gap: 1rem;
}

/* Template detail header - matches task detail header styling */
.template-detail-content .detail-header {
    background: rgba(168, 132, 92, 0.15);
    border-radius: 8px;
}

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

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

.detail-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Standardized detail action buttons */
.detail-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    white-space: nowrap;
    height: 32px !important;
    min-width: 110px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.4rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: white;
    color: #495057;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.detail-actions .btn:hover {
    background: #f8f9fa;
    border-color: rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.detail-actions .btn.btn-danger {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.detail-actions .btn.btn-danger:hover {
    background: #c82333;
    border-color: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.detail-actions .btn.btn-primary {
    background: #007bff !important;
    color: white !important;
    border-color: #007bff !important;
}

.detail-actions .btn.btn-primary:hover {
    background: #0056b3 !important;
    border-color: #0056b3 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

/* Fix icon sizes in detail action buttons */
.detail-actions .btn .icon-sm,
.detail-actions .btn .icon-sm img {
    width: 12px !important;
    height: 12px !important;
    max-width: 12px !important;
    max-height: 12px !important;
}

/* Task Table Styles */
.tasks-table tr:hover {
    background-color: #f8fafc;
    cursor: pointer;
}

.tasks-table tr.selected {
    background-color: #e0f2fe;
}

.task-name {
    font-weight: 500;
    color: #1f2937;
}

.task-date {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Tab Styles */
.tabs-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tabs-header {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.tab-button {
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s;
}

.tab-button:hover {
    color: #374151;
    background: rgba(0, 0, 0, 0.05);
}

.tab-button.active {
    color: #1f2937;
    border-bottom-color: #3b82f6;
    background: #ffffff;
}

.tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    display: none;
}

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

/* Detail Section Styles */
.detail-section {
    padding: 1rem;
    margin-bottom: 0;
}

.detail-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

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

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.detail-value {
    color: #1f2937;
    font-weight: 500;
}

/* File List Styles */
.file-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

.file-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.file-meta {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Document Preview Styles */
.document-preview-container {
    display: flex;
    gap: 1rem;
    height: 500px;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
}

.documents-list {
    flex: 0 0 300px;
    border-right: 1px solid #e5e7eb;
    background: #f8f9fa;
    overflow-y: auto;
}

.documents-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.document-item {
    padding: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background-color 0.2s;
}

.document-item:hover {
    background-color: #e5e7eb;
}

.document-item.active {
    background-color: #dbeafe;
    border-left: 3px solid #3b82f6;
}

.document-item-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.document-preview {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: #ffffff;
}

/* Category Filter and Badge Styles */
.category-filter select {
    padding: 0.25rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background: #ffffff;
}

.category-badge {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    background: #e5e7eb;
    color: #374151;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

/* Extracted Fields Table */
.extracted-fields-table-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
}

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

.extracted-fields-table th {
    background: #f8f9fa;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
}

.extracted-fields-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: top;
}

.field-name-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.field-type-extracted {
    background: #dbeafe;
    color: #1e40af;
}

.field-type-system {
    background: #f3e8ff;
    color: #7c3aed;
}

.field-type-predefined {
    background: #fef3c7;
    color: #92400e;
}

.field-type-conditional {
    background: #dcfce7;
    color: #166534;
}

.field-value-content {
    max-width: 300px;
    word-wrap: break-word;
}

.field-source-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 0.375rem;
    font-size: 0.75rem;
}

.document-source-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #3b82f6;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
}

.document-source-link:hover {
    background-color: #eff6ff;
    text-decoration: underline;
}

/* Placeholder Styles */
.detail-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6b7280;
    text-align: center;
    padding: 2rem;
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.placeholder-text {
    font-size: 1.125rem;
    font-weight: 500;
}

.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #dc2626;
    text-align: center;
    padding: 2rem;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.error-text {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.error-subtext {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Loading State */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 1rem;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-text {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-subtext {
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

/* Processing Log Styles */
.processing-log {
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow-y: auto;
}

.processing-log pre {
    margin: 0;
    padding: 1rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Small button style */
.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
}


.welcome-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 0;
    padding: 2rem;
    box-shadow: none;
    border: none;
    max-width: 700px;
    width: 100%;
    margin: auto;
    position: relative;
    overflow: hidden;
}
.welcome-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent) 0%, #D4B76A 100%);
}

.card-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.card-title {
    font-size: 2.25rem;
    font-weight: 600;
    color: #1F2D3D;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.card-subtitle-with-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.ai-icon {
    width: 2rem;
    height: 2rem;
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(199, 164, 94, 0.1);
    border-radius: 0.5rem;
    padding: 0.5rem;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(199, 164, 94, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(199, 164, 94, 0);
    }
}

.card-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    color: #4A4A4A;
    line-height: 1.4;
    margin: 0;
}

.card-description {
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--color-gray-600);
    line-height: 1.6;
    margin: 0;
    max-width: 600px;
    margin: 0 auto;
}

.card-description strong {
    color: var(--color-accent);
    font-weight: 600;
}

.ai-link {
    color: #C7A45E;
    text-decoration: none;
    font-weight: 600;
}

.ai-link:hover {
    color: #D4B76A;
    text-decoration: none;
}

.process-steps {
    margin-top: 2rem;
}

.steps-bar {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.step-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #F0F0F0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.step-item.active .step-circle {
    background: #C7A45E;
}

.step-item.active .step-circle .step-icon {
    color: white;
}

.step-item:not(.active):hover .step-circle {
    background: #E0E0E0;
    transform: translateY(-2px);
}

.step-icon {
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: color 0.3s ease;
}

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

.step-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #666;
    transition: color 0.3s ease;
}

.step-item.active .step-name {
    color: #C7A45E;
    font-weight: 600;
}



.step-description {
    background: rgba(199, 164, 94, 0.05);
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid rgba(199, 164, 94, 0.1);
    position: relative;
    min-height: 120px;
}

.step-content {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.step-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.step-desc-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.step-desc-title::before {
    content: '';
    width: 4px;
    height: 1.5rem;
    background: var(--color-accent);
    border-radius: 2px;
}

.step-desc-text {
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-gray-600);
    line-height: 1.6;
    margin: 0;
}

.step-desc-text code {
    background: rgba(199, 164, 94, 0.15);
    color: var(--color-accent);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'Monaco', 'Menlo', monospace;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.laptop-mockup {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: transparent;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: none;
    overflow: hidden;
}


.laptop-screen {
    width: 100%;
    aspect-ratio: 16/10;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.screen-content {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Comprehensive Responsive Design */
/* Tablet and Small Desktop (768px - 1024px) */
@media (max-width: 1024px) {
    .hero-container {
        gap: 3rem;
    /* no-op cleanup of stray tokens */
    }
    
    .laptop-mockup {
        max-width: 420px;
    }
}

/* Mobile and Tablet (max-width: 768px) */
@media (max-width: 768px) {
    /* Hero Section Layout */
    .hero-section {
        padding: 1.5rem 1rem;
        min-height: auto;
    }
    
    .hero-container {
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 2rem;
        max-width: 100%;
    }
    
    .hero-content {
        order: 1;
        width: 100%;
    }
    
    .hero-visual {
        order: 2;
        width: 100%;
        margin-top: 1rem;
    }
    
    /* Welcome Card Responsive */
    .welcome-card {
        padding: 2rem;
        margin: 0.5rem;
        border-radius: 1.25rem;
    }
    
    /* Typography Scaling */
    .card-title {
        font-size: 2rem;
        line-height: 1.1;
        margin-bottom: 1.25rem;
    }
    
    .card-subtitle {
        font-size: 1.125rem;
        line-height: 1.3;
    }
    
    .card-description {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    /* AI Icon Responsive */
    .ai-icon {
        width: 1.75rem;
        height: 1.75rem;
    }
    
    /* Steps Bar - Vertical Layout */
    .steps-bar {
        flex-direction: row;
        gap: 1.5rem;
        padding: 2rem 0;
        justify-content: center;
    }
    
    .step-circle {
        width: 50px;
        height: 50px;
    }
    
    .step-icon {
        width: 1.25rem;
        height: 1.25rem;
    }
    
    .step-name {
        font-size: 0.75rem;
    }
    
    .step-name {
        font-size: 0.9rem;
    }
    
    /* Vertical Connectors */
    
    .step-description {
        padding: 1.5rem;
        min-height: 80px;
        margin-top: 1rem;
    }
    
    .step-desc-title {
        font-size: 1.125rem;
        margin-bottom: 0.75rem;
    }
    
    .step-desc-text {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    /* Laptop Mockup */
    .laptop-mockup {
        max-width: 360px;
        width: 90%;
        margin: 0 auto;
    }
    
    /* Navigation Responsive */
    .navbar {
        padding: 0 1rem;
    }
    
    .nav-container {
        padding: 0 0.5rem;
    }
    
    .nav-link {
        min-width: auto;
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .nav-title {
        font-size: 1.125rem;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    /* Hero Section */
    .hero-section {
        padding: 1rem 0.75rem;
    }
    
    .hero-container {
        gap: 1.5rem;
    }
    
    /* Welcome Card */
    .welcome-card {
        padding: 1.5rem;
        margin: 0.25rem;
        border-radius: 1rem;
    }
    
    /* Typography - Further Scaling */
    .card-title {
        font-size: 1.75rem;
        line-height: 1.05;
        margin-bottom: 1rem;
    }
    
    .card-subtitle {
        font-size: 1rem;
    }
    
    .card-description {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    /* AI Icon and Subtitle Layout */
    .card-subtitle-with-icon {
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 1.25rem;
    }
    
    .ai-icon {
        width: 1.5rem;
        height: 1.5rem;
        align-self: center;
    }
    
    /* Steps - Compact Mobile */
    .steps-bar {
        padding: 1.5rem 0;
        gap: 1rem;
    }
    
    .step-circle {
        width: 45px;
        height: 45px;
    }
    
    .step-icon {
        width: 1.125rem;
        height: 1.125rem;
    }
    
    .step-name {
        font-size: 0.7rem;
    }
    
    .step-description {
        padding: 1.25rem;
        min-height: 70px;
        border-radius: 0.75rem;
    }
    
    .step-desc-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .step-desc-text {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .step-desc-text code {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }
    
    /* Laptop Mockup */
    .laptop-mockup {
        max-width: 280px;
    }
    
    .laptop-screen {
        border-radius: 6px;
    }
    
    /* Navigation */
    .nav-menu {
        gap: 0.5rem;
    }
    
    .nav-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
        min-width: auto;
    }
    
    .nav-icon {
        width: 1.25rem;
        height: 1.25rem;
    }
    
    .nav-title {
        font-size: 1rem;
    }
}

/* Extra Small Mobile (max-width: 360px) */
@media (max-width: 360px) {
    .welcome-card {
        padding: 1.25rem;
    }
    
    .card-title {
        font-size: 1.5rem;
    }
    
    .step-circle {
        width: 40px;
        height: 40px;
    }
    
    .step-icon {
        width: 1rem;
        height: 1rem;
    }
    
    .step-name {
        font-size: 0.65rem;
    }
    
    .laptop-mockup {
        max-width: 240px;
    }
    
    .nav-link span {
        display: none;
    }
    
    .nav-link {
        min-width: 40px;
        justify-content: center;
    }
}

.workflow-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.workflow-title {
    font-size: 1.875rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.workflow-subtitle {
    font-size: 1rem;
    color: #6b7280;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Workflow Container - Table Layout */
.workflow-container {
    display: table;
    width: 100%;
    border-spacing: 0;
}

/* Step Indicators - Table Cell */
.step-indicators {
    display: table-cell;
    vertical-align: top;
    width: 200px;
    position: relative;
    padding-left: 0;
    text-align: center;
}

/* Vertical Line */
.vertical-line {
    position: absolute;
    left: 50%;
    transform: translateX(-1px);
    top: 0;
    height: 100%;
    width: 2px;
    background: #e5e7eb;
    z-index: 0;
}

.indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    margin-bottom: 2rem;
    height: 80px;
    justify-content: center;
}

.indicator-number {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    background: white;
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #9ca3af;
    transition: all 0.3s ease;
    position: relative;
    transform-origin: center;
}

.indicator.active .indicator-number {
    width: 52px;
    height: 52px;
    font-size: 1.3rem;
    background: #a8845c;
    color: white;
    border-color: #a8845c;
    box-shadow: 0 4px 15px rgba(168, 132, 92, 0.3);
    transform: scale(1);
}

.indicator span {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
    transition: all 0.3s ease;
}

.indicator.active span {
    color: #a8845c;
    font-weight: 600;
}

/* Workflow Display - Table Cell */
.workflow-display {
    display: table-cell;
    vertical-align: top;
    position: relative;
    min-height: 400px;
    overflow: hidden;
    padding-left: 3rem;
}

.workflow-step {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
    pointer-events: none;
}

.workflow-step.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    position: relative;
}

/* Step Container */
.step-container {
    text-align: left;
    padding: 0;
}

.step-with-bg {
    background-repeat: no-repeat;
    background-position: right center;
    background-size: contain;
    min-height: 400px;
    padding: 2rem 0;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Step Content Split Layout */
.step-content-split {
    display: block;
    margin-top: 0.5rem;
}

.step-text-content {
    position: relative;
    z-index: 2;
    max-width: 60%;
}

.step-text-content::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 150px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 50%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Remove unused image content styles since we're using background now */

/* Responsive adjustments for step content split */
@media (max-width: 768px) {
    .workflow-container {
        display: block;
    }
    
    .step-indicators {
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 2rem;
        width: 100%;
        margin-bottom: 2rem;
        padding-left: 0;
    }
    
    .step-indicators .indicator {
        margin-bottom: 0;
        height: auto;
    }
    
    .vertical-line {
        display: none;
    }
    
    .workflow-display {
        display: block;
        padding-left: 0;
    }
    
    .step-content-split {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .step-text-content::after,
    .step-image-content::before {
        display: none;
    }
}

.step-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.step-number {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.step-number-1 {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
}

.step-number-2 {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
}

.step-number-3 {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
}

.step-number-bg {
    position: absolute;
    font-size: 1.25rem;
    font-weight: 700;
    opacity: 0.4;
    z-index: 1;
}

.step-number-1 .step-number-bg {
    color: #dc2626;
}

.step-number-2 .step-number-bg {
    color: #2563eb;
}

.step-number-3 .step-number-bg {
    color: #16a34a;
}

.step-icon {
    width: 1.25rem;
    height: 1.25rem;
    z-index: 3;
    position: relative;
}

.step-number-1 .step-icon {
    color: #dc2626;
}

.step-number-2 .step-icon {
    color: #2563eb;
}

.step-number-3 .step-icon {
    color: #16a34a;
}

.step-illustration {
    background: #f9fafb;
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(229, 231, 235, 0.3);
}

.step-svg {
    width: 100%;
    height: 100px;
}

.step-content {
    padding: 1rem 0;
}

.step-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 1.5rem 0;
}

.step-description {
    max-width: 600px;
}

.step-description p {
    font-size: 1rem;
    color: #4b5563;
    line-height: 1.7;
    margin: 0;
}

.variable-code {
    background: #f3f4f6;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 0.8rem;
    color: #a8845c;
    font-weight: 500;
}

.step-features {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #374151;
}

.feature-icon {
    width: 1rem;
    height: 1rem;
    color: #16a34a;
    flex-shrink: 0;
}

.step-examples {
    background: #f8fafc;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border-left: 3px solid #a8845c;
    font-size: 0.8rem;
    color: #475569;
}

.step-examples strong {
    color: #334155;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .workflow-container {
        grid-template-columns: 150px 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .workflow-section {
        padding: 1.5rem 1rem;
        margin: 1rem 0;
    }
    
    .workflow-container {
        grid-template-columns: 100px 1fr;
        gap: 1.5rem;
    }
    
    .step-indicators {
        gap: 1.5rem;
        padding-left: 1rem;
    }
    
    .vertical-line {
        left: 2.25rem;
        top: 2rem;
        bottom: 2rem;
    }
    
    .indicator-number {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }
    
    .indicator.active .indicator-number {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }
    
    .indicator span {
        font-size: 0.8rem;
    }
    
    .workflow-display {
        min-height: 250px;
    }
    
    .step-container {
        padding: 1.5rem 0;
    }
    
    .step-title {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    
    .step-description p {
        font-size: 0.9rem;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .document-preview-container {
        flex-direction: column;
        height: auto;
    }
    
    .documents-list {
        flex: none;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        max-height: 200px;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .detail-actions {
        flex-wrap: wrap;
    }
}

/* Password toggle icon */
.password-icon {
    width: 18px;
    height: 18px;
    filter: brightness(0) saturate(100%) invert(47%) sepia(7%) saturate(1012%) hue-rotate(169deg) brightness(92%) contrast(91%);
}

/* Extra small icon for badges */
.icon-xs {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.25rem;
}

.icon-xs img {
    width: 100%;
    height: 100%;
    filter: brightness(0) saturate(100%) invert(100%);
}
