/* Import Premium Google Font */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* CSS Variables for Premium Theme */
:root {
    --bg-gradient: linear-gradient(135deg, #0f0c1b 0%, #150f2e 50%, #0a0714 100%);
    --accent-primary: #8b5cf6; /* Vivid violet */
    --accent-secondary: #ec4899; /* Deep pink */
    --accent-gradient: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    --card-bg: rgba(25, 20, 41, 0.45);
    --card-border: rgba(255, 255, 255, 0.07);
    --input-bg: rgba(13, 10, 24, 0.5);
    --input-border: rgba(255, 255, 255, 0.1);
    --input-focus-border: #a78bfa;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --error: #ef4444;
    --success: #10b981;
    --shadow-glow: 0 0 25px rgba(139, 92, 246, 0.2);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    background-color: #0a0714; /* Set dark background base color to prevent white/light-grey bars on mobile scroll */
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
    position: relative;
}

/* Background Decorative Glowing Orbs */
body::before, body::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
}

body::before {
    width: 350px;
    height: 350px;
    background: rgba(139, 92, 246, 0.25);
    top: 10%;
    left: 15%;
    animation: floatOrb 10s ease-in-out infinite alternate;
}

body::after {
    width: 400px;
    height: 400px;
    background: rgba(236, 72, 153, 0.15);
    bottom: 10%;
    right: 15%;
    animation: floatOrb 12s ease-in-out infinite alternate-reverse;
}

@keyframes floatOrb {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-30px) scale(1.1); }
}

/* Container & Glass Card */
.container {
    width: 100%;
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2.5rem;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), var(--shadow-glow);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.system-logo {
    max-width: 260px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.15));
    transition: var(--transition-smooth);
}

.system-logo:hover {
    transform: scale(1.04);
    filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.3));
}

.header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    background: linear-gradient(to right, #ffffff, #d8b4fe, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.header p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 400;
}

/* Form Layout & Grid */
.registration-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .card {
        padding: 1.5rem;
    }
    .header h1 {
        font-size: 1.8rem;
    }
}

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

.form-group.full-width {
    grid-column: span 2;
}

@media (max-width: 640px) {
    .form-group.full-width {
        grid-column: span 1;
    }
}

/* Input Fields & Labels */
label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: var(--transition-smooth);
}

.input-wrapper {
    position: relative;
}

input[type="text"],
input[type="number"],
input[type="password"],
textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.95); /* Light color background */
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    color: #111827; /* Dark slate text for high readability */
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-smooth);
    outline: none;
}

input::placeholder,
textarea::placeholder {
    color: #6b7280;
    opacity: 0.85;
}

/* Force Uppercase on all designated inputs */
.uppercase-input {
    text-transform: uppercase;
}

/* Vehicle Number extra styling: monospace, letter spacing */
input#vehicle_number {
    font-family: monospace, inherit;
    letter-spacing: 0.1em;
    font-weight: 600;
}

input:focus,
textarea:focus {
    border-color: var(--accent-primary);
    background: #ffffff; /* pure white background on focus */
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.25), inset 0 0 4px rgba(139, 92, 246, 0.05);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Input Validation Visual States */
input:focus:invalid {
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.15);
}

/* Drag-and-Drop Image Upload Zone */
.photo-upload-zone {
    border: 2px dashed var(--input-border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.01);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
    min-height: 180px;
}

.photo-upload-zone:hover, .photo-upload-zone.dragover {
    border-color: var(--accent-primary);
    background: rgba(139, 92, 246, 0.04);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.1);
}

.upload-icon {
    font-size: 2.5rem;
    color: var(--accent-primary);
    transition: var(--transition-smooth);
}

.photo-upload-zone:hover .upload-icon {
    transform: translateY(-5px);
}

.upload-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.upload-text span {
    color: var(--accent-primary);
    font-weight: 600;
}

.upload-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Hidden File Input */
.file-input {
    display: none;
}

/* Real-time Preview */
.preview-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: var(--input-bg);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.preview-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.remove-photo-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(239, 68, 68, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 3;
}

.remove-photo-btn:hover {
    background: var(--error);
    transform: scale(1.1);
}

/* Submit Button & Spinner */
.submit-btn {
    background: var(--accent-gradient);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem 2rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4), 0 0 10px rgba(236, 72, 153, 0.2);
}

.submit-btn:active {
    transform: translateY(0);
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
    display: none;
}

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

/* Error/Notification Banner */
.notification {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 12px;
    padding: 1rem;
    color: #fca5a5;
    font-size: 0.95rem;
    display: none;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.3s ease;
}

.notification.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #a7f3d0;
}

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

/* Overlay & Success/Error Screens */
.state-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 8, 20, 0.95);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    padding: 2rem;
    text-align: center;
    animation: fadeIn 0.4s ease forwards;
}

