/* Main Application Styles */

:root {
    --primary-color: #007bff;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-bg: #f8f9fa;
    --dark-text: #212529;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    background-color: #f5f5f5;
}

body {
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

footer {
    margin-top: auto;
    border-top: 1px solid #e9ecef;
}

.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.3rem;
}

/* Card Styles */
.card {
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
    border-radius: 8px;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
    padding: 1rem;
}

.card-body {
    padding: 1.5rem;
}

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

.table thead {
    background-color: #f8f9fa;
}

.table th {
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.table input,
.table select {
    width: 100%;
}

/* Button Styles */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

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

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,.15);
}

.btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.875rem;
}

/* Form Controls */
.form-control, .form-select {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0.55rem 0.75rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 6px;
    border-left: 4px solid #dee2e6;
}

.alert-success {
    border-left-color: var(--success-color);
}

.alert-danger {
    border-left-color: var(--danger-color);
}

.alert-warning {
    border-left-color: var(--warning-color);
}

/* Badges and Labels */
.badge {
    border-radius: 4px;
    padding: 0.35em 0.65em;
    font-weight: 500;
}

/* Timeline Styles */
.timeline-item {
    position: relative;
    padding-left: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--primary-color);
}

/* Dashboard Styles */
.activity-row {
    transition: background-color 0.2s ease;
}

.activity-row:hover {
    background-color: #f8f9fa;
}

.new-activity {
    background-color: #e7f3ff;
}

.duration-display {
    font-weight: 600;
    color: var(--success-color);
    font-family: 'Courier New', monospace;
}

/* Category Cards */
.category-card {
    transition: all 0.3s ease;
    border-left: 4px solid;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container-fluid {
        padding: 0.5rem;
    }

    .card {
        margin-bottom: 1rem;
    }

    .table {
        font-size: 0.875rem;
    }

    .table input,
    .table select {
        padding: 0.35rem 0.5rem;
    }

    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    .navbar-collapse {
        padding-top: 1rem;
    }

    .nav-link {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* Print Styles */
@media print {
    .navbar, footer, .btn {
        display: none;
    }

    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }

    .table {
        font-size: 11pt;
    }
}

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

.alert, .card {
    animation: fadeIn 0.3s ease;
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 3px solid rgba(0,123,255,.25);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 0.6s linear infinite;
}

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