/* ============================================
   BLOOM & FLOURISH - FLOWER SHOP INVENTORY
   Premium Glass-Style Floral UI Design
   ============================================ */

/* CSS Variables */
:root {
    /* Primary Colors */
    --white: #ffffff;
    --blush-tint: #f8e8e9;
    --dusty-rose: #d8a7b1;
    --dusty-rose-dark: #c48b95;
    --eucalyptus: #b5c7b2;
    --eucalyptus-dark: #9ab396;
    
    /* Neutral Colors */
    --cream: #fdf9f7;
    --soft-beige: #f5efe8;
    --warm-gray: #9a8f8a;
    --charcoal: #4a4543;
    --deep-charcoal: #2d2a28;
    
    /* Status Colors */
    --success: #7cb899;
    --warning: #e8c77b;
    --danger: #d88a8a;
    --info: #8fb8c9;
    
    /* Shadows & Effects */
    --shadow-soft: 0 4px 20px rgba(74, 69, 67, 0.08);
    --shadow-medium: 0 8px 32px rgba(74, 69, 67, 0.12);
    --shadow-glow: 0 0 40px rgba(216, 167, 177, 0.2);
    
    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(216, 167, 177, 0.3);
    --glass-blur: 12px;
    
    /* Typography */
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Quicksand', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
    font-family: var(--font-sans);
    background: var(--cream);
    color: var(--charcoal);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Floral Background */
.floral-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(216, 167, 177, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(181, 199, 178, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 30%, rgba(248, 232, 233, 0.4) 0%, transparent 40%),
        linear-gradient(180deg, var(--cream) 0%, var(--soft-beige) 100%);
}

.floral-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%23d8a7b1'%3E%3Cpath d='M40 10c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 14c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5z'/%3E%3Cpath d='M40 52c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 14c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5z'/%3E%3Cpath d='M19 31c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 14c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5z'/%3E%3Cpath d='M61 31c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 14c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5z'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 600;
    color: var(--deep-charcoal);
    line-height: 1.3;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

p {
    color: var(--warm-gray);
}

/* Utility Classes */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--warm-gray); }
.mb-3 { margin-bottom: 1rem; }
.mt-3 { margin-top: 1rem; }
.flex-grow { flex-grow: 1; }

/* ============================================
   GLASS CARD COMPONENT
   ============================================ */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-soft);
    padding: 1rem;
    transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}

.glass-card:hover {
    box-shadow: var(--shadow-medium);
}

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

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

.card-header-inline h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.card-header-inline h3 i {
    color: var(--dusty-rose);
}

.card-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--dusty-rose), transparent);
    margin: 1rem 0;
    opacity: 0.5;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--dusty-rose), var(--dusty-rose-dark));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(216, 167, 177, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(216, 167, 177, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--dusty-rose);
    color: var(--dusty-rose-dark);
}

.btn-outline:hover {
    background: var(--blush-tint);
}

.btn-success {
    background: linear-gradient(135deg, var(--eucalyptus), var(--eucalyptus-dark));
    color: var(--white);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #c67777);
    color: var(--white);
}

.btn-full { width: 100%; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1rem; }

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
}

.form-group label i {
    color: var(--dusty-rose);
    font-size: 0.85rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1.5px solid rgba(216, 167, 177, 0.3);
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    background: var(--white);
    color: var(--charcoal);
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--dusty-rose);
    box-shadow: 0 0 0 3px rgba(216, 167, 177, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--warm-gray);
    opacity: 0.7;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.form-section {
    background: var(--blush-tint);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
}

.form-section h4 {
    margin-bottom: 1rem;
    color: var(--dusty-rose-dark);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(216, 167, 177, 0.2);
}

/* File Upload */
.file-upload {
    position: relative;
}

.file-upload input[type="file"] {
    padding: 0.75rem;
}

.file-upload-preview {
    margin-top: 0.75rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    max-height: 150px;
}

