/* Fabrio - Main Styles */

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --light: #f8f9fa;
    --dark: #343a40;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f7fa;
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 600;
    font-size: 18px;
}

.mobile-sidebar-nav .nav-link,
.mobile-org-info {
    font-size: 14px;
}

.mobile-sidebar-nav .nav-link {
    color: rgba(255,255,255,0.85);
    padding: 0.55rem 0;
}

.mobile-sidebar-nav .nav-link:hover,
.mobile-sidebar-nav .nav-link:focus {
    color: #fff;
}

.mobile-sidebar-nav .nav-link i {
    width: 1.25rem;
}

.machine-form-panel {
    scroll-margin-top: 90px;
}

.order-workflow-panel,
.order-filter-panel {
    scroll-margin-top: 90px;
}

.user-form-panel {
    scroll-margin-top: 90px;
}

/* Sidebar */
.sidebar {
    box-shadow: 1px 0 2px rgba(0,0,0,0.05);
    max-height: calc(100vh - 70px);
    overflow-y: auto;
}

.sidebar .nav-link {
    color: #495057;
    font-size: 14px;
    padding: 10px 15px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover {
    color: var(--primary);
    background-color: rgba(102, 126, 234, 0.05);
    border-left-color: var(--primary);
}

.sidebar .nav-link.active {
    color: var(--primary);
    background-color: rgba(102, 126, 234, 0.1);
    border-left-color: var(--primary);
    font-weight: 600;
}

.org-info {
    padding: 12px 15px;
    background-color: rgba(102, 126, 234, 0.05);
    border-radius: 4px;
    margin: 0 15px;
}

/* Cards */
.card {
    border: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.card-header {
    background-color: white;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
}

.card-title {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin: 0;
}

/* Tables */
.table {
    font-size: 13px;
}

.table thead th {
    color: #666;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    background-color: #f8f9fa;
}

.table tbody tr {
    border-bottom: 1px solid #e9ecef;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Badges */
.badge {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}

/* Forms */
.form-control {
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    font-size: 14px;
}

/* Buttons */
.btn {
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 16px;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-outline-secondary {
    color: #6c757d;
    border-color: #ddd;
}

.btn-outline-secondary:hover {
    background-color: #f8f9fa;
    border-color: var(--primary);
    color: var(--primary);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 4px;
    font-size: 14px;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

/* Modals */
.modal-content {
    border: none;
    border-radius: 6px;
}

.modal-header {
    background-color: white;
    border-bottom: 1px solid #e9ecef;
}

.modal-title {
    font-weight: 600;
    color: #333;
}

/* Status Badges */
.badge-not_assigned {
    background-color: #e9ecef;
    color: #495057;
}

.badge-assigned {
    background-color: #cce5ff;
    color: #004085;
}

.badge-in_production {
    background-color: #fff3cd;
    color: #856404;
}

.badge-done {
    background-color: #d4edda;
    color: #155724;
}

/* Utility Classes */
.opacity-25 {
    opacity: 0.25;
}

.text-muted {
    color: #6c757d;
}

.bg-light {
    background-color: #f8f9fa;
}

.shadow-sm {
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        position: static;
        left: auto;
        top: auto;
        width: 100%;
        max-height: none;
        z-index: auto;
        background: white;
        border-bottom: 1px solid #e9ecef;
        margin-bottom: 1rem;
        overflow-y: visible;
    }

    .navbar-collapse {
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .navbar-nav .dropdown-menu {
        background-color: rgba(255,255,255,0.98);
    }

    .machine-form-panel {
        margin-top: 0;
    }

    .order-workflow-panel,
    .order-filter-panel {
        margin-top: 0;
    }

    .user-form-panel {
        margin-top: 0;
    }

    main {
        margin-top: 0;
    }

    .table {
        font-size: 12px;
    }

    .btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

@media (min-width: 992px) {
    .machine-form-panel,
    .order-workflow-panel,
    .order-filter-panel,
    .user-form-panel {
        display: block !important;
        height: auto !important;
        visibility: visible;
    }
}

/* Print Styles */
@media print {
    .navbar, .sidebar, footer, .btn {
        display: none;
    }

    body {
        background: white;
    }

    main {
        margin: 0;
    }
}

body.landing-page {
    --landing-ink: #102033;
    --landing-accent: #e96f2e;
    --landing-accent-dark: #cb5720;
    --landing-surface: #f7f2ea;
    --landing-panel: rgba(255, 255, 255, 0.9);
    font-family: 'Manrope', 'Segoe UI', sans-serif;
    color: var(--landing-ink);
    background:
        radial-gradient(circle at top left, rgba(233, 111, 46, 0.18), transparent 32%),
        radial-gradient(circle at right 20%, rgba(16, 32, 51, 0.1), transparent 28%),
        linear-gradient(180deg, #f4ede2 0%, #fcfaf6 52%, #f3efe7 100%);
}

.landing-page h1,
.landing-page h2,
.landing-page h3,
.landing-page .landing-brand,
.landing-page .landing-price,
.landing-page .landing-eyebrow {
    font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
}

.landing-page .btn-primary {
    background-color: var(--landing-accent);
    border-color: var(--landing-accent);
}

.landing-page .btn-primary:hover,
.landing-page .btn-primary:focus {
    background-color: var(--landing-accent-dark);
    border-color: var(--landing-accent-dark);
    box-shadow: 0 12px 24px rgba(233, 111, 46, 0.24);
}

.landing-page .btn-outline-dark {
    border-color: rgba(16, 32, 51, 0.18);
    color: var(--landing-ink);
}

.landing-page .btn-outline-dark:hover,
.landing-page .btn-outline-dark:focus {
    background-color: rgba(16, 32, 51, 0.05);
    border-color: var(--landing-ink);
    color: var(--landing-ink);
}

.landing-header {
    padding: 24px 0 60px;
}

.landing-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 24px;
}

.landing-brand {
    color: var(--landing-ink);
    text-decoration: none;
    font-size: 1.2rem;
    letter-spacing: -0.03em;
}

.landing-nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.landing-language-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
}

.landing-language-switch a {
    color: var(--landing-ink);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 999px;
}

.landing-language-switch a.active {
    background: rgba(16, 32, 51, 0.1);
}

.landing-link {
    color: var(--landing-ink);
    text-decoration: none;
    font-weight: 700;
}

.landing-cta {
    padding-inline: 20px;
}

.landing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 28px;
    align-items: center;
    min-height: 70vh;
}

.landing-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--landing-accent-dark);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.landing-hero h1 {
    max-width: 11ch;
    margin-bottom: 20px;
    font-size: clamp(3rem, 6vw, 5.4rem);
    line-height: 0.92;
    letter-spacing: -0.06em;
}

.landing-lead {
    max-width: 58ch;
    margin-bottom: 28px;
    font-size: 1.1rem;
    line-height: 1.7;
    color: rgba(16, 32, 51, 0.82);
}

.landing-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 28px;
}

.landing-hero-primary,
.landing-hero-secondary {
    min-height: 52px;
    padding-inline: 22px;
}

.landing-proof-list {
    display: grid;
    gap: 12px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.landing-proof-list li {
    position: relative;
    padding-left: 28px;
    color: rgba(16, 32, 51, 0.84);
}

.landing-proof-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--landing-accent), #ffbe82);
    box-shadow: 0 0 0 6px rgba(233, 111, 46, 0.14);
}

.landing-hero-panel {
    position: relative;
    display: grid;
    gap: 18px;
}

.hero-panel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.hero-panel-card {
    padding: 24px;
    border: 1px solid rgba(16, 32, 51, 0.08);
    border-radius: 26px;
    background: var(--landing-panel);
    backdrop-filter: blur(8px);
    box-shadow: 0 20px 50px rgba(16, 32, 51, 0.08);
}

.hero-panel-primary {
    background: linear-gradient(160deg, rgba(16, 32, 51, 0.96), rgba(26, 55, 77, 0.9));
    color: #fff8ef;
}

.hero-panel-primary p,
.hero-panel-primary .hero-panel-label {
    color: rgba(255, 248, 239, 0.78);
}

.hero-panel-label {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-panel-card strong,
.hero-panel-number {
    display: block;
    margin-bottom: 10px;
    font-size: 1.8rem;
    letter-spacing: -0.05em;
}

.hero-panel-card p {
    margin: 0;
    line-height: 1.6;
}

.landing-section {
    padding: 28px 0 72px;
}

.landing-showcase {
    padding-top: 8px;
}

.landing-showcase-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 22px;
}

.landing-showcase-card {
    position: relative;
    padding: 22px;
    border: 1px solid rgba(16, 32, 51, 0.08);
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(245, 239, 231, 0.82));
    backdrop-filter: blur(8px);
    box-shadow: 0 20px 50px rgba(16, 32, 51, 0.08);
    overflow: hidden;
}

