/* ============================================
   MNLA MobileWeb - Common Styles
   Consolidated reusable styles for all pages
   ============================================ */

/* ============================================
   CONFIRMATION MODAL
   ============================================ */
.confirm-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.confirm-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.confirm-modal {
    background: rgba(26, 32, 44, 0.95);
    border-radius: 1rem;
    padding: 1.5rem;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideUp 0.3s ease;
}

.confirm-modal-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.confirm-modal-icon.warning {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.confirm-modal-icon.success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.confirm-modal-icon.error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.confirm-modal-title {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.5rem;
}

.confirm-modal-text {
    color: #9ca3af;
    font-size: 0.9375rem;
    text-align: center;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.confirm-modal-buttons {
    display: flex;
    gap: 0.75rem;
}

.confirm-modal-buttons .btn-confirm,
.confirm-modal-buttons .btn-cancel {
    flex: 1;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.confirm-modal-buttons .btn-confirm.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.confirm-modal-buttons .btn-confirm.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.confirm-modal-buttons .btn-confirm.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.confirm-modal-buttons .btn-confirm.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.confirm-modal-buttons .btn-cancel {
    background: rgba(107, 114, 128, 0.2);
    color: #e5e7eb;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.confirm-modal-buttons .btn-cancel:hover {
    background: rgba(107, 114, 128, 0.3);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   1. RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #0d7377 0%, #14213d 100%);
    min-height: 100vh;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    position: fixed;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

/* ============================================
   2. LAYOUT CONTAINERS
   ============================================ */
.page-container {
    min-height: 100vh;
    height: 100%;
    background: linear-gradient(135deg, #0d7377 0%, #14213d 100%);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 80px; /* Space for bottom nav */
    padding-bottom: env(safe-area-inset-bottom);
}

.content-wrapper {
    padding: 20px 15px;
    max-width: 100%;
    margin: 0 auto;
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
}

.card-container {
    background: rgba(26, 32, 44, 0.8);
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(16, 185, 129, 0.3);
}

.card-header h3 {
    color: #ffffff;
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.875rem;
}

.card-body {
    padding-top: 0;
}

/* ============================================
   3. HEADER STYLES
   ============================================ */
.page-header {
    background: rgba(26, 32, 44, 0.95);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-title {
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.btn-back {
    color: #ffffff;
    font-size: 20px;
    text-decoration: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.header-spacer {
    width: 40px;
}

/* ============================================
   4. FORM ELEMENTS
   ============================================ */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-label .text-danger {
    color: #ef4444;
    margin-left: 2px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(45, 55, 72, 0.6);
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.input-wrapper:focus-within {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.input-icon {
    padding-left: 0.875rem;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
}

.form-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: #ffffff;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-input:disabled,
.form-input:read-only {
    background: rgba(45, 55, 72, 0.4);
    color: rgba(255, 255, 255, 0.6);
    cursor: not-allowed;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

select.form-input {
    cursor: pointer;
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='rgba(255,255,255,0.5)'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    appearance: none;
}

textarea.form-input {
    resize: vertical;
    min-height: 4rem;
    line-height: 1.5;
}

.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff;
    -webkit-box-shadow: 0 0 0px 1000px rgba(45, 55, 72, 0.6) inset;
    transition: background-color 5000s ease-in-out 0s;
}
}

select.form-input option {
    background: #1a202c;
    color: #ffffff;
    padding: 8px;
}

textarea.form-input {
    min-height: 80px;
    resize: vertical;
    padding-top: 12px;
}

/* ============================================
   4.5 FILTER CONTAINER
   ============================================ */
.filter-container {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(26, 32, 44, 0.6);
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex: 1;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.filter-option:hover {
    background: rgba(255, 255, 255, 0.08);
}

.filter-option input[type="radio"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    margin-right: 0.75rem;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-option input[type="radio"]:checked {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.2);
}

.filter-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #10b981;
}

.filter-label {
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 500;
    user-select: none;
}

/* ============================================
   5. BUTTONS
   ============================================ */
.btn-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    padding: 0;
}

.btn-icon i {
    font-size: 1.125rem;
}

.btn-icon:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.3);
    color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-icon:active {
    transform: translateY(0);
}

.btn-icon.btn-edit {
    color: #f39c12;
}

.btn-icon.btn-edit:hover {
    background: rgba(243, 156, 18, 0.2);
    border-color: rgba(243, 156, 18, 0.3);
    color: #f39c12;
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.btn-icon.btn-delete {
    color: #e74c3c;
}

.btn-icon.btn-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    letter-spacing: 0.5px;
}

.input-group .btn-primary {
    width: auto;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

.btn-primary i {
    margin-right: 8px;
}

.btn-primary:disabled,
.btn-success:disabled {
    background: rgba(100, 116, 139, 0.5);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-primary:disabled:hover,
.btn-success:disabled:hover {
    background: rgba(100, 116, 139, 0.5);
    transform: none;
    box-shadow: none;
}

.btn-success {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    letter-spacing: 0.5px;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

.btn-success:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

.btn-success i {
    margin-right: 8px;
}

/* ============================================
   6. MESSAGES & ALERTS
   ============================================ */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 12px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 14px;
    text-align: center;
}

.success-message {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
    padding: 12px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 14px;
    text-align: center;
}

.text-danger {
    color: #ef4444;
    font-size: 12px;
    margin-top: 6px;
    display: block;
}

/* ============================================
   7. LINKS
   ============================================ */
.link-primary {
    color: #10b981;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.link-primary:hover {
    color: #34d399;
}

.link-secondary {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.link-secondary:hover {
    color: #10b981;
}

/* ============================================
   8. TEXT UTILITIES
   ============================================ */
.text-center {
    text-align: center;
}

.text-white {
    color: #ffffff;
}

.text-muted {
    color: rgba(255, 255, 255, 0.6);
}

.subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-top: 8px;
    margin-bottom: 0;
}

/* ============================================
   9. SPACING UTILITIES
   ============================================ */
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 30px; }
.mb-5 { margin-bottom: 100px; }


.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 30px; }

/* ============================================
   10. PROGRESS OVERLAY
   ============================================ */
.progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-content {
    width: 80%;
    max-width: 400px;
}

.progress-bar-container {
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    transition: width 0.3s ease;
}

.progress-text {
    color: #ffffff;
    margin-top: 10px;
    text-align: center;
}

/* ============================================
   11. LOGO & BRANDING
   ============================================ */
.logo-container {
    margin-bottom: 20px;
}

.logo-image {
    width: 104px;
    height: 104px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(16, 185, 129, 0.3));
}

/* ============================================
   12. DETAIL LABELS & VALUES
   ============================================ */
.detail-label {
    color: #f39c12;
}

.detail-value {
    color: #f39c12;
}

.item-variant {
    color: #3498db;
    font-weight: bold;
}

/* ============================================
   SALES LIST STYLES
   ============================================ */
.sales-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sales-card {
    background: rgba(26, 32, 44, 0.8);
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.sales-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
    border-color: rgba(16, 185, 129, 0.3);
}

.sales-card .card-header {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sales-card .card-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sales-card .item-code {
    font-size: 0.875rem;
    font-weight: 600;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    letter-spacing: 0.5px;
}

.sales-card .item-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fbbf24;
    text-shadow: 0 2px 4px rgba(251, 191, 36, 0.3);
}

.sales-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sales-card .item-name {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.sales-card .item-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.sales-card .item-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    padding: 0.375rem 0;
}

.sales-card .item-detail-row:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ============================================
   ADD SALES MODAL & BUTTON STYLES
   ============================================ */
.btn-add {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    transition: all 0.3s ease;
}

.btn-add:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.6);
}

.btn-add:active {
    transform: scale(0.95);
}

.product-detail-card {
    background: rgba(26, 32, 44, 0.6);
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.product-detail-card .detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.875rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.product-detail-card .detail-row:last-child {
    border-bottom: none;
}

.product-detail-card .detail-label {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 120px;
}

.product-detail-card .detail-value {
    color: #ffffff;
    font-weight: 500;
    text-align: right;
    flex: 1;
}

.total-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    padding: 1rem;
    border-radius: 0.75rem;
    margin-top: 1rem;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.total-display span:first-child {
    color: #94a3b8;
    font-size: 1rem;
    font-weight: 600;
}

.total-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fbbf24;
    text-shadow: 0 2px 4px rgba(251, 191, 36, 0.3);
}

/* Product List Styles */
.product-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 45vh;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
}

.product-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(26, 32, 44, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    -webkit-tap-highlight-color: rgba(16, 185, 129, 0.2);
    user-select: none;
    -webkit-user-select: none;
    max-width: 100%;
    overflow: visible;
    min-height: 120px;
    box-sizing: border-box;
    margin-bottom: 2px;
}

.product-item:hover,
.product-item:active {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    transform: translateX(3px);
}

.product-icon {
    color: #10b981;
    font-size: 1.25rem;
    flex-shrink: 0;
    pointer-events: none;
}

.product-info {
    flex: 1;
    min-width: 0;
    pointer-events: none;
}

.product-code {
    font-size: 0.7rem;
    color: #10b981;
    font-weight: 600;
    margin-bottom: 0.125rem;
    pointer-events: none;
}

.product-name {
    font-size: 0.875rem;
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 0.125rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.3;
    pointer-events: none;
}

.product-variant {
    font-size: 0.75rem;
    color: #94a3b8;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.3;
    pointer-events: none;
}

.product-price {
    font-size: 0.8rem;
    color: #10b981;
    font-weight: 700;
    margin-top: 0.25rem;
    pointer-events: none;
}

#itemModal {
    z-index: 1060;
    pointer-events: none;
}

#itemModal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

#itemModal .modal-dialog {
    z-index: 1061;
    pointer-events: auto;
}

.item-modal-content {
    max-height: 85vh;
    overflow: visible;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
}

.item-modal-content .modal-body {
    overflow: visible;
    overflow-x: hidden;
    padding: 0.5rem;
    pointer-events: auto;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.pagination-info {
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 80px;
    text-align: center;
}

.btn-outline-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.btn-outline-secondary:hover:not(:disabled) {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
    color: #10b981;
}

.btn-outline-secondary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.form-control-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}


.modal-sm {
    max-width: 98%;
    width: 98%;
    margin: 0.5rem;
}

@media (min-width: 576px) {
    .modal-sm {
        max-width: 450px;
    }
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.small {
    font-size: 0.875rem;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 1rem;
    color: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
    flex-shrink: 0;
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1.5rem;
    overflow: hidden;
}

.modal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(16, 185, 129, 0.2);
    gap: 0.5rem;
    flex-shrink: 0;
}

.modal-title {
    color: #10b981;
    font-weight: 600;
}

.close {
    background: transparent;
    border: 0;
    color: white;
    opacity: 0.7;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.close:hover {
    color: white;
    opacity: 1;
}

.form-label {
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 0.5rem;
    padding: 0.75rem;
    width: 100%;
    font-size: 1rem;
}

.form-control-lg {
    padding: 1rem;
    font-size: 1.125rem;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #10b981;
    color: white;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.input-group {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.input-group .form-control {
    flex: 1;
}

.input-group .btn {
    flex-shrink: 0;
    padding: 0.75rem 1rem;
    height: auto;
}

.mb-3 {
    margin-bottom: 1rem;
}

.fw-bold {
    font-weight: 700;
}

.text-success {
    color: #10b981 !important;
}

.text-info {
    color: #3b82f6 !important;
}

.opacity-50 {
    opacity: 0.5;
}

.py-4 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(100, 116, 139, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-secondary:hover {
    background: rgba(100, 116, 139, 0.5);
    color: white;
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
}

.btn-success:disabled {
    background: rgba(100, 116, 139, 0.5);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Alert Styles */
.alert {
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.1) 100%);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.alert-danger i {
    color: #ef4444;
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.1) 100%);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.alert-success i {
    color: #10b981;
}

.alert-dismissible {
    padding-right: 3rem;
}

.alert .close {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.alert .close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    pointer-events: auto;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    display: none;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
    pointer-events: none;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.modal-dialog {
    position: relative;
    width: 90%;
    max-width: 500px;
    margin: 1rem auto;
    pointer-events: auto;
    z-index: 1051;
}

.modal-dialog-centered {
    min-height: calc(100% - 2rem);
    display: flex;
    align-items: center;
}

body.modal-open {
    overflow: hidden;
}

/* ============================================
   12. RESPONSIVE BREAKPOINTS
   ============================================ */
@media (max-width: 480px) {
    .content-wrapper {
        padding: 15px 10px;
    }

    .card-container {
        padding: 20px 12px;
        border-radius: 16px;
    }

    .form-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .modal-dialog {
        width: 95%;
        margin: 0.5rem auto;
    }
    
    .modal-body {
        max-height: 70vh;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 0.75rem;
    }
}
}

@media (min-width: 768px) {
    .content-wrapper {
        max-width: 600px;
    }
    
    .card-container {
        padding: 30px 25px;
    }
}

/* ============================================
   13. BACKGROUND PATTERN
   ============================================ */
body::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -1;
}
