/* Alumni Tracking Management System - Main Stylesheet */

:root {
    --primary-color: #22c55e;
    --primary-dark: #16a34a;
    --secondary-color: #10b981;
    --accent-color: #fde047;
    --accent-dark: #facc15;
    --text-color: #1f2937;
    --bg-color: #f0fdf4;
    --border-color: #dcfce7;
    --light-green: #a7f3d0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Sidebar Styling */
.sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    background-color: #fff;
    overflow-y: auto;
}

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 56px);
    padding-top: .5rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar .nav-link {
    font-weight: 500;
    color: var(--text-color);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar .nav-link:hover {
    background-color: var(--bg-color);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.sidebar .nav-link.active {
    color: var(--primary-color);
    background-color: rgba(34, 197, 94, 0.1);
    border-left-color: var(--primary-color);
}

.sidebar .nav-link i {
    width: 20px;
    margin-right: 8px;
}

.sidebar-heading {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 600;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.card-header {
    background-color: var(--bg-color);
    border-bottom: 2px solid var(--primary-color);
    font-weight: 600;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(34, 197, 94, 0.4);
}

.btn-success {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-success:hover {
    background-color: #059669;
    border-color: #059669;
}

/* Tables */
.table {
    background-color: white;
}

.table thead th {
    border-bottom: 2px solid var(--primary-color);
    background-color: var(--bg-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: rgba(34, 197, 94, 0.05);
}

/* Form Controls */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(34, 197, 94, 0.25);
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Badges */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
    letter-spacing: 0.05em;
}

/* Alerts */
.alert {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.alert i {
    margin-right: 8px;
}

/* Flash message notifications - Toast style in top-right corner */
.toast-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1050;
    min-width: 300px;
    max-width: 500px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.4s ease-out;
}

.toast-notification.fade-out {
    animation: slideOutRight 0.4s ease-in forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Mobile responsive toast */
@media (max-width: 576px) {
    .toast-notification {
        top: 70px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
    
    @keyframes slideInRight {
        from {
            transform: translateY(-100px);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    @keyframes slideOutRight {
        from {
            transform: translateY(0);
            opacity: 1;
        }
        to {
            transform: translateY(-100px);
            opacity: 0;
        }
    }
}

/* Profile Images */
.profile-img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.profile-img-small {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
}

/* Stats Cards */
.stats-card {
    border-radius: 0.5rem;
    padding: 1.5rem;
}

/* Dashboard specific */
.display-6 {
    font-weight: 700;
}

.opacity-50 {
    opacity: 0.5;
}

/* Footer */
.footer {
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    position: relative;
    z-index: 1;
}

/* Ensure footer aligns beside the fixed sidebar */
@media (min-width: 768px) and (max-width: 991.98px) {
    .footer {
        margin-left: 25%; /* matches col-md-3 sidebar */
        width: calc(100% - 25%);
    }
}
@media (min-width: 992px) {
    .footer {
        margin-left: 16.6667%; /* matches col-lg-2 sidebar */
        width: calc(100% - 16.6667%);
    }
}

/* Utility Classes */
.text-muted {
    color: #6b7280 !important;
}

.border-bottom {
    border-bottom: 1px solid var(--border-color) !important;
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }
    
    .display-6 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .card-body {
        padding: 1rem;
    }
    
    h1, .h1 {
        font-size: 1.75rem;
    }
    
    h2, .h2 {
        font-size: 1.5rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

/* Print Styles */
@media print {
    .sidebar,
    .navbar,
    .footer,
    .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
