/**
 * Main Stylesheet
 * Система управления пользователями
 */

/* ==========================================================================
   Reset & Base
   ========================================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f8fafc;
    min-height: 100vh;
    color: #1e293b;
    line-height: 1.5;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

code {
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.header {
    background: #1e293b;
    color: white;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    text-decoration: none;
}

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

.nav a {
    color: #94a3b8;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.nav a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.nav a.active {
    color: white;
    background: rgba(255, 255, 255, 0.15);
}

.nav .btn {
    background: #2563eb;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.nav .btn:hover {
    background: #1d4ed8;
}

.nav .btn-outline {
    background: transparent;
    border: 1px solid #475569;
}

.nav .btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #64748b;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #94a3b8;
    font-size: 0.875rem;
}

.user-info .role {
    background: #334155;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
}

/* ==========================================================================
   Layout
   ========================================================================== */

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

.page-header {
    margin-bottom: 2rem;
}

.page-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: #64748b;
    font-size: 0.875rem;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
}

/* ==========================================================================
   Alerts
   ========================================================================== */

.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

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

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ==========================================================================
   Forms
   ========================================================================== */

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

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

.form-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

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

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

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

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

.btn-success {
    background: #16a34a;
    color: white;
}

.btn-success:hover {
    background: #15803d;
}

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

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

/* ==========================================================================
   Tables
   ========================================================================== */

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

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

.table th {
    background: #f8fafc;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #64748b;
}

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

.table-simple {
    width: 100%;
    font-size: 0.875rem;
}

.table-simple td {
    padding: 0.5rem 0;
}

.table-simple td:first-child {
    color: #64748b;
}

.table-simple td:last-child {
    font-weight: 500;
}

.table-profile td {
    padding: 0.75rem 0;
}

.table-profile td:first-child {
    color: #64748b;
    width: 40%;
}

/* ==========================================================================
   Badges
   ========================================================================== */

.badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}

/* Role badges */
.badge-admin {
    background: #fef3c7;
    color: #92400e;
}

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

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

.badge-manager {
    background: #e0e7ff;
    color: #3730a3;
}

.badge-client {
    background: #f1f5f9;
    color: #475569;
}

/* Status badges */
.badge-active {
    background: #dcfce7;
    color: #166534;
}

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

/* ==========================================================================
   Stats Cards
   ========================================================================== */

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

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
}

.stat-value-primary {
    color: #2563eb;
}

.stat-value-success {
    color: #16a34a;
}

.stat-value-danger {
    color: #dc2626;
}

.stat-label {
    color: #64748b;
    font-size: 0.875rem;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
    text-align: center;
    padding: 3rem 0;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto 2rem;
}

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

/* ==========================================================================
   Grid Layouts
   ========================================================================== */

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-5 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

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

/* ==========================================================================
   Role Cards
   ========================================================================== */

.role-card {
    border-left: 4px solid;
}

.role-card-admin {
    border-color: #f59e0b;
}

.role-card-director {
    border-color: #3b82f6;
}

.role-card-senior {
    border-color: #22c55e;
}

.role-card-manager {
    border-color: #6366f1;
}

.role-card-client {
    border-color: #94a3b8;
}

.role-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.role-card p {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
}

/* ==========================================================================
   Feature Cards
   ========================================================================== */

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
}

/* ==========================================================================
   Actions
   ========================================================================== */

.actions {
    display: flex;
    gap: 0.5rem;
}

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

/* ==========================================================================
   Progress Bar
   ========================================================================== */

.progress-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-bar {
    width: 100px;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #2563eb;
}

.progress-label {
    font-size: 0.75rem;
    color: #64748b;
}

/* ==========================================================================
   Auth Form Container
   ========================================================================== */

.auth-container {
    max-width: 400px;
    margin: 2rem auto;
}

.form-container {
    max-width: 500px;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

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

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

.text-muted {
    color: #64748b;
}

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

.text-xs {
    font-size: 0.75rem;
}

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

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

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.pt-2 {
    padding-top: 1rem;
}

.border-top {
    border-top: 1px solid #e2e8f0;
}

.inline-form {
    display: inline;
}

/* ==========================================================================
   Product Catalog
   ========================================================================== */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
}

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

.product-image {
    width: 100%;
    height: 160px;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
}