.file-upload-preview img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.camera-upload {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.camera-upload span {
    color: var(--warm-gray);
}

/* ============================================
   LOGIN PAGE
   ============================================ */
#login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-container {
    width: 100%;
    max-width: 420px;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    padding: 2.5rem;
}

.login-card .logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    overflow: hidden;
}

.login-card .logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 600;
    color: var(--deep-charcoal);
    margin-bottom: 0.5rem;
}

.brand-subtitle {
    font-size: 0.95rem;
    color: var(--warm-gray);
}

.login-footer {
    margin-top: 1.5rem;
    text-align: center;
}

.design-philosophy {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--warm-gray);
}

/* ============================================
   MOBILE-FIRST BOTTOM NAVIGATION
   ============================================ */
#app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: 80px; /* Space for bottom nav */
}

.glass-sidebar {
    width: 100%;
    height: auto;
    position: fixed;
    left: 0;
    bottom: 0;
    top: auto;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-top: 1px solid var(--glass-border);
    border-right: none;
    display: flex;
    flex-direction: row;
    padding: 0.5rem 0.25rem;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(74, 69, 67, 0.1);
}

.sidebar-header {
    display: none;
}

.logo-small {
    display: none;
}

.logo-small img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sidebar-brand {
    display: none;
}

.sidebar-user {
    display: none;
}

.user-avatar {
    width: 45px;
    height: 45px;
    background: var(--blush-tint);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar i {
    font-size: 1.5rem;
    color: var(--dusty-rose);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    color: var(--charcoal);
    font-size: 0.95rem;
}

.user-role {
    font-size: 0.8rem;
    color: var(--warm-gray);
    text-transform: capitalize;
}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-item {
    margin: 0;
    flex: 1;
    min-width: 60px;
    max-width: 80px;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.5rem 0.25rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--warm-gray);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.nav-link:hover {
    background: transparent;
    color: var(--dusty-rose-dark);
}

.nav-link.active {
    background: transparent;
    color: var(--dusty-rose-dark);
    box-shadow: none;
}

.nav-link.active i {
    background: linear-gradient(135deg, var(--dusty-rose), var(--dusty-rose-dark));
    color: var(--white);
    padding: 0.5rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(216, 167, 177, 0.3);
}

.nav-link i {
    width: auto;
    text-align: center;
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-link span {
    font-size: 0.65rem;
    text-align: center;
    line-height: 1.2;
}

.sidebar-footer {
    display: none;
}

/* ============================================
   MOBILE HEADER
   ============================================ */
.mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    margin: 0.5rem;
    margin-bottom: 0;
    border-radius: var(--radius-lg);
}

.mobile-header-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-header-logo img {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

.mobile-header-logo span {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--deep-charcoal);
}

.mobile-header-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-header-user span {
    font-size: 0.8rem;
    color: var(--warm-gray);
    text-transform: capitalize;
}

#mobile-logout-btn {
    padding: 0.5rem;
    min-height: auto;
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
#main-content {
    flex: 1;
    margin-left: 0;
    padding: 1rem;
    padding-top: 0.5rem;
    min-height: 100vh;
    width: 100%;
}

.page-content {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.page-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 1rem;
    gap: 0.75rem;
}

.header-left {
    flex: 1;
}

.page-title {
    font-size: 1.5rem;
    margin-bottom: 0.15rem;
}

