/* CSS Variables */
:root {
    --bg-primary: #F8F7E4;
    --bg-card: #FDFCF5;
    --bg-card-inner: #F8F7E4;
    --border-card: #E9E7BE;
    --border-light: #EAEADC;
    --text-primary: #114E30;
    --text-secondary: #346A53;
    --text-accent: #187D4D;
    --accent-green: #4A8568;
    --stock-bg: #ECF8E4;
    --gradient-badge: linear-gradient(123deg, #2E7A69 14.39%, #B85412 97.57%);
    --star-filled: #FFAA00;
    --star-empty: #D6D5C8;
    --shadow-soft: 0 4px 20px rgba(17, 78, 48, 0.08);
    --shadow-card: 0 2px 12px rgba(17, 78, 48, 0.06);
    --font-primary: 'Montserrat', sans-serif;
    --font-script: 'Marck Script', cursive;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
}

/* Login Screen */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
}

.login-screen.hidden {
    display: none;
}

.login-container {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 20px;
    padding: 48px 40px;
    box-shadow: var(--shadow-soft);
}

.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

.login-logo-img {
    width: 180px;
    height: auto;
    max-width: 100%;
}

.login-title {
    text-align: center;
    margin: -8px 0;
}

.login-title h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin: 0;
}

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

.login-input-group {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.login-input-group input {
    padding: 12px 16px;
    border: 1px solid var(--border-card);
    border-radius: 12px;
    font-size: 1rem;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: var(--font-primary);
}

.login-input-group input:focus {
    outline: none;
    border-color: var(--text-accent);
    box-shadow: 0 0 0 3px rgba(24, 125, 77, 0.1);
}

.login-continue-btn {
    padding: 14px 24px;
    background: var(--text-accent);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}

.login-continue-btn:hover {
    background: var(--text-primary);
}

.login-continue-btn:active {
    transform: scale(0.98);
}

.login-error {
    background: #FFF0F0;
    border: 1px solid #DC143C;
    color: #DC143C;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    text-align: center;
}

.login-footer {
    margin-top: 16px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.login-footer a {
    color: var(--text-accent);
    text-decoration: none;
    font-weight: 600;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

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

.preloader-logo {
    animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(0.4);
        opacity: 0.7;
    }
    50% {
        transform: scale(0.5);
        opacity: 1;
    }
}

/* Main Content */
.main-content {
    opacity: 1;
    transition: opacity 0.5s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 165px;
}

.main-content.hidden {
    opacity: 0;
    display: none;
}

/* Header */
.header {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 20px;
    padding: 5px 11px;
    display: inline-flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: nowrap;
    gap: 300px;
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    box-shadow: var(--shadow-soft);
}

.header-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo svg,
.header-logo {
    width: 88px;
    height: auto;
    max-width: 88px;
    object-fit: contain;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.header-title h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.subtitle {
    font-family: var(--font-script);
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

/* Search */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
    padding-right: 20px;
    border-right: 1px solid var(--border-card);
    flex-shrink: 0;
}

.search-icon {
    position: absolute;
    left: 14px;
    color: var(--accent-green);
    pointer-events: none;
}

.search-input {
    padding: 10px 16px 10px 44px;
    border: 1px solid var(--border-card);
    border-radius: 12px;
    font-size: 0.9rem;
    width: 480px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--text-accent);
    box-shadow: 0 0 0 3px rgba(24, 125, 77, 0.1);
}

.search-input::placeholder {
    color: var(--accent-green);
    opacity: 0.6;
}

/* Action Buttons */
.header-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.action-btn {
    width: 42px;
    height: 42px;
    border: 1px solid var(--border-card);
    border-radius: 12px;
    background: var(--bg-primary);
    color: var(--accent-green);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.action-btn:hover {
    background: var(--text-accent);
    color: white;
    border-color: var(--text-accent);
}

.action-btn.active {
    background: var(--text-accent);
    color: white;
    border-color: var(--text-accent);
}

/* Filters Bar */
.filters-bar {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 20px;
    padding: 11px;
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    position: fixed;
    top: 105px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 98;
    box-shadow: var(--shadow-soft);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.filter-select {
    padding: 8px 32px 8px 12px;
    border: 1px solid var(--border-card);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234A8568' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

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

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

/* Add New Button */
.add-new-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #2E7D32;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.add-new-btn:hover {
    background: #1B5E20;
    transform: translateY(-1px);
}

.add-new-btn svg {
    flex-shrink: 0;
}

/* Reset Data Button */
.reset-data-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border: 1px solid var(--border-card);
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.reset-data-btn:hover {
    background: #FFF0F0;
    border-color: #DC143C;
    color: #DC143C;
}

/* Stratus Section */
.stratus-section {
    padding: 160px 32px 40px 32px;
}

.stratus-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 60px;
}

.stratus-texts {
    flex: 1;
    max-width: 700px;
}

.stratus-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.stratus-subtitle {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-accent);
    margin-bottom: 16px;
    line-height: 1.4;
}

.stratus-description {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 600px;
}

.stratus-statuses {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 280px;
}

.status-item {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.status-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Grid View */
.grid-view {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 32px;
    flex: 1;
}

/* Rose Card */
.rose-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 25px 25px 15px 15px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: visible;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    position: relative;
}

.rose-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft);
}