.landing-showcase-story {
    padding: 28px;
}

.landing-showcase-copy {
    max-width: 58ch;
    margin-bottom: 24px;
}

.landing-showcase-kicker {
    display: inline-block;
    margin-bottom: 14px;
    color: var(--landing-accent-dark);
    font-size: 0.84rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.landing-showcase-copy h3 {
    margin-bottom: 14px;
    font-size: clamp(2rem, 4vw, 3.1rem);
    letter-spacing: -0.05em;
}

.landing-showcase-copy p {
    margin: 0;
    color: rgba(16, 32, 51, 0.72);
    font-size: 1.04rem;
    line-height: 1.7;
}

.landing-sales-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.landing-sales-item,
.landing-outcome-stat,
.landing-flow-step {
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(16, 32, 51, 0.08);
    background: rgba(255, 255, 255, 0.72);
}

.landing-sales-item strong,
.landing-outcome-stat strong,
.landing-flow-step strong {
    display: block;
    margin-bottom: 8px;
    font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
    font-size: 1.15rem;
    letter-spacing: -0.03em;
}

.landing-sales-item p,
.landing-outcome-stat small,
.landing-flow-step small {
    margin: 0;
    color: rgba(16, 32, 51, 0.7);
    line-height: 1.6;
}

.landing-showcase-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.landing-showcase-outcome,
.landing-showcase-flow-card {
    padding: 24px;
}

.landing-outcome-grid,
.landing-flow-grid {
    display: grid;
    gap: 14px;
}

.landing-outcome-stat span {
    display: inline-block;
    margin-bottom: 10px;
    color: rgba(16, 32, 51, 0.58);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.landing-outcome-stat strong {
    margin-bottom: 6px;
    font-size: 1.8rem;
    letter-spacing: -0.05em;
}

.landing-flow-step {
    position: relative;
    padding-left: 64px;
}

.landing-flow-step span {
    position: absolute;
    left: 18px;
    top: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--landing-accent), #ffbc7f);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 800;
}

.landing-showcase-card::after {
    content: '';
    position: absolute;
    inset: auto -40px -60px auto;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(233, 111, 46, 0.18), transparent 70%);
    pointer-events: none;
}

