/* Modern Stock Management Styles - Blue & Teal Theme */

/* Page Container */
.stock-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Page Header */
.stock-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.stock-page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stock-page-title i {
    color: #0284c7;
}

/* Search Bar */
.stock-search-wrapper {
    position: relative;
    min-width: 300px;
}

.stock-search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.stock-search-input:focus {
    outline: none;
    border-color: #0284c7;
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.1);
}

.stock-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 1.125rem;
    pointer-events: none;
}

/* Dashboard Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #0284c7 0%, #14b8a6 100%);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

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

.stat-card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #64748b;
    margin: 0;
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-card-icon.info {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}

.stat-card-icon.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.stat-card-icon.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.stat-card-icon.dark {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.stat-card-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

/* Main Content Card */
.stock-main-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.stock-card-header {
    background: linear-gradient(135deg, #0284c7 0%, #14b8a6 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stock-card-header h5 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stock-card-body {
    padding: 1.5rem;
}

/* Modern Table */
.table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
}

.stock-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.stock-table thead {
    background: #f8fafc;
}

.stock-table thead th {
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.stock-table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f5f9;
}

.stock-table tbody tr:hover {
    background: #f8fafc;
}

.stock-table tbody td {
    padding: 1rem 1.25rem;
    color: #334155;
    font-size: 0.9375rem;
    vertical-align: middle;
}

/* Quantity Badges */
.qty-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    min-width: 50px;
}

.qty-badge.danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.qty-badge.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.qty-badge.primary {
    background: rgba(2, 132, 199, 0.1);
    color: #0284c7;
    border: 1px solid rgba(2, 132, 199, 0.2);
}

.qty-badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-action {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    text-decoration: none;
}

.btn-action.info {
    background: rgba(2, 132, 199, 0.1);
    color: #0284c7;
}

.btn-action.info:hover {
    background: #0284c7;
    color: white;
    transform: translateY(-2px);
}

.btn-action.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.btn-action.warning:hover {
    background: #f59e0b;
    color: white;
    transform: translateY(-2px);
}

.btn-action.danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.btn-action.danger:hover {
    background: #ef4444;
    color: white;
    transform: translateY(-2px);
}

/* Add Button */
.btn-add-stock {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #0284c7 0%, #14b8a6 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
    margin-top: 1rem;
}

.btn-add-stock:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
    color: white;
}

/* Modal Styles */
.modal-modern .modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-modern .modal-header {
    background: linear-gradient(135deg, #0284c7 0%, #14b8a6 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    padding: 1.25rem 1.5rem;
    border: none;
}

.modal-modern .modal-title {
    font-weight: 700;
    font-size: 1.25rem;
}

.modal-modern .btn-close {
    filter: brightness(0) invert(1);
}

.modal-modern .modal-body {
    padding: 1.5rem;
}

.modal-modern .modal-body ul {
    list-style: none;
    padding: 0;
}

.modal-modern .modal-body li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    font-size: 0.9375rem;
}

.modal-modern .modal-body li:last-child {
    border-bottom: none;
}

.modal-modern .modal-body li strong {
    color: #0f172a;
}

.modal-modern .modal-footer {
    border-top: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
}

/* Form Styles */
.form-container {
    max-width: 800px;
    margin: 0 auto;
}

.form-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-top: 1.5rem;
}

.form-card-header {
    background: linear-gradient(135deg, #0284c7 0%, #14b8a6 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-card-header i {
    font-size: 1.5rem;
}

.form-card-header h5 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.form-card-body {
    padding: 2rem;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.form-control-modern {
    width: 100%;
    padding: 0.875rem 1.125rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-control-modern:focus {
    outline: none;
    border-color: #0284c7;
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.1);
}

.form-control-modern:hover {
    border-color: #cbd5e1;
}

textarea.form-control-modern {
    min-height: 120px;
    resize: vertical;
}

select.form-control-modern {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f1f5f9;
}

.btn-submit {
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #0284c7 0%, #14b8a6 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
}

.btn-cancel {
    padding: 0.875rem 2rem;
    background: white;
    color: #64748b;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-cancel:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

/* Alert Messages */
.alert-modern {
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
    border: none;
}

.alert-modern i {
    font-size: 1.5rem;
}

.alert-success-modern {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border-left: 4px solid #10b981;
}

.alert-primary-modern {
    background: rgba(2, 132, 199, 0.1);
    color: #0284c7;
    border-left: 4px solid #0284c7;
}

.alert-warning-modern {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border-left: 4px solid #f59e0b;
}

.alert-danger-modern {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-left: 4px solid #ef4444;
}

.alert-modern a {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
}

.alert-modern a:hover {
    opacity: 0.8;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #0284c7 0%, #14b8a6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.empty-state-description {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 1.5rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .stock-container {
        padding: 1.5rem 1rem;
    }

    .stock-page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .stock-search-wrapper {
        width: 100%;
    }

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

    .stock-card-body {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .stock-page-title {
        font-size: 1.5rem;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .stat-card-value {
        font-size: 1.75rem;
    }

    .stock-table thead th,
    .stock-table tbody td {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .form-card-body {
        padding: 1.5rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-submit,
    .btn-cancel {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .stock-container {
        padding: 1rem 0.75rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-wrap: wrap;
    }

    .table-wrapper {
        font-size: 0.8125rem;
    }
}

/* Loading State */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, #0284c7 0%, #14b8a6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.badge-status {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8125rem;
}

.badge-status.active {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.badge-status.inactive {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
}