.page-subtitle {
    font-size: 0.85rem;
    color: var(--warm-gray);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Search Box */
.search-box {
    position: relative;
    flex: 1;
    min-width: 0;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--warm-gray);
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 1.5px solid rgba(216, 167, 177, 0.3);
    border-radius: var(--radius-lg);
    background: var(--white);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.search-box input:focus {
    outline: none;
    border-color: var(--dusty-rose);
    box-shadow: 0 0 0 3px rgba(216, 167, 177, 0.15);
}

/* ============================================
   DASHBOARD
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
}

.stat-icon {
    width: 45px;
    height: 45px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
}

.stat-icon i {
    font-size: 1.1rem;
    color: var(--white);
}

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

.stat-value {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--deep-charcoal);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--warm-gray);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.alert-card {
    max-height: 350px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.alert-card.full-width {
    grid-column: 1 / -1;
}

.alert-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.alert-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--blush-tint);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}

.alert-item-name {
    font-weight: 500;
    color: var(--charcoal);
}

.alert-item-info {
    font-size: 0.85rem;
    color: var(--warm-gray);
}

.alert-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-danger {
    background: rgba(216, 138, 138, 0.2);
    color: var(--danger);
}

.badge-warning {
    background: rgba(232, 199, 123, 0.2);
    color: #c9a54d;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--warm-gray);
    font-style: italic;
}

.pending-days-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.pending-day-badge {
    padding: 0.5rem 1rem;
    background: rgba(216, 138, 138, 0.15);
    border: 1px solid rgba(216, 138, 138, 0.3);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--danger);
}

/* ============================================
   PRODUCTS GRID
   ============================================ */
.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.product-card {
    position: relative;
    transition: all var(--transition-normal);
    padding: 1rem;
}

.product-card:hover {
    transform: none;
    box-shadow: var(--shadow-medium);
}

.product-card-content {
    cursor: pointer;
    display: flex;
    gap: 1rem;
}

.product-actions {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
    opacity: 1;
}

.product-card:hover .product-actions {
    opacity: 1;
}

.product-image {
    width: 80px;
    height: 80px;
    min-width: 80px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--blush-tint), var(--soft-beige));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.product-image i {
    font-size: 2rem;
    color: var(--dusty-rose);
    opacity: 0.6;
}

.product-card-details {
    flex: 1;
    min-width: 0;
}

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

.product-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-category {
    font-size: 0.75rem;
    color: var(--eucalyptus-dark);
    text-transform: capitalize;
    margin-bottom: 0.25rem;
}

.product-price {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dusty-rose-dark);
}

.product-items-summary {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--blush-tint);
    border-radius: var(--radius-sm);
    max-height: 100px;
    overflow-y: auto;
}

.item-requirement {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.6rem;
    margin-bottom: 0.35rem;
    border-radius: 6px;
    font-size: 0.8rem;
}

.item-requirement:last-child {
    margin-bottom: 0;
}

.item-requirement.sufficient {
    background: rgba(124, 184, 153, 0.15);
    border-left: 3px solid var(--success);
}

.item-requirement.insufficient {
    background: rgba(216, 138, 138, 0.15);
    border-left: 3px solid var(--danger);
}

.item-requirement .item-name {
    color: var(--charcoal);
    font-weight: 600;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 0.75rem;
}

.item-requirement .item-stock-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    gap: 0.15rem;
}

.item-requirement .stock-available {
    font-weight: 600;
    font-size: 0.75rem;
}

.item-requirement .stock-needed {
    font-size: 0.7rem;
    color: var(--warm-gray);
}

.item-requirement.sufficient .stock-available {
    color: var(--success);
}

.item-requirement.insufficient .stock-available {
    color: var(--danger);
}

.product-status {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.5rem;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(124, 184, 153, 0.15);
    color: var(--success);
}

.product-status.needs-more {
    background: rgba(216, 138, 138, 0.2);
    color: var(--danger);
    font-weight: 600;
}

.product-status.needs-more i {
    font-size: 0.9rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-available {
    background: var(--success);
}

.status-unavailable {
    background: var(--danger);
}

.product-status span {
    font-size: 0.85rem;
    color: var(--warm-gray);
}

/* ============================================
   DATA TABLES - Mobile Optimized
   ============================================ */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.data-table th,
.data-table td {
    padding: 0.75rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid rgba(216, 167, 177, 0.15);
}

.data-table th {
    font-family: var(--font-serif);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--dusty-rose-dark);
    background: var(--blush-tint);
    white-space: nowrap;
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: rgba(248, 232, 233, 0.5);
}

