/* Gorgeous backend kanban polish reused across records */
.o_kanban_gorgeous {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 6px 18px rgba(0,0,0,.06);
}

.o_kanban_gorgeous .o_badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 9999px;
    background: #eef2ff;
    color: #4338ca;
    margin-right: 6px;
}

.o_kanban_gorgeous .o_badge_primary {
    background: #ecfeff;
    color: #0891b2;
}

.o_kanban_gorgeous .o_kanban_primary {
    font-size: 15px;
    margin-bottom: 8px;
}

.o_kanban_gorgeous .o_kanban_secondary {
    margin-bottom: 10px;
}

.o_kanban_gorgeous .o_kanban_stats .o_stat_text {
    margin-right: 12px;
    color: #111827;
}

.o_kanban_gorgeous .o_kanban_buttons .btn {
    margin-right: 6px;
}
/* Schools Portal - Modern UI Styles */

/* Welcome Cards with Beautiful Gradient */
.portal-welcome-card {
    border-radius: 20px !important;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3) !important;
}

.portal-welcome-card .card-body {
    backdrop-filter: blur(10px);
    padding: 2rem !important;
}

/* Backend Chatter Styling */
.schools-narrow-chatter {
    max-width: 100% !important;
    margin-top: 2rem !important;
    border-top: 1px solid #e5e7eb !important;
    padding-top: 2rem !important;
}

.schools-narrow-chatter .o_mail_thread {
    max-height: 400px !important;
    overflow-y: auto !important;
}

.schools-narrow-chatter .o_thread_message {
    margin-bottom: 1rem !important;
    padding: 1rem !important;
    border-radius: 12px !important;
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
}

/* Prevent duplicate chatter display */
.o_form_view .o_notebook .schools-narrow-chatter {
    display: none !important;
}

/* Ensure single chatter at bottom */
.o_form_view > .schools-narrow-chatter,
.o_form_view .o_form_sheet + .schools-narrow-chatter {
    display: block !important;
}

/* Analytics Cards - Modern Design */
.stat-card {
    border-radius: 16px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white !important;
    border: none !important;
    overflow: hidden;
    position: relative;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--stat-color, #667eea), var(--stat-color-light, #764ba2));
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12) !important;
}

.stat-card .card-body {
    padding: 1.5rem !important;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 26px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* Stat card color themes */
.stat-card:nth-child(1) {
    --stat-color: #667eea;
    --stat-color-light: #764ba2;
}

.stat-card:nth-child(2) {
    --stat-color: #f093fb;
    --stat-color-light: #f5576c;
}

.stat-card:nth-child(3) {
    --stat-color: #4facfe;
    --stat-color-light: #00f2fe;
}

.stat-card:nth-child(4) {
    --stat-color: #43e97b;
    --stat-color-light: #38f9d7;
}

/* Modern Action Buttons */
.action-btn {
    padding: 1.75rem 1rem !important;
    text-align: center;
    border-radius: 16px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent !important;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, var(--btn-gradient-start, #667eea), var(--btn-gradient-end, #764ba2)) border-box !important;
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--btn-gradient-start, #667eea), var(--btn-gradient-end, #764ba2));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.action-btn:hover::before {
    opacity: 0.1;
}

.action-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.2);
    border-color: transparent !important;
}

.action-btn i {
    display: block;
    margin-bottom: 10px;
}

