/* premium_glass.css */

/* Background & Typography */
body {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%) fixed;
    /* Soft Teal to Pink */
    /* Alternative: background: linear-gradient(120deg, #84fab0 0%, #8fd3f4 100%) fixed; */
    font-family: 'Inter', sans-serif !important;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    color: #1f2937;
    /* Gray 800 */
}

/* Glass Container (Main Card) */
.app-container {
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15) !important;
    border-radius: 16px !important;
    margin: 2rem auto !important;
    max-width: 95% !important;
    /* Slightly wider */
}

/* Toolbar */
.toolbar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
    padding: 1.25rem 1.5rem !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Search Box (Glassy Input) */
.search-box-simple {
    background: rgba(255, 255, 255, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    border-radius: 12px !important;
    padding: 0.6rem 1rem !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02) !important;
    transition: all 0.3s ease;
    width: 320px !important;
}

.search-box-simple:focus-within {
    background: rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2) !important;
    /* Green glow focus */
    border-color: #10b981 !important;
}

.search-box-simple input {
    background: transparent !important;
    font-weight: 500;
}

.search-box-simple i {
    color: #4b5563 !important;
}

/* Buttons */
.icon-action {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    padding: 10px;
    transition: all 0.2s ease;
}

.icon-action:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.btn-black {
    background: #111 !important;
    color: white !important;
    border-radius: 10px !important;
    padding: 0.7rem 1.2rem !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.3s ease !important;
    border: 1px solid transparent !important;
}

.btn-black:hover {
    background: #000 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3) !important;
}

/* Table Styling */
.vehicle-table {
    border-collapse: separate !important;
    /* Allows border-radius on rows */
    border-spacing: 0 0.5rem !important;
    /* Space between rows */
    margin-top: 0.5rem;
    width: 100%;
}

.vehicle-table thead th {
    background: transparent !important;
    color: #4b5563 !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    font-size: 0.75rem !important;
    letter-spacing: 0.05em;
    border-bottom: 2px solid rgba(255, 255, 255, 0.4) !important;
    padding: 1rem !important;
}

.vehicle-table tbody tr {
    background: rgba(255, 255, 255, 0.4);
    transition: all 0.2s ease;
}

.vehicle-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.75) !important;
    transform: scale(1.005);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.vehicle-table td {
    border: none !important;
    padding: 1rem !important;
    color: #1f2937;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Rounded corners for rows */
.vehicle-table td:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.vehicle-table td:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* Ensure sticky cells respect parent row background and blend seamlessly */
.vehicle-table tbody tr td:nth-child(1),
.vehicle-table tbody tr td:nth-child(2) {
    background: rgba(255, 255, 255, 0.98) !important; /* High opacity to hide scrolling text */
    backdrop-filter: blur(10px) !important; 
    -webkit-backdrop-filter: blur(10px) !important;
}

.vehicle-table tbody tr td:nth-child(2) {
    /* Subtle separation instead of hard border or shadow */
    border-right: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.vehicle-table tbody tr:hover td:nth-child(1),
.vehicle-table tbody tr:hover td:nth-child(2) {
    background: rgba(255, 255, 255, 1) !important;
}



/* Status Icons */
.status-icon {
    font-size: 1.1rem !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.8);
}

/* Modal Glass */
.modal-content {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    border-radius: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15) !important;
}

.form-input,
.search-box-input {
    background: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05) !important;
    padding: 0.8rem !important;
    border-radius: 10px !important;
    color: #1f2937 !important;
    transition: all 0.2s ease !important;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.4) !important;
}

.form-input:hover,
.search-box-input:hover {
    background: rgba(255, 255, 255, 0.7) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
}

input[type="file"].form-input {
    padding: 0.6rem !important;
}

.form-input:focus {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: #10b981 !important;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1), inset 0 1px 2px rgba(255, 255, 255, 0.2) !important;
    outline: none !important;
}

/* Uppercase Enforcement */
.t-vehicle,
.form-input[id^="inp-vehicle"],
#search-input,
#inp-vehicle {
    text-transform: uppercase !important;
}

/* --- Expiry Indicators --- */
@keyframes blink {
    0% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 5px #facc15;
    }

    50% {
        opacity: 0.4;
        transform: scale(0.9);
        box-shadow: 0 0 2px #facc15;
    }

    100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 5px #facc15;
    }
}

.expiry-indicator {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-right: 10px;
    margin-left: 0;
    background-color: transparent;
    vertical-align: middle;
    flex-shrink: 0;
}

.expiry-yellow {
    background-color: #facc15 !important;
    animation: blink 2s infinite;
    box-shadow: 0 0 10px #facc15, 0 0 20px rgba(250, 204, 21, 0.4);
}

.expiry-red {
    background-color: #ef4444 !important;
    box-shadow: 0 0 8px #ef4444, 0 0 15px rgba(239, 68, 68, 0.3);
}

/* Align contents of vehicle cell for indicator */
.t-vehicle {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    /* No gap, margin on indicator handles spacing */
}

/* Uppercase Modal Title */
#modal-vehicle-title {
    text-transform: uppercase !important;
}

.expiry-green {
    background-color: #10b981 !important;
    box-shadow: 0 0 8px #10b981, 0 0 15px rgba(16, 185, 129, 0.3);
}

/* Autocomplete Dropdown */
.autocomplete-items {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-bottom: none;
    border-top: none;
    z-index: 99;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
}

.autocomplete-item {
    padding: 10px;
    cursor: pointer;
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s;
    font-size: 0.9rem;
    color: #333;
}

.autocomplete-item:hover {
    background-color: #e9ecef;
}

.autocomplete-item strong {
    font-weight: 600;
    color: #000;
}

/* Freeze Table Headers */
.vehicle-table thead {
    position: sticky;
    top: 0;
    z-index: 50;
}

.vehicle-table th {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Freeze First Two Columns Horizontally */
.vehicle-table th:nth-child(1),
.vehicle-table td:nth-child(1) {
    position: sticky;
    left: 0;
    z-index: 40;
}

.vehicle-table th:nth-child(2),
.vehicle-table td:nth-child(2) {
    position: sticky;
    left: 45px;
    z-index: 40;
}

.vehicle-table th:nth-child(1),
.vehicle-table th:nth-child(2) {
    z-index: 60; /* Above other sticky headers */
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.5) !important;
}

/* --- Glass Action Buttons (Certificates) --- */
.glass-action-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(243, 244, 246, 0.8) !important;
    color: #374151 !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
    border-radius: 8px !important;
    padding: 6px 12px !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    cursor: pointer !important;
    backdrop-filter: blur(5px) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02) !important;
    transition: all 0.2s ease !important;
}

.glass-action-btn:hover {
    background: #e5e7eb !important;
    transform: translateY(-1px);
}

.glass-action-btn.danger {
    background: rgba(254, 226, 226, 0.8) !important;
    color: #dc2626 !important;
    border: 1px solid rgba(220, 38, 38, 0.2) !important;
}

.glass-action-btn.danger:hover {
    background: #fecaca !important;
}