.data-table .item-image {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--blush-tint);
}

.data-table .item-image-placeholder {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--blush-tint);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dusty-rose);
}

/* Mobile-friendly item cards */
.items-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.item-mobile-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
}

.item-mobile-image {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: var(--radius-sm);
    background: var(--blush-tint);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.item-mobile-image i {
    font-size: 1.25rem;
    color: var(--dusty-rose);
}

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

.item-mobile-name {
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 0.25rem;
}

.item-mobile-details {
    display: flex;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--warm-gray);
}

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

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
}

.status-in-stock {
    background: rgba(124, 184, 153, 0.15);
    color: var(--success);
}

.status-low-stock {
    background: rgba(232, 199, 123, 0.15);
    color: #c9a54d;
}

.status-out-of-stock {
    background: rgba(216, 138, 138, 0.15);
    color: var(--danger);
}

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

.action-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn-edit {
    background: rgba(143, 184, 201, 0.15);
    color: var(--info);
}

.action-btn-delete {
    background: rgba(216, 138, 138, 0.15);
    color: var(--danger);
}

.action-btn-quantity {
    background: rgba(181, 199, 178, 0.15);
    color: var(--eucalyptus-dark);
}

.action-btn:hover {
    transform: scale(1.1);
}

/* ============================================
   CHECKOUT PAGE
   ============================================ */
.checkout-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.8rem;
}

.checkout-status.pending {
    background: rgba(232, 199, 123, 0.2);
    color: #c9a54d;
}

.checkout-status.completed {
    background: rgba(124, 184, 153, 0.2);
    color: var(--success);
}

.date-badge {
    padding: 0.3rem 0.6rem;
    background: var(--blush-tint);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--dusty-rose-dark);
    font-weight: 500;
}

.checkout-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.checkout-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--blush-tint);
    border-radius: var(--radius-md);
    border: 1px solid rgba(216, 167, 177, 0.2);
}

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