.action-btn span {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Button color themes */
.btn-outline-primary {
    --btn-gradient-start: #667eea;
    --btn-gradient-end: #764ba2;
    color: #667eea !important;
}

.btn-outline-success {
    --btn-gradient-start: #51cf66;
    --btn-gradient-end: #38d9a9;
    color: #51cf66 !important;
}

.btn-outline-info {
    --btn-gradient-start: #4facfe;
    --btn-gradient-end: #00f2fe;
    color: #4facfe !important;
}

.btn-outline-secondary {
    --btn-gradient-start: #868e96;
    --btn-gradient-end: #495057;
    color: #495057 !important;
}

/* Child Cards */
.child-card {
    border-radius: 12px !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.child-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

/* Card Headers */
.card-header {
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;
}

.card-body {
    border-bottom-left-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
}

/* Badges */
.badge-lg {
    padding: 8px 12px;
    font-size: 14px;
}

/* Tables */
.table-hover tbody tr {
    transition: background-color 0.2s ease;
}

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

/* List Groups */
.list-group-item {
    transition: background-color 0.2s ease;
    border-left-width: 0 !important;
    border-right-width: 0 !important;
}

.list-group-item:hover {
    background-color: #f8f9fa;
}

.list-group-item:first-child {
    border-top-width: 0 !important;
}

/* Student Avatar */
.student-avatar {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .stat-card {
        margin-bottom: 15px;
    }
    
    .action-btn {
        margin-bottom: 10px;
    }
    
    .portal-welcome-card h2 {
        font-size: 1.5rem;
    }
}

/* Card Shadows */
.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.shadow {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
}

/* Background Gradients */
.bg-gradient {
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
}

/* Report Card Preview */
.report-card-preview {
    border-left: 4px solid #007bff;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

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

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* Portal Layout Improvements */
.o_portal .breadcrumb {
    background-color: transparent;
    padding-left: 0;
}

.o_portal_sidebar {
    position: sticky;
    top: 20px;
}

/* Mobile Optimizations */
@media (max-width: 576px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .portal-welcome-card .card-body {
        padding: 20px !important;
    }
}

/* Print Styles */
@media print {
    .o_portal_sidebar,
    .action-btn,
    .btn {
        display: none !important;
    }
    
    .card {
        page-break-inside: avoid;
    }
}

/* Accessibility */
.btn:focus,
.form-control:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

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

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Empty State */
.opacity-25 {
    opacity: 0.25;
}

/* Modern Color Palette */
.text-primary {
    color: #667eea !important;
}

.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.text-success {
    color: #51cf66 !important;
}

.bg-success {
    background: linear-gradient(135deg, #51cf66 0%, #38d9a9 100%) !important;
}

.text-info {
    color: #4facfe !important;
}

.bg-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
}

.text-warning {
    color: #ffa94d !important;
}

.bg-warning {
    background: linear-gradient(135deg, #ffa94d 0%, #ffd43b 100%) !important;
}

.text-danger {
    color: #ff6b6b !important;
}

.bg-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8787 100%) !important;
}

/* Card Improvements */
.card {
    border: none !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

.card-header {
    background-color: #f8f9fa !important;
    border-bottom: 2px solid #e9ecef !important;
    padding: 1.25rem 1.5rem !important;
}

.card-header h5 {
    margin-bottom: 0;
    font-weight: 600;
    color: #2c3e50;
}

/* Badge Improvements */
.badge {
    font-weight: 600;
    padding: 0.5em 1em;
    border-radius: 8px;
}

.badge-success {
    background: linear-gradient(135deg, #51cf66, #38d9a9) !important;
    color: white !important;
}

.badge-warning {
    background: linear-gradient(135deg, #ffa94d, #ffd43b) !important;
    color: white !important;
}

.badge-danger {
    background: linear-gradient(135deg, #ff6b6b, #ff8787) !important;
    color: white !important;
}

/* List Group Modern Style */
.list-group-item {
    border: none !important;
    border-bottom: 1px solid #f1f3f5 !important;
    padding: 1.25rem 0 !important;
}

.list-group-item:last-child {
    border-bottom: none !important;
}

.list-group-item:hover {
    background-color: #f8f9fa !important;
    border-radius: 8px !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

/* Typography Improvements */
h2, h3, h4, h5, h6 {
    color: #2c3e50;
    font-weight: 600;
}

.small, small {
    font-size: 0.875rem;
}

/* Container Improvements */
.container {
    max-width: 1200px;
}

/* Spacing Utilities */
.mb-4 {
    margin-bottom: 2rem !important;
}

.mb-5 {
    margin-bottom: 3rem !important;
}

.mt-4 {
    margin-top: 2rem !important;
}

/* Report Card Modern Style */
.report-card-preview {
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-left: 4px solid #667eea !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Smooth Transitions */
* {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

button, .btn, a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