.rose-card:has(.card-more-dropdown.active) {
    z-index: 50;
}

/* Card inner wrapper for expansion */
.rose-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--bg-card);
    border-radius: 25px 25px 15px 15px;
    z-index: -1;
    transition: all 0.3s ease;
}

.card-image-container {
    background: var(--bg-card-inner);
    border: 1px solid var(--border-light);
    border-radius: 23px;
    padding: 10px;
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.card-image-container .card-image-inner {
    position: absolute;
    inset: 10px;
    border-radius: 20px;
    overflow: hidden;
}

/* More Button (3 dots) */
.card-more-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border-card);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card-more-btn:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-more-btn svg {
    color: var(--text-secondary);
}

/* More Dropdown Menu */
.card-more-dropdown {
    position: absolute;
    top: 52px;
    right: 16px;
    background: white;
    border: 1px solid var(--border-card);
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    z-index: 100;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
}

.card-more-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    width: 100%;
    border: none;
    background: none;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s;
    text-align: left;
}

.dropdown-item:hover {
    background: var(--bg-primary);
}

.dropdown-item.delete {
    color: #DC143C;
}

.dropdown-item.delete:hover {
    background: #FFF0F0;
}

.dropdown-item svg {
    flex-shrink: 0;
}

.card-image-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(33, 105, 4, 0.05) 0%, rgba(159, 69, 25, 0.05) 100%);
    border-radius: 20px;
    pointer-events: none;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-image-placeholder {
    font-size: 4rem;
    opacity: 0.3;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-content {
    padding: 10px;
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.card-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    flex: 1;
    line-height: 1.2;
}

.card-code-price {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.card-code {
    background: var(--gradient-badge);
    border-radius: 7px;
    padding: 4px 8px;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 32px;
    text-align: center;
}

.card-price {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-accent);
}

.card-type {
    font-family: var(--font-script);
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Description removed in collapsed version */

/* Card Specs */
.card-specs {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-top: 8px;
}

.spec-row {
    display: flex;
    align-items: center;
    gap: 3px;
}

.spec-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.spec-text {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-primary);
    letter-spacing: 0.03em;
}

.colour-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #8D001C;
    flex-shrink: 0;
    margin: 0 5.5px;
}

/* Price Row - removed in collapsed version, price is now in header */

/* Stock Row */
.card-stock-row {
    border: 1px solid var(--text-accent);
    border-radius: 10px;
    padding: 7px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stock-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-primary);
}

.stock-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-accent);
}