.checkout-item-name {
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 0.15rem;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.checkout-item-current {
    font-size: 0.75rem;
    color: var(--warm-gray);
}

.checkout-item input {
    width: 70px;
    padding: 0.5rem;
    text-align: center;
    border: 1.5px solid rgba(216, 167, 177, 0.3);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
}

/* Calendar View */
.calendar-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.month-year-label {
    font-weight: 600;
    color: var(--charcoal);
    min-width: 150px;
    text-align: center;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    color: var(--dusty-rose-dark);
    padding: 0.75rem;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.calendar-day.empty {
    cursor: default;
    opacity: 0;
}

.calendar-day.future {
    background: rgba(200, 200, 200, 0.1);
    cursor: default;
    opacity: 0.4;
}

.calendar-day.pending {
    background: rgba(232, 199, 123, 0.15);
    border-color: rgba(232, 199, 123, 0.3);
}

.calendar-day.pending:hover {
    background: rgba(232, 199, 123, 0.25);
    border-color: rgba(232, 199, 123, 0.5);
    transform: scale(1.05);
}

.calendar-day.completed {
    background: rgba(124, 184, 153, 0.15);
    border-color: rgba(124, 184, 153, 0.3);
}

.calendar-day.completed:hover {
    background: rgba(124, 184, 153, 0.25);
    border-color: rgba(124, 184, 153, 0.5);
    transform: scale(1.05);
}

.calendar-day.today {
    border-color: var(--dusty-rose);
    box-shadow: 0 0 0 2px rgba(216, 167, 177, 0.2);
}

.day-number {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 0.25rem;
}

.day-status {
    font-size: 1rem;
}

.calendar-day.pending .day-status {
    color: #c9a54d;
}

.calendar-day.completed .day-status {
    color: var(--success);
}

/* Checkout Details Modal */
.checkout-details-header {
    margin-bottom: 1rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.status-badge.completed {
    background: rgba(124, 184, 153, 0.2);
    color: var(--success);
}

.status-badge.pending {
    background: rgba(232, 199, 123, 0.2);
    color: #c9a54d;
}

.checkout-logs {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.checkout-log-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--blush-tint);
    border-radius: var(--radius-sm);
}

.log-item-name {
    font-weight: 600;
    color: var(--charcoal);
}

.log-item-change {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.log-previous {
    color: var(--warm-gray);
}

.log-new {
    font-weight: 600;
    color: var(--charcoal);
}

.log-change {
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

.log-change.positive {
    color: var(--success);
    background: rgba(124, 184, 153, 0.1);
}

.log-change.negative {
    color: var(--danger);
    background: rgba(216, 138, 138, 0.1);
}

.log-change.neutral {
    color: var(--warm-gray);
}

.checkout-notes {
    padding: 1rem;
    background: var(--blush-tint);
    border-radius: var(--radius-sm);
    color: var(--charcoal);
    line-height: 1.6;
}

/* Mobile Calendar */
@media (max-width: 768px) {
    .calendar-grid {
        gap: 0.25rem;
    }
    
    .calendar-day {
        padding: 0.25rem;
    }
    
    .day-number {
        font-size: 0.9rem;
    }
    
    .day-status {
        font-size: 0.8rem;
    }
    
    .calendar-day-header {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
    
    .month-year-label {
        font-size: 0.9rem;
        min-width: 120px;
    }
}

/* ============================================
   RECEIPTS
   ============================================ */
.receipts-filters {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    padding: 0.75rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex: 1;
    min-width: 120px;
}

.filter-group label {
    font-size: 0.8rem;
    color: var(--warm-gray);
}

.filter-group input {
    flex: 1;
    padding: 0.5rem;
    border: 1.5px solid rgba(216, 167, 177, 0.3);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    min-width: 0;
}

.receipts-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.receipt-card {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    padding: 0.75rem;
}

.receipt-image {
    width: 70px;
    height: 70px;
    min-width: 70px;
    border-radius: var(--radius-md);
    background: var(--blush-tint);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.receipt-image i {
    font-size: 1.5rem;
    color: var(--dusty-rose);
    opacity: 0.5;
}

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

.receipt-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.25rem;
}

.receipt-product {
    font-weight: 600;
    color: var(--charcoal);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.receipt-amount {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dusty-rose-dark);
    white-space: nowrap;
}

.receipt-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--warm-gray);
}

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 42, 40, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
    overflow-y: auto;
}

/* Nested overlay for popups on top of modals */
.nested-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 42, 40, 0.7);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.bottom-slide {
    align-items: flex-end;
    padding: 0;
    overflow-y: hidden;
}

.modal {
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUpMobile 0.3s ease;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding-bottom: 100px; /* Space for bottom nav */
    margin: auto;
}

.modal.popup {
    border-radius: var(--radius-lg);
    padding-bottom: 1.5rem;
    animation: popupFadeIn 0.3s ease;
    max-width: 90%;
    width: 100%;
    max-width: 400px;
    max-height: 85vh;
    margin: 1rem auto;
    position: relative;
    box-sizing: border-box;
}

.modal-overlay.bottom-slide .modal {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

@keyframes slideUpMobile {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-lg {
    max-width: 100%;
}

.modal-sm {
    max-width: 100%;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.modal-header h2 {
    font-size: 1.5rem;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--blush-tint);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--charcoal);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--dusty-rose);
    color: var(--white);
}

/* Product Items in Modal */
.product-items-list {
    margin-bottom: 1rem;
}

.product-item-row-wrapper {
    margin-bottom: 1rem;
}

.product-item-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.75rem;
    background: var(--white);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(216, 167, 177, 0.2);
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.product-item-row select {
    flex: 1;
    min-width: 0;
    padding: 0.5rem;
    border: 1.5px solid rgba(216, 167, 177, 0.3);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-item-row input {
    width: 60px;
    min-width: 60px;
    flex-shrink: 0;
    padding: 0.5rem;
    text-align: center;
    border: 1.5px solid rgba(216, 167, 177, 0.3);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    box-sizing: border-box;
}

.product-item-row .btn-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    flex-shrink: 0;
    border: none;
    background: rgba(216, 138, 138, 0.15);
    color: var(--danger);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    box-sizing: border-box;
}

.product-item-row .btn-icon:hover {
    background: rgba(216, 138, 138, 0.25);
}

.product-item-row .btn-alt {
    background: rgba(181, 199, 178, 0.15);
    color: var(--eucalyptus-dark);
}

.product-item-row .btn-alternatives {
    background: rgba(181, 199, 178, 0.15);
    color: var(--eucalyptus-dark);
}

/* Alternatives container in product edit form */
.product-alternatives-container {
    margin-left: 1rem;
    margin-top: 0.5rem;
    padding-left: 1rem;
    border-left: 2px solid rgba(181, 199, 178, 0.3);
}

.product-alternatives-container .alternative-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: rgba(181, 199, 178, 0.1);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    border: 1px solid rgba(181, 199, 178, 0.2);
}

