/* ============================================================
   Winventory - Custom Styles
   Separated from Blade templates for maintainability
   ============================================================ */

/* Base & Layout
   ---------------------------------------------------------- */
body {
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a1a2e;
}

body.has-background {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

body.no-background {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Navbar
   ---------------------------------------------------------- */
.navbar {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1050;
}

.navbar-brand,
.nav-link {
    color: white !important;
}

.navbar-brand:hover,
.nav-link:hover {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Cards
   ---------------------------------------------------------- */
.card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    color: #212529;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 15px 15px 0 0 !important;
    padding: 1rem 1.25rem;
}

.card-title {
    color: #212529;
    font-weight: 600;
}

/* Dashboard glass cards */
.stat-card,
.group-card,
.item-card,
.section-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    color: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover,
.group-card:hover,
.item-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.group-card .background-image,
.item-card .background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.3;
    z-index: 0;
    border-radius: 15px;
}

.group-card,
.item-card {
    position: relative;
    overflow: hidden;
}

.group-card .card-body,
.item-card .card-body {
    position: relative;
    z-index: 1;
}

/* Forms
   ---------------------------------------------------------- */
.form-control {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: #212529;
    border-radius: 10px;
    padding: 0.6rem 0.85rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(13, 110, 253, 0.5);
    color: #212529;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-control::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

.form-select {
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-text {
    color: #6c757d;
    font-size: 0.875rem;
}

/* Buttons
   ---------------------------------------------------------- */
.btn {
    border-radius: 10px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background: rgba(13, 110, 253, 0.85);
    border: 1px solid rgba(13, 110, 253, 0.9);
    color: white;
}

.btn-primary:hover {
    background: rgba(13, 110, 253, 1);
    border-color: rgba(13, 110, 253, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.btn-success {
    background: rgba(25, 135, 84, 0.9);
    border: 1px solid rgba(25, 135, 84, 0.95);
}

.btn-success:hover {
    background: rgba(25, 135, 84, 1);
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
}

.btn-danger:hover {
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.7);
    color: white;
}

.btn-animated {
    transition: all 0.3s ease;
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-animated:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-animated:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Disabled button tooltip fix */
.btn:disabled {
    pointer-events: auto;
    cursor: not-allowed;
}

.btn:disabled:hover {
    opacity: 0.65;
}

/* Tables
   ---------------------------------------------------------- */
.table {
    color: #212529;
}

.table th {
    border-color: rgba(0, 0, 0, 0.2);
    font-weight: 600;
}

.table td {
    border-color: rgba(0, 0, 0, 0.1);
}

/* Alerts
   ---------------------------------------------------------- */
.alert {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: #212529;
    border-radius: 12px;
}

.alert-success {
    background: rgba(25, 135, 84, 0.1);
    border-color: rgba(25, 135, 84, 0.3);
    color: #0f5132;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.3);
    color: #842029;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.3);
    color: #664d03;
}

.alert-info {
    background: rgba(13, 202, 240, 0.1);
    border-color: rgba(13, 202, 240, 0.3);
    color: #055160;
}

/* Dropdowns
   ---------------------------------------------------------- */
.dropdown-menu {
    z-index: 9999 !important;
    position: absolute !important;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.dropdown-item {
    border-radius: 8px;
    margin: 0 0.25rem;
    padding: 0.5rem 0.75rem;
}

.dropdown-item:hover {
    background: rgba(13, 110, 253, 0.1);
}

/* Modals
   ---------------------------------------------------------- */
.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px 20px 0 0;
    padding: 1.5rem;
}

.modal-header .modal-title {
    color: #212529;
    font-weight: 600;
    font-size: 1.25rem;
}

.modal-body {
    background: rgba(255, 255, 255, 0.05);
    color: #212529;
    padding: 2rem;
    line-height: 1.6;
}

.modal-body p {
    color: #495057;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.modal-body .form-label {
    color: #495057;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.modal-body .form-control {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(0, 0, 0, 0.1);
    color: #212529;
    padding: 0.75rem;
    border-radius: 10px;
}

.modal-body .form-control:focus {
    background: rgba(255, 255, 255, 1);
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.modal-body .form-text {
    color: #6c757d;
    font-size: 0.9rem;
}

.modal-body .alert {
    background: rgba(13, 202, 240, 0.1);
    border: 1px solid rgba(13, 202, 240, 0.3);
    color: #055160;
    border-radius: 10px;
    padding: 1rem;
}

.modal-body .alert h6 {
    color: #055160;
    font-weight: 600;
}

.modal-footer {
    background: rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0 0 20px 20px;
    padding: 1.5rem;
}

.modal-footer .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 500;
}

/* Typography
   ---------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    color: #212529;
}

.text-muted {
    color: rgba(0, 0, 0, 0.6) !important;
}

.welcome-text {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Pagination
   ---------------------------------------------------------- */
.pagination .page-link {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
    color: #0d6efd;
    border-radius: 8px;
    margin: 0 2px;
}

.pagination .page-link:hover {
    background: rgba(13, 110, 253, 0.1);
    border-color: rgba(13, 110, 253, 0.3);
}

.pagination .page-item.active .page-link {
    background: #0d6efd;
    border-color: #0d6efd;
}

/* Empty States
   ---------------------------------------------------------- */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state i {
    font-size: 4rem;
    color: rgba(0, 0, 0, 0.2);
    margin-bottom: 1rem;
}

.empty-state h4 {
    color: rgba(0, 0, 0, 0.4);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: rgba(0, 0, 0, 0.4);
    margin-bottom: 1.5rem;
}

/* Item Cards (index)
   ---------------------------------------------------------- */
.item-grid-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
}

.item-grid-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.item-grid-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.item-grid-card:hover .card-img-top {
    transform: scale(1.05);
}

/* Badges
   ---------------------------------------------------------- */
.badge {
    font-weight: 500;
    padding: 0.4em 0.7em;
    border-radius: 8px;
}

/* Photo Preview
   ---------------------------------------------------------- */
.photo-preview-box {
    border: 2px dashed rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.5);
    transition: border-color 0.2s ease;
}

.photo-preview-box:hover {
    border-color: rgba(13, 110, 253, 0.4);
}

/* Breadcrumbs
   ---------------------------------------------------------- */
.breadcrumb {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    padding: 0.5rem 1rem;
}

/* Responsive tweaks
   ---------------------------------------------------------- */
@media (max-width: 768px) {
    .card {
        border-radius: 12px;
    }

    .modal-content {
        border-radius: 15px;
    }

    .modal-header,
    .modal-footer {
        padding: 1rem;
    }

    .modal-body {
        padding: 1.25rem;
    }

    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
}

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

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Animations
   ---------------------------------------------------------- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

/* Dashboard specific
   ---------------------------------------------------------- */
.dashboard-stat-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

/* Group Views
   ---------------------------------------------------------- */
.stock-bg-preview {
    background-size: cover;
    background-position: center;
    height: 80px;
    border-radius: 8px;
    position: relative;
}

.stock-bg-label {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    padding: 2px 8px;
    border-radius: 4px;
}

.bg-clothing {
    background-image: url('/images/backgrounds/stock/clothing.jfif');
}

.bg-forest {
    background-image: url('/images/backgrounds/stock/forst.jfif');
}

.bg-sky {
    background-image: url('/images/backgrounds/stock/sky.jfif');
}

.bg-toys {
    background-image: url('/images/backgrounds/stock/toys.jfif');
}

/* Group Detail Table */
.group-items-table {
    color: #212529;
    margin-bottom: 0;
}

.group-items-table thead th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #212529;
    font-weight: 600;
    padding: 14px 12px;
    border: none;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.group-items-table tbody tr:hover {
    background-color: #f8f9ff;
}

.group-items-table tbody td {
    padding: 14px 12px;
    border: none;
    vertical-align: middle;
}

.group-item-name {
    font-weight: 600;
    font-size: 14px;
}

.group-item-desc {
    color: #6c757d;
    font-size: 12px;
}

.group-item-price {
    font-weight: 600;
    font-size: 15px;
}

.status-badge-custom {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.status-active-custom {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-sold-custom {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Group card background overlay */
.group-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.3;
    z-index: 0;
}

/* Auth Cards (login/register)
   ---------------------------------------------------------- */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.auth-card .card-body {
    padding: 2.5rem;
}

.auth-card .form-control {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.auth-card .form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Sold Items Table
   ---------------------------------------------------------- */
.sold-items-table-wrapper {
    background: #9c27b0;
    border-radius: 15px;
    overflow: hidden;
}

.sold-items-table {
    color: #ffffff;
    margin-bottom: 0;
}

.sold-items-table thead th {
    background-color: #9c27b0;
    color: #ffffff;
    font-weight: 600;
    padding: 16px 12px;
    border: none;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

.sold-items-table tbody tr {
    background: #9c27b0;
    border-bottom: 1px solid #7b1fa2;
    transition: all 0.2s ease;
}

.sold-items-table tbody tr:hover {
    background-color: #8e24aa;
}

.sold-items-table tbody td {
    padding: 14px 12px;
    border: none;
    background-color: #9c27b0;
    color: #ffffff;
    vertical-align: middle;
}

.sold-item-info {
    display: flex;
    align-items: center;
}

.sold-item-img {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 12px;
    border: 2px solid rgba(255,255,255,0.3);
}

.sold-item-placeholder {
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    border: 2px solid rgba(255,255,255,0.3);
}

.sold-item-name {
    font-weight: 600;
    color: #ffffff;
    font-size: 14px;
}

.sold-item-details {
    color: rgba(255,255,255,0.8);
    font-size: 12px;
}

.sold-price-main {
    font-weight: 600;
    font-size: 15px;
}

.sold-price-details {
    color: rgba(255,255,255,0.7);
    font-size: 11px;
}

.sold-profit-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    background: #7b1fa2;
    color: #ffffff;
    border: 1px solid #4a148c;
}

.sold-date-main {
    font-weight: 600;
    font-size: 13px;
}

.sold-date-relative {
    color: rgba(255,255,255,0.7);
    font-size: 11px;
}

.sold-actions .btn {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 6px;
    background: #7b1fa2;
    color: white;
    border: none;
}

.sold-actions .btn:hover {
    background: #4a148c;
    color: white;
}

.group-link-light {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
}

.group-link-light:hover {
    color: #e1bee7;
    text-decoration: underline;
}