/* Card Actions */
.card-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.select-btn {
    flex: 1;
    background: var(--text-accent);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.select-btn:hover {
    background: var(--text-primary);
}

.expand-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--text-accent);
    border-radius: 10px;
    background: transparent;
    color: var(--text-accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.expand-btn:hover {
    background: var(--text-accent);
    color: white;
}

.expand-btn.expanded svg {
    transform: rotate(180deg);
}

.expand-btn svg {
    transition: transform 0.3s ease;
}

/* Expanded Content (hidden by default) */
.card-expanded-content {
    display: none;
}

.card-description {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 12px;
}

.expanded-specs {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.aroma-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 4px;
}

.aroma-label {
    display: flex;
    align-items: center;
    gap: 3px;
}

.aroma-label span {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.aroma-stars {
    display: flex;
    gap: 3px;
    padding: 2px 0;
}

.star {
    width: 18px;
    height: 17px;
}

.star.filled path {
    fill: var(--star-filled);
}

.star.empty path {
    fill: var(--star-empty);
}

.expanded-price-row {
    background: #ECF8E4;
    border-radius: 10px;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.expanded-price-row .price-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.expanded-price-row .price-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-accent);
}

/* Expanded Card Overlay */
.card-expanded-overlay {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-top: none;
    border-radius: 0 0 15px 15px;
    padding: 0 10px 10px 10px;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(17, 78, 48, 0.15);
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Expanded Card State */
.rose-card.expanded {
    z-index: 50;
    border-radius: 25px 25px 0 0;
}

.rose-card.expanded::before {
    border-radius: 25px 25px 0 0;
    box-shadow: 0 -4px 16px rgba(17, 78, 48, 0.1);
}

.rose-card.expanded .card-expanded-overlay {
    display: block;
}

/* List View */
.list-view {
    padding: 32px;
    flex: 1;
}

.list-view.hidden {
    display: none;
}

.stock-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.stock-table thead {
    background: var(--text-primary);
}

.stock-table th {
    padding: 16px 20px;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    letter-spacing: 0.02em;
}

.stock-table tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: background 0.2s;
}

.stock-table tbody tr:hover {
    background: var(--bg-card-inner);
}

.stock-table td {
    padding: 14px 20px;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.stock-table td:first-child {
    font-weight: 700;
}

.stock-table td:last-child {
    font-weight: 700;
    color: var(--text-accent);
}

.table-colour {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-colour-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Footer */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-card);
    padding: 24px 32px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 78, 48, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 20px;
    max-width: 480px;
    width: 90%;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    font-size: 1.5rem;
    color: var(--accent-green);
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
}

.modal-close:hover {
    background: var(--bg-primary);
}

.modal-body {
    padding: 24px;
}

.modal-body p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.share-link-container {
    display: flex;
    gap: 8px;
}

.share-link-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-card);
    border-radius: 10px;
    font-size: 0.85rem;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.copy-btn {
    padding: 12px 20px;
    background: var(--text-accent);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: var(--text-primary);
}

.copy-success {
    color: var(--text-accent);
    font-weight: 600;
    margin-top: 12px;
    text-align: center;
}