.landing-showcase-topbar {
    display: flex;
    gap: 7px;
    margin-bottom: 18px;
}

.landing-showcase-topbar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(16, 32, 51, 0.16);
}

.landing-showcase-topbar span:first-child {
    background: rgba(233, 111, 46, 0.55);
}

.landing-showcase-topbar span:nth-child(2) {
    background: rgba(255, 196, 0, 0.5);
}

.landing-showcase-topbar span:nth-child(3) {
    background: rgba(77, 182, 113, 0.5);
}

.landing-showcase-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.landing-showcase-header.compact {
    margin-bottom: 16px;
}

.landing-showcase-header strong {
    display: block;
    margin-bottom: 6px;
    font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
    font-size: 1.2rem;
    letter-spacing: -0.04em;
}

.landing-showcase-header p {
    margin: 0;
    color: rgba(16, 32, 51, 0.7);
    line-height: 1.55;
}

.landing-showcase-badge {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(16, 32, 51, 0.08);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.landing-metrics {
    padding-top: 0;
}

.landing-metric-grid,
.landing-feature-grid,
.landing-step-grid,
.landing-pricing-grid {
    display: grid;
    gap: 20px;
}

.landing-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.landing-metric-grid article,
.landing-feature-card,
.landing-step-card,
.landing-price-card,
.landing-final-card {
    border: 1px solid rgba(16, 32, 51, 0.08);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.76);
    backdrop-filter: blur(8px);
    box-shadow: 0 16px 44px rgba(16, 32, 51, 0.06);
}

