/* Van Rijn Afbouw Construction Project Manager Styles */

:root {
    --vr-orange: #f6904e;
    --vr-gray: #585c5f;
    --vr-orange-light: #f8a668;
    --vr-orange-dark: #e67c3a;
    --vr-gray-light: #6c7075;
    --vr-gray-dark: #45484b;
    --vr-white: #ffffff;
    --vr-light-bg: #f8f9fa;
    --vr-border: #dee2e6;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: var(--vr-gray);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.main-header {
    background: linear-gradient(135deg, var(--vr-orange) 0%, var(--vr-orange-dark) 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.brand-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.brand-logo:hover {
    color: white;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 8px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--vr-orange);
    font-size: 1.2rem;
    font-weight: bold;
}

/* Sidebar Navigation */
.sidebar {
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    border-right: 3px solid var(--vr-orange);
    min-height: calc(100vh - 76px);
}

.nav-link {
    color: var(--vr-gray);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    margin: 0.25rem 0.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.nav-link:hover {
    background: linear-gradient(135deg, var(--vr-orange) 0%, var(--vr-orange-light) 100%);
    color: white;
    text-decoration: none;
    transform: translateX(5px);
}

.nav-link.active {
    background: var(--vr-orange);
    color: white;
    font-weight: 600;
}

.nav-link i {
    margin-right: 10px;
    width: 18px;
    text-align: center;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    background: white;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.card-header {
    background: linear-gradient(135deg, var(--vr-gray) 0%, var(--vr-gray-light) 100%);
    color: white;
    border: none;
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-header h5, .card-header h6 {
    margin: 0;
    color: white;
}

/* Statistics Cards */
.stats-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border-left: 4px solid var(--vr-orange);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--vr-orange), var(--vr-orange-light));
    opacity: 0.1;
    border-radius: 50%;
    transform: translate(30px, -30px);
}

.stats-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border-left-color: var(--vr-orange-dark);
}

.stats-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--vr-orange);
    margin: 0;
}

.stats-label {
    color: var(--vr-gray);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stats-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: var(--vr-orange);
    opacity: 0.3;
}

/* Buttons */
.btn-vr-primary {
    background: linear-gradient(135deg, var(--vr-orange) 0%, var(--vr-orange-dark) 100%);
    border: none;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(246, 144, 78, 0.3);
}

.btn-vr-primary:hover {
    background: linear-gradient(135deg, var(--vr-orange-dark) 0%, var(--vr-orange) 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(246, 144, 78, 0.4);
}

.btn-vr-secondary {
    background: linear-gradient(135deg, var(--vr-gray) 0%, var(--vr-gray-dark) 100%);
    border: none;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-vr-secondary:hover {
    background: linear-gradient(135deg, var(--vr-gray-dark) 0%, var(--vr-gray) 100%);
    color: white;
    transform: translateY(-1px);
}

.btn-outline-vr {
    border: 2px solid var(--vr-orange);
    color: var(--vr-orange);
    background: transparent;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-vr:hover {
    background: var(--vr-orange);
    color: white;
    transform: translateY(-1px);
}

/* Forms */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus {
    border-color: var(--vr-orange);
    box-shadow: 0 0 0 0.2rem rgba(246, 144, 78, 0.25);
}

.form-label {
    color: var(--vr-gray);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Tables */
.table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.table thead th {
    background: linear-gradient(135deg, var(--vr-gray) 0%, var(--vr-gray-light) 100%);
    color: white;
    border: none;
    padding: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: rgba(246, 144, 78, 0.05);
    transform: scale(1.01);
}

.table td {
    padding: 1rem;
    vertical-align: middle;
    border-top: 1px solid #f8f9fa;
}

/* Badges */
.badge-vr-primary {
    background: var(--vr-orange);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-vr-secondary {
    background: var(--vr-gray);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid var(--success);
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border-left: 4px solid var(--warning);
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border-left: 4px solid var(--info);
}

/* Handwriting Canvas */
.handwriting-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 2px dashed var(--vr-orange);
    transition: all 0.3s ease;
}

.handwriting-container:hover {
    border-color: var(--vr-orange-dark);
    box-shadow: 0 6px 25px rgba(246, 144, 78, 0.15);
}

#handwriting-canvas {
    border: 2px solid var(--vr-border);
    border-radius: 8px;
    background: #fafafa;
    cursor: crosshair;
    transition: all 0.3s ease;
}

#handwriting-canvas:hover {
    border-color: var(--vr-orange);
}

/* Progress Bars */
.progress {
    height: 8px;
    border-radius: 20px;
    background: #f8f9fa;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(135deg, var(--vr-orange) 0%, var(--vr-orange-light) 100%);
    border-radius: 20px;
    transition: all 0.3s ease;
}

/* User Avatar */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--vr-orange) 0%, var(--vr-orange-light) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 10px;
    box-shadow: 0 2px 10px rgba(246, 144, 78, 0.3);
}

