:root {
    --primary-gold: #FFD700;
    --dark-bg: #1a1a1a;
    --darker-bg: #121212;
    --text-light: #f8f9fa;
    --text-gold: #FFD700;
    --overlay-color: rgba(0, 0, 0, 0.7);
}

body {
    background-color: var(--dark-bg);
    color: var(--text-light);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

html {
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--darker-bg);
}
::-webkit-scrollbar-thumb {
    background: var(--primary-gold);
    border-radius: 5px;
}

/* Typography */
.text-gold {
    color: var(--primary-gold) !important;
}

.bg-gold {
    background-color: var(--primary-gold) !important;
    color: var(--darker-bg) !important;
}

.bg-darker-bg {
    background-color: var(--darker-bg) !important;
}

.btn-gold {
    background-color: var(--primary-gold);
    color: var(--darker-bg);
    font-weight: bold;
    border: none;
    transition: all 0.3s ease;
}

.btn-gold:hover {
    background-color: #e6c200;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

/* Navbar */
.navbar {
    background-color: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
    z-index: 1030;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.navbar > .max-w-7xl {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    gap: 16px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-light);
    white-space: nowrap;
}

#navbarNav {
    flex: 1;
}

.navbar ul {
    display: flex;
    align-items: center;
}

.navbar-toggler {
    border: 1px solid rgba(255, 215, 0, 0.4);
    padding: 4px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255,255,255,0.95)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
    display: inline-block;
    width: 24px;
    height: 24px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
}

/* Desktop navbar behavior */
@media (min-width: 768px) {
    .navbar .navbar-toggler {
        display: none !important;
    }
    #navbarNav .nav-close {
        display: none !important;
    }
}

.nav-link {
    color: var(--text-light) !important;
    transition: color 0.3s ease;
    position: relative;
    display: inline-block;
    padding: 0.75rem 0.25rem;
    margin: 0 0.25rem;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-gold) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-gold);
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

@media (max-width: 767.98px) {
    #navbarNav {
        position: fixed;
        top: 56px;
        left: 0;
        height: calc(100vh - 56px);
        width: 260px;
        background-color: rgba(18, 18, 18, 0.98);
        box-shadow: 12px 0 24px rgba(0, 0, 0, 0.4);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        padding: 16px;
        z-index: 2000;
    }
    #navbarNav.open {
        transform: translateX(0);
    }
    .navbar > .max-w-7xl {
        padding-left: 8px;
        padding-right: 8px;
        gap: 8px;
        min-height: 56px;
    }
    .navbar-toggler {
        margin-left: 0;
    }
    .navbar ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 0;
    }
    .nav-link {
        padding: 0.75rem 0.25rem;
        margin: 0;
    }
    .navbar-brand {
        white-space: normal;
        flex: 1 1 auto;
        min-width: 0;
    }
    #company-name {
        white-space: normal;
        word-break: break-word;
        line-height: 1.1;
        display: block;
    }
    .nav-overlay {
        position: fixed;
        top: 56px; left: 0; right: 0; bottom: 0;
        background-color: rgba(0, 0, 0, 0.6);
        z-index: 1990;
    }

    #navbarNav .nav-close {
        position: absolute;
        top: 8px;
        right: 8px;
        width: 28px;
        height: 28px;
        border: 1px solid rgba(255, 215, 0, 0.4);
        border-radius: 6px;
        color: #fff;
        background: transparent;
        font-size: 20px;
        line-height: 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* Industrial Backgrounds */
.hero-section {
    background: linear-gradient(var(--overlay-color), var(--overlay-color)), url('https://images.unsplash.com/photo-1581094794329-c8112a89af12?q=80&w=2070&auto=format&fit=crop'); /* Placeholder industrial image */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.section-bg-industrial {
    background: linear-gradient(var(--overlay-color), var(--overlay-color)), url('https://images.unsplash.com/photo-1518709268805-4e9042af9f23?q=80&w=2068&auto=format&fit=crop'); /* Placeholder mining image */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Cards */
.card-custom {
    background-color: var(--darker-bg);
    border: 1px solid rgba(255, 215, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-custom:hover {
    transform: translateY(-5px);
    border-color: var(--primary-gold);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

/* Animations */
.fade-in {
    animation: fadeIn 1s ease-in;
}

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

/* Loading Spinner */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-gold);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-outline-light {
    color: var(--text-light);
    border: 1px solid var(--text-light);
    background: transparent;
}

.btn-outline-light:hover {
    background: var(--text-light);
    color: var(--darker-bg);
}

.btn-sm {
    padding: 0.25rem 0.6rem;
    font-size: 0.875rem;
}

.btn-secondary {
    background-color: #374151; /* gray-700 */
    color: #ffffff;
    border: 1px solid #4b5563; /* gray-600 */
}

.btn-secondary:hover {
    background-color: #4b5563;
}

.btn-outline-warning {
    color: var(--primary-gold);
    border: 1px solid var(--primary-gold);
    background: transparent;
}

.btn-outline-warning:hover {
    background: var(--primary-gold);
    color: var(--darker-bg);
}

.btn-outline-danger {
    color: #ef4444; /* red-500 */
    border: 1px solid #ef4444;
    background: transparent;
}

.btn-outline-danger:hover {
    background: #ef4444;
    color: #ffffff;
}

.border-gold {
    border-color: var(--primary-gold);
}

/* --- Admin Panel Styles --- */
#wrapper {
    min-height: 100vh;
}

#sidebar-wrapper {
    position: sticky;
    top: 0;
}

.list-group {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 64px);
}

.list-group-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-left: 3px solid transparent;
    text-decoration: none;
}

.list-group-item:hover {
    background-color: rgba(255, 215, 0, 0.06);
}

.list-group-item-action {
    cursor: pointer;
}

.active-tab {
    color: var(--text-light);
    border-left-color: var(--primary-gold);
    background-color: rgba(255, 215, 0, 0.06);
}

#page-content-wrapper {
    background-color: #0f172a; /* slate-900-ish */
}

.content-section .card-custom {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

/* Form Controls */
.form-label {
    display: block;
    font-weight: 600;
    color: #d1d5db; /* gray-300 */
    margin-bottom: 6px;
}

.form-control {
    display: block;
    width: 100%;
    flex: 1 1 auto; /* make full width inside flex */
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #374151; /* gray-700 */
    background-color: #1f2937; /* gray-800 */
    color: #f8f9fa;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.18);
    background-color: #111827; /* gray-900 */
}

.form-control[readonly] {
    opacity: 0.9;
    cursor: default;
}

.form-control::placeholder {
    color: #9ca3af; /* gray-400 */
}

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

/* Upload button in input rows */
.upload-btn {
    white-space: nowrap;
}

/* Alerts */
.alert {
    border-left: 4px solid var(--primary-gold);
    border-radius: 10px;
}

/* Modal tweaks */
.modal-backdrop {
    background-color: rgba(0,0,0,0.6);
}
