/* Due Diligence Management System - Main Styles */

:root {
    --primary-color: #2563EB;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;
    --info-color: #3B82F6;
    --dark: #1F2937;
    --light: #F9FAFB;
    --border-radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    padding-bottom: 60px; /* For bottom nav */
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.container-fluid {
    padding: 0 15px;
}

/* Navigation */
.navbar {
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.25rem;
    color: var(--primary-color);
    text-decoration: none;
}

.navbar-menu {
    display: flex;
    gap: 2rem;
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

.navbar-nav a {
    color: var(--dark);
    text-decoration: none;
    transition: color 0.3s;
}

.navbar-nav a:hover,
.navbar-nav a.active {
    color: var(--primary-color);
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
}

.navbar-toggle span {
    width: 25px;
    height: 3px;
    background: var(--dark);
    margin: 3px 0;
    transition: 0.3s;
}

/* Bottom Navigation (Mobile) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1000;
}

.bottom-nav-item {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    text-decoration: none;
    color: #6B7280;
    transition: color 0.3s;
}

.bottom-nav-item.active {
    color: var(--primary-color);
}

.bottom-nav-icon {
    font-size: 20px;
    margin-bottom: 2px;
}

.bottom-nav-label {
    font-size: 11px;
    display: block;
}

/* Page Header */
.page-header {
    background: white;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid #E5E7EB;
}

.page-header h1 {
    font-size: 1.875rem;
    color: var(--dark);
}

/* Cards */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #E5E7EB;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-sm-2 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.grid-lg-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--dark);
}

.stat-label {
    color: #6B7280;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.stat-detail {
    color: #9CA3AF;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #D1D5DB;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.invalid-feedback {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%236B7280' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.5rem;
    padding-right: 2.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #1D4ED8;
}

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

.btn-success:hover {
    background: #059669;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-outline {
    background: white;
    border: 1px solid #D1D5DB;
    color: var(--dark);
}

.btn-outline:hover {
    background: var(--light);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.alert-success {
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.alert-danger {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.alert-warning {
    background: #FEF3C7;
    color: #92400E;
    border: 1px solid #FDE68A;
}

.alert-info {
    background: #DBEAFE;
    color: #1E3A8A;
    border: 1px solid #BFDBFE;
}

/* Tables */
.table {
    width: 100%;
    background: white;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #E5E7EB;
}

.table th {
    background: #F9FAFB;
    font-weight: 600;
    color: #4B5563;
}

.table-striped tbody tr:nth-child(odd) {
    background: #F9FAFB;
}

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

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
}

.badge-success {
    background: #D1FAE5;
    color: #065F46;
}

.badge-danger {
    background: #FEE2E2;
    color: #991B1B;
}

.badge-warning {
    background: #FEF3C7;
    color: #92400E;
}

.badge-info {
    background: #DBEAFE;
    color: #1E3A8A;
}

/* Temperature Specific Styles */
.temperature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.temperature-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.temperature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.temperature-card.selected {
    border: 2px solid var(--primary-color);
}

.temperature-display {
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    padding: 1rem;
}

.temperature-display.in-range {
    color: var(--success-color);
}

.temperature-display.warning {
    color: var(--warning-color);
}

.temperature-display.danger {
    color: var(--danger-color);
}

.temperature-input {
    font-size: 1.5rem;
    text-align: center;
    padding: 1rem;
}

.equipment-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.equipment-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.equipment-location {
    color: #6B7280;
    font-size: 0.875rem;
}

.temp-range {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #E5E7EB;
    font-size: 0.875rem;
}

.temp-range-min {
    color: var(--info-color);
}

.temp-range-max {
    color: var(--danger-color);
}

/* Quick Entry Mode */
.quick-entry-panel {
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s;
    z-index: 999;
}

.quick-entry-panel.active {
    transform: translateY(0);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: #6B7280; }
.text-danger { color: var(--danger-color); }
.text-success { color: var(--success-color); }
.text-warning { color: var(--warning-color); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }

.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }

.row {
    display: flex;
    flex-wrap: wrap;
    margin: -0.5rem;
}

.col-12 { flex: 0 0 100%; }
.col-md-6 { flex: 0 0 50%; }
.col-lg-4 { flex: 0 0 33.333%; }
.col-lg-3 { flex: 0 0 25%; }

[class*="col-"] {
    padding: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .navbar-menu.active {
        display: block;
    }

    .navbar-nav {
        flex-direction: column;
        padding: 1rem;
    }

    .navbar-toggle {
        display: flex;
    }

    .bottom-nav {
        display: flex;
    }

    body {
        padding-bottom: 80px;
    }

    .col-md-6,
    .col-lg-4,
    .col-lg-3 {
        flex: 0 0 100%;
    }

    .temperature-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid #F3F4F6;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

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

/* Vue.js Transitions */
.fade-enter-active,
.fade-leave-active {
    transition: opacity 0.3s;
}

.fade-enter-from,
.fade-leave-to {
    opacity: 0;
}

.slide-enter-active,
.slide-leave-active {
    transition: transform 0.3s;
}

.slide-enter-from {
    transform: translateX(-100%);
}

.slide-leave-to {
    transform: translateX(100%);
}