.landing-metric-grid article {
    padding: 28px;
}

.landing-metric-grid span,
.landing-section-heading span {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--landing-accent-dark);
    font-size: 0.84rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.landing-metric-grid strong {
    display: block;
    margin-bottom: 12px;
    font-size: 1.3rem;
    letter-spacing: -0.03em;
}

.landing-section-heading {
    max-width: 720px;
    margin-bottom: 26px;
}

.landing-section-heading h2 {
    margin-bottom: 10px;
    font-size: clamp(2rem, 4vw, 3.3rem);
    letter-spacing: -0.05em;
}

.landing-section-heading p {
    margin: 0;
    color: rgba(16, 32, 51, 0.72);
}

.landing-feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.landing-feature-card,
.landing-step-card,
.landing-price-card {
    padding: 28px;
}

.landing-feature-card h3,
.landing-step-card h3,
.landing-price-card h3 {
    margin-bottom: 12px;
    font-size: 1.35rem;
    letter-spacing: -0.04em;
}

.landing-steps {
    position: relative;
}

.landing-step-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.landing-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 18px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--landing-accent), #ffbc7f);
    color: white;
    font-weight: 800;
}

.landing-pricing-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.landing-price-card {
    position: relative;
}

.landing-price-card ul {
    display: grid;
    gap: 10px;
    padding-left: 18px;
    margin: 18px 0 24px;
}

.landing-price {
    margin-bottom: 14px;
    font-size: 2.8rem;
    line-height: 1;
    letter-spacing: -0.06em;
}

.landing-price-period {
    margin: -6px 0 14px;
    color: rgba(16, 32, 51, 0.66);
    font-size: 0.92rem;
    font-weight: 700;
}

.landing-price-card.featured {
    transform: translateY(-10px);
    border-color: rgba(233, 111, 46, 0.28);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 243, 232, 0.94));
}

.landing-price-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(233, 111, 46, 0.12);
    color: var(--landing-accent-dark);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.landing-final-card {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    padding: 34px;
}

.landing-final-card h2 {
    margin: 8px 0 12px;
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.05em;
}

.landing-final-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.landing-footer {
    padding: 0 0 36px;
    color: rgba(16, 32, 51, 0.72);
}

.landing-footer-links {
    display: flex;
    gap: 18px;
}

.landing-footer a {
    color: var(--landing-ink);
    text-decoration: none;
    font-weight: 700;
}

@media (max-width: 991px) {
    .landing-showcase-grid,
    .landing-sales-grid,
    .landing-hero,
    .landing-metric-grid,
    .landing-feature-grid,
    .landing-step-grid,
    .landing-pricing-grid,
    .hero-panel-grid,
    .landing-final-card {
        grid-template-columns: 1fr;
    }

    .landing-hero {
        min-height: auto;
    }

    .landing-price-card.featured {
        transform: none;
    }

    .landing-final-card {
        display: grid;
    }

}

@media (max-width: 767px) {
    .landing-header {
        padding-top: 18px;
    }

    .landing-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .landing-nav-actions,
    .landing-hero-actions,
    .landing-final-actions,
    .landing-footer-links {
        flex-direction: column;
    }

    .landing-nav-actions .btn,
    .landing-hero-actions .btn,
    .landing-final-actions .btn {
        width: 100%;
    }

    .landing-hero h1 {
        max-width: none;
        font-size: clamp(2.5rem, 14vw, 4rem);
    }

    .landing-showcase-actions {
        flex-direction: column;
    }

    .landing-feature-card,
    .landing-step-card,
    .landing-price-card,
    .landing-showcase-card,
    .landing-sales-item,
    .landing-outcome-stat,
    .landing-flow-step,
    .landing-metric-grid article,
    .hero-panel-card,
    .landing-final-card {
        padding: 22px;
        border-radius: 20px;
    }
}
