/* Custom styles for Coach CRM */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Navigation */
.navbar-brand {
    font-weight: 600;
}

/* Cards */
.card {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.card-header {
    border-radius: 8px 8px 0 0;
    font-weight: 500;
}

/* Forms */
.form-control, .form-select {
    border-radius: 6px;
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

/* Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-radius: 6px 0 0 6px;
}

.btn-group .btn:last-child {
    border-radius: 0 6px 6px 0;
}

/* Tables */
.table th {
    border-top: none;
    font-weight: 600;
    color: var(--bs-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table-hover tbody tr:hover {
    background-color: rgba(0,123,255,0.05);
}

/* Dashboard cards */
.dashboard-stat {
    text-align: center;
    padding: 1.5rem;
}

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

/* Client detail page */
.client-info-section {
    margin-bottom: 1.5rem;
}

.client-info-section h6 {
    color: var(--bs-secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Conversation styling */
.conversation-notes {
    white-space: pre-wrap;
    line-height: 1.6;
}

/* Login page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        break-inside: avoid;
    }
    
    .conversation-item {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        break-after: avoid;
    }
}

/* Responsive design improvements */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .btn-group {
        display: flex;
        flex-direction: column;
    }
    
    .btn-group .btn {
        border-radius: 6px !important;
        margin-bottom: 0.25rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* Accessibility improvements */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* Loading states */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Status indicators */
.status-active {
    color: var(--bs-success);
}

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

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

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bs-light);
}

::-webkit-scrollbar-thumb {
    background: var(--bs-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bs-dark);
}

/* Form validation styles */
.was-validated .form-control:valid {
    border-color: var(--bs-success);
}

.was-validated .form-control:invalid {
    border-color: var(--bs-danger);
}

/* Animation for alerts */
.alert {
    animation: slideIn 0.3s ease-out;
}

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

/* Footer styling */
footer {
    margin-top: auto;
}

/* Ensure body takes full height */
html, body {
    height: 100%;
}

#root, .App {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}