.copy-success.hidden {
    display: none;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Print Styles */
@media print {
    .preloader,
    .header-actions,
    .search-container,
    .filters-bar,
    .modal {
        display: none !important;
    }

    .header {
        position: relative;
        box-shadow: none;
        border-bottom: 2px solid var(--text-primary);
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .main-content {
        display: block !important;
        opacity: 1 !important;
    }

    .grid-view {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
        padding: 16px;
    }

    .rose-card {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .list-view {
        padding: 16px;
    }

    .stock-table {
        box-shadow: none;
    }

    .stock-table thead {
        background: var(--text-primary) !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .stock-table th {
        color: white !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .footer {
        display: none;
    }

    body {
        background: white;
    }
}

/* Responsive - Tablet */
@media (max-width: 1200px) {
    .grid-view {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .grid-view {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 24px;
    }

    .header {
        padding: 16px 24px;
        left: 50px;
        right: 50px;
        gap: 16px;
        flex-wrap: wrap;
    }

    .filters-bar {
        padding: 12px 24px;
        left: 50px;
        right: 50px;
        position: relative;
        top: 0;
    }

    .main-content {
        padding-top: 100px;
    }

    .list-view {
        padding: 24px;
    }

    .search-input {
        width: 220px;
    }

    .search-container {
        border-right: none;
        padding-right: 0;
    }
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 20px;
    padding: 11px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    box-shadow: var(--shadow-soft);
}

.mobile-nav-btn {
    position: relative;
    width: 48px;
    height: 48px;
    border: 1px solid var(--border-card);
    background: var(--bg-primary);
    color: var(--accent-green);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    border-radius: 12px;
}

.mobile-nav-btn:active {
    background: var(--text-accent);
    color: white;
    border-color: var(--text-accent);
    transform: scale(0.95);
}

.mobile-nav-btn .flag-icon {
    font-size: 1.8rem;
}

.mobile-nav-btn .basket-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--text-accent);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--bg-card);
}

.mobile-search-btn {
    display: none;
}

/* Mobile Search Modal */
.mobile-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: 2000;
    padding: 16px;
}

.mobile-search-modal.hidden {
    display: none !important;
}

.mobile-search-modal:not(.hidden) {
    display: block;
}

.mobile-search-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-search-close {
    align-self: flex-end;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-primary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-search-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.mobile-search-input-container .search-icon {
    position: absolute;
    left: 14px;
    color: var(--accent-green);
    pointer-events: none;
}

.mobile-search-input-container .search-input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    font-size: 1rem;
}

/* Login Screen Responsive */
@media (max-width: 768px) {
    .login-container {
        gap: 24px;
        padding: 32px 24px;
        margin: 20px;
    }

    .login-logo-img {
        width: 150px;
    }

    .login-title h1 {
        font-size: 1.25rem;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .header {
        padding: 6px 11px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        left: 15px;
        right: 15px;
        transform: none;
        display: flex;
        gap: 20px;
        border-radius: 20px;
        top: 15px;
    }

    .header-left {
        justify-content: flex-start;
    }

    .logo {
        display: flex;
        align-items: center;
    }

    .logo svg,
    .header-logo {
        width: 100px;
        height: auto;
        max-width: 100px;
        object-fit: contain;
        display: block;
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    .desktop-search {
        display: none !important;
    }

    .desktop-actions {
        display: none !important;
    }

    .mobile-search-btn {
        display: flex;
    }

    .mobile-bottom-nav {
        display: flex;
    }

    .filters-bar {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        position: relative;
        top: 0;
        border-radius: 20px;
        display: inline-flex;
        padding: 11px;
        gap: 12px;
        margin: 0;
        margin-top: 20px;
        width: auto;
        max-width: calc(100% - 60px);
    }

    .main-content {
        padding-top: 90px;
        padding-bottom: 90px;
    }

    .filter-group {
        flex: 1 1 calc(50% - 6px);
        min-width: 140px;
    }

    .filter-select {
        width: 100%;
    }

    .results-count {
        flex: 1 1 100%;
        text-align: center;
        margin-left: 0;
    }

    .add-new-btn {
        flex: 1 1 100%;
        justify-content: center;
        order: -1;
    }

    /* Stratus Section Mobile */
    .stratus-section {
        padding: 60px 16px 30px 16px;
    }

    .stratus-content {
        flex-direction: column;
        gap: 30px;
    }

    .stratus-texts {
        max-width: 100%;
    }

    .stratus-title {
        font-size: 1.8rem;
    }

    .stratus-subtitle {
        font-size: 1rem;
    }

    .stratus-description {
        font-size: 0.9rem;
    }

    .stratus-statuses {
        min-width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }

    .status-item {
        flex: 1 1 calc(50% - 5px);
        min-width: 140px;
        padding: 12px 14px;
    }

    .status-value {
        font-size: 0.85rem;
    }

    .grid-view {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        padding: 16px;
    }

    /* Card image remains square with aspect-ratio */

    .card-name {
        font-size: 0.9rem;
    }

    .list-view {
        padding: 16px;
        overflow-x: auto;
    }

    .stock-table {
        min-width: 700px;
    }

    .footer {
        padding: 20px 16px;
    }
}

@media (max-width: 480px) {
    .grid-view {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Card image remains square with aspect-ratio */

    .filter-group {
        flex: 1 1 100%;
    }

    .logo svg,
    .header-logo {
        width: 100px;
        height: auto;
        max-width: 100px;
        object-fit: contain;
        display: block;
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    .header-title h1 {
        font-size: 1rem;
    }
}

/* Language Flag Icon */
.flag-icon {
    font-size: 1.5rem;
    line-height: 1;
    display: inline-block;
}

/* Language Modal */
.language-modal-content {
    max-width: 400px;
}

.language-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-primary);
    border: 2px solid var(--border-card);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.language-option:hover {
    background: var(--bg-card-inner);
    border-color: var(--text-accent);
}

.language-option.active {
    background: var(--text-accent);
    border-color: var(--text-accent);
    color: white;
}

.language-option .flag-icon {
    font-size: 1.8rem;
}

.language-option .language-name {
    flex: 1;
    text-align: left;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-green);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-accent);
}

/* Loading Animation for Cards */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.loading-card {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-inner) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Basket Button */
.basket-btn {
    position: relative;
}

.basket-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #DC143C;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.basket-count:empty,
.basket-count[data-count="0"] {
    display: none;
}

/* Select Button States */
.select-btn.selected {
    background: var(--text-accent);
    color: white;
    border-color: var(--text-accent);
}

.select-btn.selected:hover {
    background: var(--text-primary);
    border-color: var(--text-primary);
}

/* Basket Modal */
.basket-modal-content {
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.basket-modal-content .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

.basket-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.basket-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: 12px;
    border: 1px solid var(--border-light);
}

.basket-item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-card-inner);
}

.basket-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.basket-item-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.basket-item-details {
    flex: 1;
    min-width: 0;
}

.basket-item-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.basket-item-info {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.basket-item-price {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-accent);
    margin-right: 8px;
}

.basket-item-remove {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--bg-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    color: var(--text-secondary);
}

.basket-item-remove:hover {
    background: #DC143C;
    color: white;
}

.basket-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #aaa;
}