.product-category {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.product-sku {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 0.75rem;
}

.product-description {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.product-attrs {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: 6px;
    font-size: 0.75rem;
}

.product-attr {
    display: flex;
    justify-content: space-between;
    padding: 0.2rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.product-attr:last-child {
    border-bottom: none;
}

.product-attr-name {
    color: #64748b;
}

.product-attr-value {
    color: #1e293b;
    font-weight: 500;
    text-align: right;
}

.product-title a {
    color: #1e293b;
    text-decoration: none;
}

.product-title a:hover {
    color: #2563eb;
}

.product-image a {
    display: block;
}

/* Product Gallery Slider */
.product-gallery {
    position: relative;
    margin-bottom: 1rem;
}

.product-gallery-main {
    width: 100%;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.product-gallery-main img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 1rem;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.9);
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #475569;
    transition: all 0.2s;
    z-index: 10;
}

.gallery-nav:hover {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.gallery-prev {
    left: 0.5rem;
}

.gallery-next {
    right: 0.5rem;
}

.gallery-counter {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
}

.product-gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.product-gallery-thumbs .thumb {
    width: 60px;
    height: 60px;
    min-width: 60px;
    object-fit: contain;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    padding: 0.25rem;
    transition: all 0.2s;
}

.product-gallery-thumbs .thumb:hover {
    border-color: #94a3b8;
}

.product-gallery-thumbs .thumb.active {
    border-color: #2563eb;
}

.product-footer {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
}

.product-price {
    margin-bottom: 0.5rem;
}

.price-current,
.price-new {
    font-size: 1.25rem;
    font-weight: 700;
    color: #16a34a;
}

.price-old {
    font-size: 0.875rem;
    color: #94a3b8;
    text-decoration: line-through;
    margin-right: 0.5rem;
}

.price-unit {
    font-size: 0.75rem;
    color: #64748b;
}

.product-stock {
    font-size: 0.75rem;
}

.stock-available {
    color: #16a34a;
}

.stock-empty {
    color: #dc2626;
}

/* Product Detail Page */
.product-detail {
    padding: 0.5rem 0;
}

.product-detail-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.product-detail-description {
    color: #475569;
    line-height: 1.6;
    margin: 1.5rem 0;
}

.product-detail-price {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.25rem;
    margin-top: 1.5rem;
}

.price-block {
    margin-bottom: 0.75rem;
}

.price-label {
    display: block;
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.price-current-large {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
}

.price-old-large {
    font-size: 1.5rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.price-new-large {
    font-size: 2rem;
    font-weight: 700;
    color: #16a34a;
}

.stock-summary {
    margin-bottom: 0.5rem;
}

/* Category Cards */
.category-card {
    display: block;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.25rem;
    text-decoration: none;
    transition: box-shadow 0.2s, transform 0.2s;
    border-left: 4px solid #2563eb;
}

.category-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    text-decoration: none;
}

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

.category-card p {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
}

/* ==========================================================================
   Filter Form
   ========================================================================== */

.filter-form {
    width: 100%;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 150px;
}

.filter-group-wide {
    flex: 2;
    min-width: 200px;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex: 0 0 auto;
}

/* Advanced Filters */
.advanced-filters {
    display: none;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.advanced-filters.show {
    display: block;
}

/* ==========================================================================
   Searchable Select
   ========================================================================== */

.searchable-select {
    position: relative;
}

.searchable-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 300px;
    overflow-y: auto;
    background: white;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 100;
}

.searchable-option {
    padding: 0.625rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.875rem;
}

.searchable-option:last-child {
    border-bottom: none;
}

.searchable-option:hover {
    background: #f1f5f9;
}

.searchable-option .option-sku {
    color: #64748b;
    font-family: monospace;
    font-size: 0.8125rem;
}

.searchable-option .option-unit {
    color: #94a3b8;
    font-size: 0.75rem;
}

.selected-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    font-size: 0.875rem;
}

.btn-clear {
    background: none;
    border: none;
    color: #64748b;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    margin-left: auto;
}

.btn-clear:hover {
    color: #ef4444;
}

/* ==========================================================================
   Cart
   ========================================================================== */

.nav-cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.cart-badge {
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    min-width: 18px;
    text-align: center;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 900px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #f8fafc;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.cart-item-title a {
    color: #1e293b;
    text-decoration: none;
}

.cart-item-title a:hover {
    color: #2563eb;
}

.cart-item-sku {
    font-size: 0.75rem;
    color: #64748b;
}

.cart-item-price {
    margin-top: 0.5rem;
}

.cart-item-warning {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #f59e0b;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
}

.quantity-form {
    display: flex;
    align-items: center;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.25rem;
    color: #64748b;
}

.qty-btn:hover {
    background: #f1f5f9;
}

.qty-input {
    width: 60px;
    height: 32px;
    text-align: center;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    margin: 0 0.25rem;
}

.qty-input-large {
    width: 100px;
    height: 44px;
    text-align: center;
}

.cart-item-subtotal {
    text-align: right;
    min-width: 100px;
}

.subtotal-old {
    font-size: 0.75rem;
    color: #94a3b8;
    text-decoration: line-through;
    display: block;
}

.subtotal-current {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
}

.btn-remove {
    width: 32px;
    height: 32px;
    border: none;
    background: #fee2e2;
    color: #ef4444;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
}

.btn-remove:hover {
    background: #fecaca;
}

.cart-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 1rem;
}

.cart-summary .card {
    padding: 1.5rem;
}

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

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.summary-discount {
    color: #16a34a;
}

.summary-total {
    font-size: 1.25rem;
    font-weight: 700;
    border-bottom: none;
    padding-top: 0.75rem;
}

.add-to-cart-form {
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
}

.add-to-cart-row {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
}

.add-to-cart-inline {
    display: inline;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.product-actions .btn {
    flex: 1;
    text-align: center;
}

.btn-large {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
}

/* ==========================================================================
   Orders
   ========================================================================== */

.order-card {
    background: white;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

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

.order-number {
    font-size: 1.125rem;
    font-weight: 600;
}

.order-date {
    color: #64748b;
    font-size: 0.875rem;
}

.order-items-list {
    margin-bottom: 1rem;
}

.order-item-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
}

.order-total {
    font-size: 1.125rem;
    font-weight: 600;
}

/* Invoice */
.invoice-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
}

.invoice-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #1e293b;
}

.invoice-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.invoice-parties {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.invoice-party h3 {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.invoice-details {
    font-size: 0.875rem;
    line-height: 1.6;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.invoice-table th,
.invoice-table td {
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    text-align: left;
}

.invoice-table th {
    background: #f8fafc;
    font-weight: 600;
}

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

.invoice-totals {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 2rem;
}

.invoice-totals table {
    width: 300px;
}

.invoice-totals td {
    padding: 0.5rem;
}

.invoice-totals .total-row {
    font-weight: 700;
    font-size: 1.125rem;
    border-top: 2px solid #1e293b;
}

@media print {
    .no-print {
        display: none !important;
    }
    
    .invoice-container {
        padding: 0;
    }
}

/* ==========================================================================
   Admin Orders
   ========================================================================== */

.status-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    background: white;
    padding: 0.75rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.status-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    color: #64748b;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.status-tab:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.status-tab.active {
    background: #2563eb;
    color: white;
}

.status-tab .count {
    background: rgba(0,0,0,0.1);
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
}

.status-tab.active .count {
    background: rgba(255,255,255,0.2);
}

.row-warning {
    background: #fef3c7;
}

.shipment-item {
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.shipment-product {
    margin-bottom: 1rem;
}

.shipment-source .form-label {
    font-size: 0.75rem;
    color: #64748b;
}

.stock-info {
    margin-top: 0.5rem;
}

.stock-loc {
    display: inline-block;
    background: #f1f5f9;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge-lg {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.badge-info {
    background: #0ea5e9;
    color: white;
}

.badge-warning {
    background: #f59e0b;
    color: white;
}

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

.badge-success {
    background: #22c55e;
    color: white;
}

.badge-primary {
    background: #2563eb;
    color: white;
}

.text-primary {
    color: #2563eb;
}

.text-danger {
    color: #ef4444;
}

.text-success {
    color: #22c55e;
}

.line-through {
    text-decoration: line-through;
}

.ml-1 {
    margin-left: 0.5rem;
}

.stat-value-warning {
    color: #f59e0b;
}

.order-items-summary {
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.order-actions {
    display: flex;
    gap: 0.5rem;
}

/* ==========================================================================
   Discount Form
   ========================================================================== */

.discount-form {
    display: inline-block;
}

.discount-input-group {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.discount-input-group .form-input {
    width: 70px;
    text-align: center;
}

.discount-percent {
    color: #64748b;
    font-size: 0.875rem;
}

.form-input-sm {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
}

/* ==========================================================================
   Quick Actions
   ========================================================================== */

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

.quick-action-btn:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
    text-decoration: none;
}

.quick-action-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2563eb;
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.quick-action-btn span:last-child {
    font-size: 0.75rem;
    color: #475569;
    text-align: center;
}

/* ==========================================================================
   Table Responsive
   ========================================================================== */

.table-responsive {
    overflow-x: auto;
}

/* ==========================================================================
   Input Group
   ========================================================================== */

.input-group {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.input-group .form-input {
    flex: 1;
}

.input-group .btn {
    flex-shrink: 0;
}

/* ==========================================================================
   Image Preview
   ========================================================================== */

.image-preview {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    object-fit: contain;
}

.image-row,
.attribute-row {
    position: relative;
}

/* ==========================================================================
   Table Simple
   ========================================================================== */

.table-simple {
    width: 100%;
}

.table-simple td {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.table-simple td:first-child {
    color: #64748b;
    width: 40%;
}

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

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    text-align: center;
    padding: 2rem;
    color: #64748b;
    border-top: 1px solid #ddd;
    margin-top: 2rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .header {
        padding: 0 1rem;
    }

    .nav {
        gap: 0.25rem;
    }

    .nav a {
        padding: 0.5rem;
        font-size: 0.75rem;
    }

    .user-info {
        display: none;
    }

    .container {
        padding: 1rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .grid-2,
    .grid-3,
    .grid-5 {
        grid-template-columns: 1fr;
    }

    .page-header-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .table {
        font-size: 0.75rem;
    }

    .table th,
    .table td {
        padding: 0.5rem;
    }

    .actions {
        flex-direction: column;
    }
}