/* Quick Actions */
.quick-actions {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.quick-action-item {
    text-align: center;
    padding: 1.5rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--vr-gray);
    display: block;
    border: 2px solid transparent;
}

.quick-action-item:hover {
    background: linear-gradient(135deg, var(--vr-orange) 0%, var(--vr-orange-light) 100%);
    color: white;
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(246, 144, 78, 0.3);
    border-color: var(--vr-orange-dark);
}

.quick-action-item i {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

/* Activity Feed */
.activity-item {
    padding: 1rem;
    border-left: 3px solid var(--vr-orange);
    background: white;
    border-radius: 0 8px 8px 0;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.activity-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(246, 144, 78, 0.3);
    border-radius: 50%;
    border-top-color: var(--vr-orange);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 76px;
        left: -100%;
        width: 280px;
        transition: left 0.3s ease;
        z-index: 999;
    }

    .sidebar.show {
        left: 0;
    }

    .stats-card {
        margin-bottom: 1rem;
    }

    .table-responsive {
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    }
}

/* Dashboard Welcome */
.welcome-banner {
    background: linear-gradient(135deg, var(--vr-orange) 0%, var(--vr-orange-dark) 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.welcome-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.welcome-banner h2 {
    margin: 0 0 0.5rem 0;
    font-weight: bold;
}

.welcome-banner p {
    margin: 0;
    opacity: 0.9;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--vr-orange);
    opacity: 0.5;
    margin-bottom: 1rem;
}

.empty-state h4 {
    color: var(--vr-gray);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--vr-gray-light);
    margin-bottom: 1.5rem;
}

/* Form checkbox cards */
.form-check-card {
    border: 1px solid var(--vr-border);
    border-radius: 0.375rem;
    padding: 1rem;
    transition: all 0.2s ease;
    background: white;
    position: relative;
}

.form-check-card:hover {
    border-color: var(--vr-orange);
    box-shadow: 0 2px 4px rgba(246, 144, 78, 0.1);
}

.form-check-card .form-check-input:checked + .form-check-label {
    color: var(--vr-orange);
}

.form-check-card .form-check-input:checked ~ * {
    border-color: var(--vr-orange);
}

.form-check-card .form-check-input:checked {
    background-color: var(--vr-orange);
    border-color: var(--vr-orange);
}

.form-check-card .form-check-label {
    cursor: pointer;
    padding-left: 1.5rem;
}

/* Logo styling */
.sidebar-brand img {
    transition: opacity 0.2s ease;
}

.sidebar-brand img:hover {
    opacity: 0.8;
}

.current-logo img {
    transition: all 0.2s ease;
    border-radius: 4px;
}

.current-logo img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.brand-logo img {
    filter: brightness(1.1);
    transition: filter 0.2s ease;
}

.brand-logo:hover img {
    filter: brightness(1.2);
}