.alternative-item-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.alternative-item-info i {
    color: var(--eucalyptus-dark);
    font-size: 0.85rem;
}

.alternative-item-name {
    font-weight: 500;
    color: var(--charcoal);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.alternative-item-qty {
    color: var(--text-muted);
    font-size: 0.9rem;
    white-space: nowrap;
}

.btn-small {
    width: 24px;
    height: 24px;
    min-width: 24px;
    font-size: 0.7rem;
    padding: 0;
}

/* Mobile adjustments for product item row */
@media (max-width: 480px) {
    .product-item-row {
        gap: 0.4rem;
        padding: 0.6rem;
    }
    
    .product-item-row input {
        width: 50px;
        min-width: 50px;
        padding: 0.4rem;
        font-size: 0.85rem;
    }
    
    .product-item-row .btn-icon {
        width: 28px;
        height: 28px;
        min-width: 28px;
        font-size: 0.75rem;
    }
    
    .product-item-row select {
        font-size: 0.85rem;
        padding: 0.4rem;
    }
    
    .product-alternatives-container {
        margin-left: 0.5rem;
        padding-left: 0.5rem;
    }
    
    .alternative-item-info {
        font-size: 0.85rem;
    }
    
    .alternative-item-qty {
        font-size: 0.8rem;
    }
    
    .btn-small {
        width: 22px;
        height: 22px;
        min-width: 22px;
    }
}

/* Alternatives List */
.alternatives-list {
    max-height: 200px;
    overflow-y: auto;
}

.alternative-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--blush-tint);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}

.alternative-info {
    display: flex;
    flex-direction: column;
}

.alternative-name {
    font-weight: 500;
}

.alternative-qty {
    font-size: 0.85rem;
    color: var(--warm-gray);
}

/* Alternatives button in product form */
.btn-alternatives {
    background: rgba(181, 199, 178, 0.2);
    color: var(--eucalyptus-dark);
}

.btn-alternatives:hover {
    background: rgba(181, 199, 178, 0.4);
}

/* Alternatives section in product details */
.alternatives-section {
    margin-left: 0.5rem;
    margin-bottom: 0.75rem;
    padding-left: 0.75rem;
    border-left: 2px solid var(--eucalyptus);
}

.alternatives-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    color: var(--eucalyptus-dark);
    font-size: 0.85rem;
    font-weight: 600;
}

.alternatives-header i {
    font-size: 0.9rem;
}

.alternative-item-row {
    background: rgba(181, 199, 178, 0.1);
    margin-bottom: 0.5rem;
}