.success-badge {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.15);
    border: 2px solid var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--success);
    font-size: 3rem;
    margin-bottom: 1.5rem;
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.overlay-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.overlay-message {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 400px;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.overlay-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--card-border);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.overlay-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* Utility classes */
.mt-6 {
    margin-top: 2rem;
}

/* Registered Grid Header */
.grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.grid-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #ffffff, #d8b4fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Search Box Styling */
.search-wrapper {
    position: relative;
    max-width: 320px;
    width: 100%;
}

.search-wrapper input {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.25rem;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    color: #111827;
    outline: none;
    transition: var(--transition-smooth);
}

.search-wrapper input:focus {
    border-color: var(--accent-primary);
    background: #ffffff;
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.2);
}

.search-wrapper input::placeholder {
    color: #6b7280;
    opacity: 0.85;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    pointer-events: none;
    color: #6b7280;
}

/* Data Grid Table Layout */
.table-container {
    width: 100%;
    max-height: 400px;
    overflow-x: auto;
    overflow-y: auto;
    border-radius: 12px;
    background: rgba(13, 10, 24, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Custom Scrollbars */
.table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.table-container::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 10px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.5);
}

.data-grid {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.data-grid th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #18132e; /* Solid color to prevent overlap visibility during vertical scroll */
    color: #d8b4fe;
    font-weight: 600;
    padding: 1rem;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.data-grid td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    vertical-align: middle;
}

.data-grid tbody tr {
    transition: var(--transition-smooth);
}

.data-grid tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.data-grid tr:last-child td {
    border-bottom: none;
}

.vehicle-num-cell {
    font-family: monospace;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.05em;
}

.no-records {
    text-align: center;
    padding: 3rem !important;
    color: var(--text-muted);
    font-style: italic;
}

.address-cell {
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Grid Image Thumbnail styling */
.grid-thumbnail {
    width: 50px;
    height: 38px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.grid-thumbnail:hover {
    transform: scale(1.15);
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}

/* Dynamic highlight animation for newly added rows */
@keyframes rowHighlight {
    0% { background: rgba(139, 92, 246, 0.3); }
    100% { background: transparent; }
}

.new-row-highlight {
    animation: rowHighlight 3s ease forwards;
}

/* Lightbox Image Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 8, 20, 0.95);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5), 0 0 30px rgba(139, 92, 246, 0.2);
    animation: zoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.15);
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f3f4f6;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.close-modal:hover {
    color: var(--error);
    transform: scale(1.1);
}

/* Navigation Bar */
.nav-bar {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 0.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    border-radius: 12px;
    transition: var(--transition-smooth);
    letter-spacing: 0.02em;
}

.nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: #ffffff;
    background: var(--accent-gradient);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

/* Action button styles (Edit/Save/Cancel) */
.action-btn {
    background: transparent;
    border: none;
    color: var(--accent-primary);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.action-btn:hover {
    color: #ffffff;
    background: rgba(139, 92, 246, 0.15);
}

.action-btn.danger {
    color: var(--error);
}

.action-btn.danger:hover {
    background: rgba(239, 68, 68, 0.15);
}

.action-btn.success-btn {
    color: var(--success);
}

.action-btn.success-btn:hover {
    background: rgba(16, 185, 129, 0.15);
}

/* Edit Mode styling in tables */
.inline-edit-input {
    width: 100%;
    padding: 0.4rem 0.75rem;
    font-size: 0.95rem;
    background: #ffffff !important;
    border: 1px solid var(--accent-primary);
    border-radius: 8px;
    color: #111827;
    outline: none;
    text-transform: uppercase;
}

.inline-edit-input:focus {
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.3);
}

.edit-actions {
    display: flex;
    gap: 0.5rem;
}

/* Dashboard Grid & Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.dashboard-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(139, 92, 246, 0.08), transparent 70%);
    opacity: 0;
    transition: var(--transition-smooth);
    pointer-events: none;
}

.dashboard-card:hover {
    transform: translateY(-6px);
    border-color: rgba(139, 92, 246, 0.2);
    box-shadow: 0 15px 30px rgba(10, 8, 20, 0.5), 0 0 25px rgba(139, 92, 246, 0.15);
}

.dashboard-card:hover::before {
    opacity: 1;
}

.dashboard-icon {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.1));
    transition: var(--transition-smooth);
}

.dashboard-card:hover .dashboard-icon {
    transform: scale(1.15) rotate(5deg);
}

.dashboard-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.dashboard-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.dashboard-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    padding: 0.85rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition-smooth);
    display: inline-block;
    text-align: center;
}

.dashboard-card:hover .dashboard-btn {
    background: var(--accent-gradient);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

/* Combobox Searchable Dropdown Styles */
.combobox-wrapper {
    position: relative;
    width: 100%;
}

.combobox-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.2s ease;
}

.combobox-item {
    padding: 0.85rem 1.25rem;
    color: #1f2937;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.combobox-item:last-child {
    border-bottom: none;
}

.combobox-item:hover, .combobox-item.highlighted {
    background: var(--accent-primary);
    color: #ffffff;
}

.combobox-item.no-results {
    color: var(--text-muted);
    font-style: italic;
    cursor: default;
    background: transparent !important;
}

/* Service Row Layout */
.service-selector-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 1rem;
}