.basket-empty p {
    margin-top: 12px;
    font-size: 0.9rem;
}

.basket-footer {
    display: flex;
    justify-content: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
    margin-top: 16px;
}

.clear-basket-btn {
    padding: 10px 24px;
    background: transparent;
    border: 1px solid #DC143C;
    color: #DC143C;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.clear-basket-btn:hover {
    background: #DC143C;
    color: white;
}

/* Rose Add/Edit Modal */
.rose-modal-content {
    max-width: 520px;
}

.rose-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input {
    padding: 10px 14px;
    border: 1px solid var(--border-card);
    border-radius: 10px;
    font-size: 0.9rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--text-accent);
    box-shadow: 0 0 0 3px rgba(24, 125, 77, 0.1);
}

.form-row {
    display: flex;
    gap: 12px;
}

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

/* Image Upload */
.image-upload-container {
    width: 100%;
}

.image-preview {
    width: 100%;
    height: 150px;
    border: 2px dashed var(--border-card);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-primary);
    overflow: hidden;
}

.image-preview:hover {
    border-color: var(--text-accent);
    background: var(--bg-card-inner);
}

.image-preview span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview.has-image {
    border-style: solid;
    border-color: var(--border-card);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
}

.cancel-btn {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--border-card);
    color: var(--text-secondary);
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cancel-btn:hover {
    background: var(--bg-primary);
    border-color: var(--text-secondary);
}

.save-btn {
    padding: 10px 24px;
    background: #2E7D32;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.save-btn:hover {
    background: #1B5E20;
}

/* Delete Modal */
.delete-modal-content {
    max-width: 420px;
}

.delete-rose-info {
    background: var(--bg-primary);
    border-radius: 10px;
    padding: 12px 16px;
    margin: 16px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.delete-rose-info .rose-thumb {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--bg-card-inner);
}

.delete-rose-info .rose-details {
    flex: 1;
}

.delete-rose-info .rose-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.delete-rose-info .rose-type {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.delete-confirm-btn {
    padding: 10px 24px;
    background: #DC143C;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.delete-confirm-btn:hover {
    background: #B01030;
}

