/* Import modern Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600;700&display=swap');

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #f5f7fa;
    color: #2d3748;
    line-height: 1.6;
    font-size: 15px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: #1a202c;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2.25rem;
}

h2 {
    font-size: 1.875rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.125rem;
}

/* Sidebar - Modern Design with Flexbox */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 260px;
    background: linear-gradient(180deg, #0d9488 0%, #0f766e 50%, #115e59 100%);
    padding: 2rem 0 1.5rem 0;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sidebar-header {
    padding: 0 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 1.5rem;
    text-align: center;
}

.sidebar-header img {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.sidebar-header img:hover {
    transform: scale(1.05);
}

.sidebar-header h3 {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 1rem;
    letter-spacing: -0.02em;
    white-space: nowrap;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sidebar-section {
    padding: 1rem 1.5rem 0.5rem;
    font-size: 0.7rem !important;
    /* Force small everywhere */
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.sidebar a {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.25rem;
    margin: 0.25rem 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.9375rem;
    letter-spacing: 0.01em;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

.sidebar a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar a:hover::before {
    opacity: 1;
}

.sidebar a i {
    font-size: 1.25rem;
    width: 28px;
    text-align: center;
    margin-right: 1rem;
    transition: transform 0.3s ease;
}

.sidebar a:hover i {
    transform: scale(1.1);
}

.sidebar a span {
    white-space: nowrap;
    position: relative;
    z-index: 1;
}

.sidebar a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sidebar a.active {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.3), rgba(20, 184, 166, 0.15));
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(20, 184, 166, 0.3);
    border-left: 4px solid #14b8a6;
}

.sidebar a.active::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: #14b8a6;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(20, 184, 166, 0.6);
}

.sidebar .logout-link {
    margin-top: auto;
    margin-left: 0.75rem;
    margin-right: 0.75rem;
    color: rgba(255, 255, 255, 0.75);
}

.sidebar .logout-link:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.1));
    color: #fca5a5;
    border-left: 4px solid #ef4444;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    height: 70px;
    background: #ffffff;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    z-index: 999;
}

.navbar-brand {
    font-family: 'Poppins', sans-serif;
    font-size: 1.375rem;
    font-weight: 600;
    color: #1a202c;
    letter-spacing: -0.02em;
}

/* Content Area */
.content {
    margin-left: 260px;
    margin-top: 70px;
    padding: 2rem;
    min-height: calc(100vh - 70px);
}

/* Cards */
.card {
    background: #ffffff;
    border-radius: 12px;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #e5e7eb;
    padding: 1.25rem 1.5rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.125rem;
    color: #1a202c;
}

.card-body {
    padding: 1.5rem;
}

/* Buttons */
.btn {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    letter-spacing: 0.01em;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(15, 118, 110, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #115e59 0%, #0f766e 100%);
    box-shadow: 0 4px 8px rgba(15, 118, 110, 0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #6b7280;
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

.btn-warning {
    background-color: #f59e0b;
    color: #ffffff;
}

.btn-warning:hover {
    background-color: #d97706;
}

.btn-danger {
    background-color: #ef4444;
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #dc2626;
}

/* Tables */
.table {
    font-size: 0.9375rem;
}

.table thead th {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    border-bottom: 2px solid #e5e7eb;
    padding: 1rem 0.75rem;
}

.table tbody td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    color: #374151;
}

.table-hover tbody tr:hover {
    background-color: #f9fafb;
}

/* Forms */
.form-label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.form-control,
.form-select {
    font-family: 'Inter', sans-serif;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

/* Modal */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
    border-bottom: 1px solid #e5e7eb;
    padding: 1.5rem;
}

.modal-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    color: #1a202c;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e5e7eb;
    padding: 1.25rem 1.5rem;
}

/* Login Page Specific Styles */
.login-card {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 420px;
}

.login-card h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.75rem;
    color: #0f766e;
    margin-bottom: 0.5rem;
}

.text-teal {
    color: #0f766e;
}

/* Utility Classes */
.text-muted {
    color: #9ca3af !important;
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }

    .sidebar-header h3,
    .sidebar a span {
        display: none !important;
    }

    .navbar {
        left: 70px;
    }

    .content {
        margin-left: 70px;
    }
}

/* Language Switcher */
.lang-switcher {
    position: fixed;
    top: 1rem;
    right: 2rem;
    z-index: 1100;
}

.lang-toggle {
    background: white;
    border-radius: 50px;
    padding: 0.25rem;
    display: flex;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.lang-option {
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-option.active {
    background: #0f766e;
    color: white;
    box-shadow: 0 2px 4px rgba(15, 118, 110, 0.2);
}

.lang-option:hover:not(.active) {
    background: #f1f5f9;
    color: #334155;
}

/* RTL Support */
body.rtl {
    direction: rtl;
    text-align: right;
}

body.rtl .sidebar {
    left: auto;
    right: 0;
}

body.rtl .content {
    margin-left: 0;
    margin-right: 260px;
}

body.rtl .lang-switcher {
    right: auto;
    left: 2rem;
}

body.rtl .sidebar-header {
    text-align: center;
}

@media (max-width: 768px) {
    body.rtl .content {
        margin-right: 70px;
    }

    body.rtl .sidebar {
        width: 70px;
    }
}

/* Student Card Modern Enhancements */
.group-hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.group-hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.bg-soft-primary {
    background-color: rgba(13, 148, 136, 0.1) !important;
    color: #0f766e !important;
}

.student-card .student-avatar {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.student-card .btn {
    transition: all 0.2s;
}

.student-card .btn:hover {
    transform: scale(1.1);
}