/* Vehicle Search Side-by-Side Photo Container */
.vehicle-info-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .vehicle-info-grid {
        grid-template-columns: 1fr;
    }
}

.vehicle-photo-panel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    min-height: 200px;
    overflow: hidden;
}

.vehicle-photo-panel img {
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.vehicle-photo-placeholder {
    color: var(--text-muted);
    font-size: 4rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.05));
}

.vehicle-photo-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
}

/* Secondary Button Styling */
.secondary-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem 2rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.02);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.05);
}

.secondary-btn:active {
    transform: translateY(0);
}

/* Compact Dashboard Layout for 4 Columns */
.dashboard-grid.four-cols {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

@media (min-width: 900px) {
    .dashboard-grid.four-cols {
        grid-template-columns: repeat(4, 1fr);
    }
}

.dashboard-card.compact {
    padding: 1.75rem 1.25rem;
    gap: 1rem;
    border-radius: 16px;
}

.dashboard-card.compact .dashboard-icon {
    font-size: 2.5rem;
    margin-bottom: 0.25rem;
}

.dashboard-card.compact h3 {
    font-size: 1.15rem;
}

.dashboard-card.compact p {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

/* Large detail photo styling */
.detail-photo {
    max-width: 100%;
    max-height: 240px;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.detail-photo:hover {
    transform: scale(1.03);
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

/* 5-Column Dashboard Grid Layout */
.dashboard-grid.five-cols {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

@media (min-width: 1100px) {
    .dashboard-grid.five-cols {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* 6-Column Dashboard Grid Layout */
.dashboard-grid.six-cols {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

@media (min-width: 1100px) {
    .dashboard-grid.six-cols {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* System Watermark Footer */
.system-footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.05em;
    opacity: 0.65;
    transition: var(--transition-smooth);
}

.system-footer:hover {
    opacity: 1;
    color: var(--text-secondary);
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.25);
}

@media print {
    .system-footer {
        display: none !important;
    }
}

/* Mobile Responsive UI/UX Optimizations */
@media (max-width: 640px) {
    /* Override body padding for mobile viewport efficiency */
    body {
        padding: 1rem 0.75rem !important;
    }

    /* Reset container height to prevent giant vertical gaps on mobile pages */
    .container {
        min-height: auto !important;
        height: auto !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* Override card inline paddings for mobile screen sizes */
    .card {
        padding: 1.25rem !important;
        border-radius: 16px;
    }

    /* Stack navigation bar elements vertically on mobile to prevent overflow */
    .nav-bar {
        flex-direction: column !important;
        gap: 0.75rem !important;
        padding: 0.75rem 1rem !important;
        align-items: center !important;
        text-align: center;
    }

    .nav-bar span {
        font-size: 0.85rem !important;
        line-height: 1.4;
    }

    .nav-link {
        padding: 0.4rem 0.85rem;
        font-size: 0.85rem;
        width: 100%;
        text-align: center;
    }

    /* Optimize header text sizes */
    .header {
        margin-bottom: 1.5rem !important;
    }

    .header h1 {
        font-size: 1.6rem !important;
    }

    .header p {
        font-size: 0.85rem !important;
    }

    .system-logo {
        max-width: 180px !important;
    }

    /* Reduce input padding and text sizes on mobile */
    input[type="text"],
    input[type="number"],
    input[type="password"],
    textarea {
        padding: 0.7rem 0.85rem !important;
        font-size: 0.9rem !important;
        border-radius: 10px;
    }

    /* Optimize submit/secondary buttons for mobile thumbs */
    .submit-btn, .secondary-btn {
        padding: 0.8rem 1.5rem !important;
        font-size: 0.95rem !important;
        border-radius: 10px;
        width: 100%;
        margin-top: 0.5rem;
    }

    /* Make service-selector-row stack on small screens */
    .service-selector-row {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }

    .service-selector-row button {
        width: 100%;
    }

    /* Adjust data grid spacing */
    .data-grid th, .data-grid td {
        padding: 0.75rem 0.5rem !important;
        font-size: 0.85rem !important;
    }

    .grid-header {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.75rem;
    }

    .grid-header h2 {
        font-size: 1.25rem;
        text-align: center;
    }

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