/* Layout Sidebar Styles (from app.blade.php) */
body { margin:0; font-family:"Segoe UI",Tahoma,sans-serif; background:#f8fafc; color:#1e293b; display:flex; }
.sidebar {     
    max-width: 150px;  
    background:#1e293b; 
    color:#f1f5f9; 
    display:flex; 
    flex-direction:column; 
    transition:width .3s; 
    font-size: 11px; 
    height:100vh; 
}
.sidebar.collapsed { width:40px; }
.sidebar .logo { 
    text-align:center; 
    padding:5px;
    overflow: hidden;
    height: 100px;
     filter: brightness(0) invert(1);
}
.sidebar .logo img { 
    max-width:50px; 
    transition:opacity .3s;
    margin-top: 10px; 
    margin-bottom: 10px; 
}
.sidebar.collapsed .logo img { max-width:30px; }
.nav-list { list-style:none; padding:0; margin:0; flex:1; }
.nav-list li a { display:flex; align-items:center; gap:5px; padding:10px 10px; color:#f1f5f9; text-decoration:none; transition:background .3s; 
    font-size: 11px; text-wrap:nowrap;  }
.nav-list li a:hover, .nav-list li.active a { background:#334155; border-left:4px solid #3b82f6; padding-left:16px;  text-wrap:nowrap;}
.sidebar.collapsed .nav-list li span { display:none; }

.collapse-btn { margin:16px auto; width:30px; height:30px; background:#374151; border-radius:50%; display:flex; justify-content:center; align-items:center; cursor:pointer; }
.collapse-btn:hover { background:#4b5563;}
.collapsed .collapse-btn i { transform:rotate(180deg); }

/* .main-content { flex:1; width: 100%; height:100vh;} */



/* Quick fix for existing structure */
.main-content {
     margin-left: 150px;
    width: calc(100vw - 150px);
    transition: margin-left .3s, width .3s;
} 


/* When sidebar collapses */
.sidebar.collapsed ~ .main-content {
    margin-left: 40px;
    width: calc(100vw - 40px);
}
/* Bidding Tool Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
}

.container {
    width: 100%;
    padding-top: 10px;
    padding-left:0px;
    margin-left:0px;
}

/* Header */
.header {
   /*  width: calc(100% - 20px); Ensure header fills available space */
    width:100%;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    height:50px;
    margin:10px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding:8px 10px 10px 10px;
    gap: 16px;
}

.header h1 {
    font-size: 16px;
    font-weight: 200;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    font-weight: 500;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: white;
    color: #1e293b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Search Form */
.search-panel {
    background: white;
    padding: 12px 10px;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    align-items: end;
}

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

.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-input {
    padding: 8px 10px;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.2s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.select-wrapper {
    position: relative;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.search-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.18);
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* Main Content Layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 24px;
    align-items: start;
}

/* Data Table */
.table-container {
    background: white; 
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.table-header {
    padding: 10px 12px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 0;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.table-title {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.table-controls {
    display: flex;
    gap: 6px;
    align-items: center;
}

.search-input {
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    width: 180px;
}

.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.data-table th {
    background: #f8fafc;
    padding: 7px 8px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.data-table td {
    padding: 7px 8px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: #1e293b;
}

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

.checkbox {
    width: 18px;
    height: 18px;
    accent-color: #3b82f6;
}

.action-btn {
    padding: 6px 8px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.btn-view {
    background: #dbeafe;
    color: #1d4ed8;
}

.btn-view:hover {
    background: #bfdbfe;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.status-sent { background: #fef3c7; color: #92400e; }
.status-read { background: #d1fae5; color: #065f46; }
.status-accepted { background: #dcfce7; color: #166534; }
.status-declined { background: #fee2e2; color: #991b1b; }

/* Sidebar */
.bidding-tool-sidebar {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.bidding-tool-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 12px 12px 0 0;
}

.bidding-tool-sidebar-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.bidding-tool-sidebar-content {
    padding: 20px;
}

.info-card {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.info-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: #0c4a6e;
    margin-bottom: 8px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.info-label {
    font-size: 12px;
    color: #64748b;
}

.info-value {
    font-size: 12px;
    font-weight: 500;
    color: #1e293b;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .table-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input {
        width: 100%;
    }
}

@media (min-width: 768px) {
  .main-content {
    grid-template-columns: 1fr 400px;
    gap: 24px;
    align-items: start;
  }

  .bidding-tool-sidebar {
    align-self: start;
  }
}

/* Loading Spinner */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.spinner {
    position:fixed;
    top: 50%;
    left: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 10px;
    border-top: 1px solid #e2e8f0;
}

.page-btn {
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    background: white;
    color: #374151;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.page-btn:hover {
    background: #f3f4f6;
}

.page-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.page-info {
    font-size: 12px;
    color: #6b7280;
    margin: 0 8px;
}


.user-dropdown-wrapper {
    position: relative;
}

.user-dropdown-btn {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    background-color: #007bff; /* Bootstrap primary color */
    color: white;
    border: none;
}

.user-dropdown-btn .caret-icon {
    font-size: 10px;
}

.user-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 4px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-width: 160px;
    z-index: 999;
}

.user-dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 8px 12px;
    font-size: 13px;
    color: #1f2937;
    text-decoration: none;
}

.dropdown-item:hover {
    background-color: #f3f4f6;
}

.logout-btn {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    text-align: left;
    color: #1f2937;
    background: none;
    border: none;
    cursor: pointer;
}

.logout-btn:hover {
    background-color: #f3f4f6;
}


/* .modal *{
    color:black;
} */

/* Container for bottom info and pagination */
.bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid #e0e0e0;
    font-size: 14px;
    color: #333;
}

/* Info text */
.dataTables_info {
    font-weight: 500;
    padding:10px;
}

/* Pagination buttons container */
.dataTables_paginate {
    display: flex;
    gap: 6px;
}

/* Pagination buttons */
.dataTables_paginate .paginate_button {
    padding: 6px 12px;
    border-radius: 6px;
    background-color: #f5f5f5;
    color: #333 !important;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
}

.dataTables_paginate .paginate_button.current {
    background-color: #4f46e5;
    color: #fff !important;
    border-color: #4f46e5;
}

.dataTables_paginate .paginate_button:hover {
    background-color: #e0e0ff;
}

/* Disabled buttons */
.dataTables_paginate .paginate_button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/*Loading Overlay*/
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.spinner {
  border: 8px solid #f3f3f3; /* Light grey */
  border-top: 8px solid #3498db; /* Blue */
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