.alternative-item-row.sufficient {
    background: rgba(124, 184, 153, 0.15);
    border-left: 3px solid var(--success);
}

/* Product Details Modal */
#product-details-content {
    padding: 0.5rem 0;
}

.needs-more-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(216, 138, 138, 0.2), rgba(216, 138, 138, 0.1));
    border: 1px solid rgba(216, 138, 138, 0.4);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.needs-more-banner i {
    font-size: 1.5rem;
    color: var(--danger);
}

.needs-more-content {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.needs-more-content strong {
    color: var(--danger);
    font-size: 1rem;
}

.needs-more-content span {
    color: var(--charcoal);
    font-size: 0.85rem;
}

.required-item.insufficient {
    background: rgba(216, 138, 138, 0.15);
    border-left: 3px solid var(--danger);
}

.required-item.sufficient {
    background: rgba(124, 184, 153, 0.15);
    border-left: 3px solid var(--success);
}

.product-details-header {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.product-details-image {
    width: 200px;
    height: 200px;
    border-radius: var(--radius-md);
    background: var(--blush-tint);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

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

.product-details-image i {
    font-size: 4rem;
    color: var(--dusty-rose);
    opacity: 0.4;
}

.product-details-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.product-details-info .category {
    color: var(--eucalyptus-dark);
    margin-bottom: 1rem;
    text-transform: capitalize;
}

.product-details-info .price {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 600;
    color: var(--dusty-rose-dark);
    margin-bottom: 1rem;
}

.product-details-info .description {
    color: var(--warm-gray);
    line-height: 1.6;
}

.items-required-list {
    margin-top: 1rem;
}

.items-required-list h4 {
    margin-bottom: 1rem;
    color: var(--charcoal);
}

.required-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--blush-tint);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}

.required-item-info {
    display: flex;
    flex-direction: column;
}

.required-item-name {
    font-weight: 500;
    color: var(--charcoal);
}

.required-item-qty {
    font-size: 0.85rem;
    color: var(--warm-gray);
}

.required-item-stock {
    text-align: right;
}

.required-item-available {
    font-weight: 600;
}

.stock-ok {
    color: var(--success);
}

.stock-low {
    color: var(--danger);
}

.stock-out {
    color: var(--danger);
}

/* ============================================
   TOAST NOTIFICATION
   ============================================ */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 2000;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-medium);
    border-left: 4px solid var(--success);
}

.toast.error .toast-content {
    border-left-color: var(--danger);
}

.toast-icon {
    font-size: 1.25rem;
    color: var(--success);
}

.toast.error .toast-icon {
    color: var(--danger);
}

.toast-message {
    font-weight: 500;
    color: var(--charcoal);
}

/* ============================================
   MOBILE TOUCH-FRIENDLY ENHANCEMENTS
   ============================================ */
.btn {
    min-height: 44px;
    touch-action: manipulation;
}

.action-btn {
    min-width: 40px;
    min-height: 40px;
}

input, select, textarea {
    font-size: 16px !important; /* Prevent zoom on iOS */
}

/* Form rows stack on mobile */
.form-row {
    grid-template-columns: 1fr;
}

/* Product details modal */
.product-details-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.product-details-image {
    width: 120px;
    height: 120px;
}

.product-details-info .price {
    font-size: 1.5rem;
}

/* Login card adjustments */
.login-card {
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    margin-top: auto;
}

#login-page {
    align-items: flex-end;
    padding: 0;
}

.login-container {
    width: 100%;
    max-width: 100%;
}

/* Admin Only Elements */
.admin-only {
    display: none;
}

body.role-admin .admin-only {
    display: inline-flex;
}

/* Florist restrictions */
body.role-florist [data-role="admin"] {
    display: none;
}

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

::-webkit-scrollbar-track {
    background: var(--blush-tint);
    border-radius: 4px;
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--dusty-rose-dark);
}

/* Active page indicator */
.page.active {
    display: block;
}

