/* Construction Management System Custom Styles */

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --info-color: #0891b2;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
}

body {
    background-color: #f8fafc;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Custom Card Styles */
.card {
    border: none;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

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

.card-header {
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
}

/* Status Badges */
/* Status Badges */
.badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    color: #fff;
    display: inline-block;
}

.bg-danger {
    background-color: #dc2626 !important;
}

.bg-success {
    background-color: #10b981 !important;
}

.bg-warning {
    background-color: #f59e0b !important;
}

.badge-draft { background-color: #6b7280; }
.badge-submitted { background-color: #d97706; }
.badge-office-approved { background-color: #0891b2; }
.badge-director-approved { background-color: #059669; }
.badge-scheduled { background-color: #10b981; }
.badge-not-scheduled { background-color: #dc2626; }
.badge-rejected { background-color: #dc2626; }
.badge-pending { background-color: #d97706; }
.badge-active { background-color: #059669; }
.badge-inactive { background-color: #6b7280; }

/* Dashboard Stats Cards */
.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.stats-card.success {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stats-card.warning {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.stats-card.danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%);
}

.stats-card .stats-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.stats-card .stats-number {
    font-size: 2rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

/* Form Styles */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

/* Button Styles */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
}

/* Table Styles */
.table {
    background-color: white;
}

.table th {
    background-color: #f8fafc;
    border-top: none;
    font-weight: 600;
    color: var(--dark-color);
}

.table-hover tbody tr:hover {
    background-color: #f1f5f9;
}

/* Navigation Styles */
.navbar-brand {
    font-weight: bold;
    font-size: 1.25rem;
}

.nav-link {
    font-weight: 500;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Login/Register Page Styles */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 400px;
    width: 100%;
}

.auth-header {
    background: var(--primary-color);
    color: white;
    padding: 2rem;
    text-align: center;
}

.auth-body {
    padding: 2rem;
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 8px;
}

/* Comment Styles */
.comment-item {
    background-color: #f8fafc;
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0 8px 8px 0;
}

.comment-meta {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

/* Plan Form Styles */
.plan-form-section {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.plan-form-section h5 {
    color: var(--primary-color);
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Avatar Circle */
.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stats-card {
        text-align: center;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .auth-card {
        margin: 1rem;
    }
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Custom Utilities */
.text-primary-custom {
    color: var(--primary-color) !important;
}

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

.border-primary-custom {
    border-color: var(--primary-color) !important;
}

/* Plan Status Timeline */
.status-timeline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
    padding: 1rem;
    background-color: #f8fafc;
    border-radius: 8px;
}

.status-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.status-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 15px;
    right: -50%;
    width: 100%;
    height: 2px;
    background-color: #e2e8f0;
    z-index: 1;
}

.status-step.active:not(:last-child)::after {
    background-color: var(--success-color);
}

.status-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    z-index: 2;
    position: relative;
}

.status-step.active .status-icon {
    background-color: var(--success-color);
    color: white;
}

.status-label {
    font-size: 0.75rem;
    text-align: center;
    color: #6b7280;
}

.status-step.active .status-label {
    color: var(--success-color);
    font-weight: 600;
}

/* Enhanced Alert Styles for Dashboard */
.alert-enhanced {
    border-left: 4px solid;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.alert-enhanced.alert-danger {
    border-left-color: var(--danger-color);
    background-color: #fef2f2;
}

.alert-enhanced.alert-warning {
    border-left-color: var(--warning-color);
    background-color: #fffbeb;
}

.alert-enhanced.alert-success {
    border-left-color: var(--success-color);
    background-color: #f0fdf4;
}

/* Status Indicator Styles */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.status-indicator.success {
    color: var(--success-color);
}

.status-indicator.warning {
    color: var(--warning-color);
}

.status-indicator.danger {
    color: var(--danger-color);
}

/* Action Button Styles */
.action-btn {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

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

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

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

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

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

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 20px 0;
}

.auth-card {
    width: 100%;
    margin: 0 auto;
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.auth-header {
    background: #4e73df;
    color: white;
    padding: 2rem;
    text-align: center;
}

.auth-body {
    padding: 2rem;
    background: white;
}

/* Password strength indicator */
.progress {
    height: 5px;
}

/* Terms checkbox */
.form-check-label a {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .auth-card {
        border-radius: 0;
    }
}