/* Font Awesome CDN for icons */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    padding-top: 0 !important;
    margin-top: 0 !important;
    font-family: 'Poppins', Arial, sans-serif;
    background: #f6f8fb;
    color: #232947;
    line-height: 1.6;
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-wrapper {
    width: 100%;
    max-width: 400px;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #1a73e8;
    font-size: 24px;
    margin-bottom: 8px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #444;
    font-size: 14px;
}

.input-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.input-group input:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26,115,232,0.1);
}

/* Buttons */
.login-button {
    width: 100%;
    padding: 12px;
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.login-button:hover {
    background: #1557b0;
}

/* Alerts */
.alert {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert.error {
    background: #fef2f2;
    color: #dc2626;
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
    width: 100vw;
    background: #f6f8fb;
}

.sidebar {
    width: 230px;
    background: #253053;
    min-height: 100vh;
    color: #fff;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 2;
    box-shadow: 2px 0 8px rgba(37,48,83,0.08);
}

.sidebar .logo {
    font-size: 1.7em;
    font-weight: bold;
    margin: 32px 0 18px 0;
    text-align: center;
    color: #6ec1e4;
}

.sidebar .user-info {
    margin-bottom: 2em;
    text-align: center;
    color: #b3c2e0;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin-bottom: 1.2em;
}

.sidebar ul li a {
    color: #e3eafc;
    text-decoration: none;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 0.7em;
    padding: 0.6em 1.2em;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

.sidebar ul li a.active,
.sidebar ul li a:hover {
    background: #3e497a;
    color: #fff;
}

.content {
    margin-left: 230px;
    padding: 36px 0 36px 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.admin-card, .form-section, .table-section {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(37,48,83,0.08);
    padding: 32px 36px;
    margin-bottom: 32px;
    width: 100%;
    max-width: 900px;
    min-width: 0;
    display: block;
    box-sizing: border-box;
    position: static;
}

.admin-card h2, .form-section h3, .table-section h3 {
    color: #253053;
    margin-top: 0;
    margin-bottom: 18px;
    font-size: 2em;
    text-align: center;
}

.analytics-cards {
    display: flex;
    gap: 28px;
    margin-bottom: 36px;
    justify-content: center;
    flex-wrap: wrap;
}

.analytics-card {
    background: #f8fbff;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(37,48,83,0.06);
    padding: 28px 36px;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.2s;
}

.analytics-card:hover {
    box-shadow: 0 6px 24px rgba(37,48,83,0.13);
}

.analytics-card i {
    font-size: 2.2em;
    margin-bottom: 10px;
}

.analytics-card .count {
    font-size: 2em;
    font-weight: bold;
    color: #3f51b5;
}

.analytics-card .label {
    font-size: 1em;
    color: #555;
}

.primary-btn, button, .login-button {
    background: linear-gradient(90deg, #6ec1e4 0%, #3f51b5 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 28px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(37,48,83,0.08);
}

.primary-btn:hover, button:hover, .login-button:hover {
    background: linear-gradient(90deg, #3f51b5 0%, #6ec1e4 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(37,48,83,0.13);
}

.form-group label {
    color: #253053;
    font-weight: 500;
    margin-bottom: 6px;
    display: block;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dbeafe;
    border-radius: 7px;
    font-size: 1em;
    margin-bottom: 10px;
    background: #f8fbff;
    color: #232947;
    transition: border 0.2s;
}

.form-group input:focus, .form-group select:focus {
    border-color: #6ec1e4;
    outline: none;
}

.alert {
    padding: 14px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 1em;
}

.alert.success {
    background: #e8f5e9;
    color: #388e3c;
}

.alert.error {
    background: #ffebee;
    color: #d32f2f;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 18px;
}

th, td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid #e3eafc;
}

th {
    background: #f1f5fa;
    color: #253053;
    font-weight: 600;
}

tr:last-child td {
    border-bottom: none;
}

@media (max-width: 1100px) {
    .admin-card, .form-section, .table-section {
        max-width: 98vw;
        padding: 18px 6vw;
    }
    .content {
        padding: 18px 0 18px 0;
    }
}

@media (max-width: 700px) {
    .sidebar {
        width: 100vw;
        min-width: 0;
        position: static;
        box-shadow: none;
    }
    .content {
        margin-left: 0;
        padding: 8px 0 8px 0;
    }
    .admin-card, .form-section, .table-section {
        padding: 10px 2vw;
    }
    .analytics-cards {
        gap: 12px;
    }
}

/* Tables */
.table-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    min-width: 900px;
    max-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border-radius: 10px;
    font-size: 0.98rem;
}

th, td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

th {
    background: #3f51b5;
    color: #fff;
    font-weight: 600;
}

tr:last-child td {
    border-bottom: none;
}

/* Responsive forms */
form {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 2em auto;
    background: #fff;
    padding: 24px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(60,72,88,0.06);
}

input, select, button {
    font-family: inherit;
    font-size: 1em;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #bdbdbd;
    width: 100%;
    box-sizing: border-box;
}

button, .login-button {
    background: #3f51b5;
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
    margin-top: 10px;
}

button:hover, .login-button:hover {
    background: #283593;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 1.5em;
}

@media (max-width: 800px) {
    .table-responsive {
        margin-bottom: 1.5em;
    }
    table {
        min-width: 600px;
    }
}

.admin-card, .form-section, .table-section {
    margin-bottom: 2em;
}

.admin-card {
    padding: 40px 30px 30px 30px;
    margin-top: 40px;
    max-width: 600px;
}

.form-section, .table-section {
    padding: 24px 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(60,72,88,0.06);
}

h2, h3 {
    margin-bottom: 1em;
}

th, td {
    white-space: normal;
}

input[type="text"], input[type="password"], input[type="email"], select {
    min-width: 220px;
    max-width: 100%;
    font-size: 1.08em;
    padding: 12px 14px;
}

button, .login-button {
    min-width: 120px;
    font-size: 1.08em;
    padding: 12px 18px;
}

.table-section input[type="text"], .table-section input[type="password"], .table-section select {
    min-width: 180px;
    font-size: 1em;
}

.form-group label {
    font-size: 1.08em;
    margin-bottom: 0.3em;
    display: block;
}

.admin-dashboard {
    max-width: 900px;
    margin: 40px auto;
    padding: 32px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    font-family: 'Poppins', sans-serif;
}

.admin-dashboard h1 {
    text-align: center;
    margin-bottom: 32px;
    color: #2d3a4b;
    font-weight: 600;
}

.center-dashboard {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 80vh;
    margin-top: 32px;
}

.analytics-row {
    display: flex;
    gap: 32px;
    margin-bottom: 32px;
    justify-content: center;
    width: 100%;
    max-width: 700px;
}

.dashboard-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    align-items: flex-start;
    margin-bottom: 32px;
    width: 100%;
    max-width: 700px;
}

.activity-logs {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 20px 28px;
    width: 100%;
    max-width: 700px;
    margin-top: 24px;
}

.dashboard-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    min-height: 120px;
    text-align: center;
    transition: box-shadow 0.2s;
}

.dashboard-card i {
    font-size: 2.2em;
    margin-bottom: 10px;
    color: #232947;
}

.dashboard-card span {
    font-size: 1.1em;
    color: #232947;
}

.quick-access {
    text-align: center;
    margin-top: 24px;
}

.quick-access h2 {
    margin-bottom: 16px;
    color: #3a7afe;
    font-size: 1.2rem;
}

.quick-btn {
    display: inline-block;
    margin: 0 10px;
    padding: 12px 28px;
    background: #3a7afe;
    color: #fff;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}

.quick-btn:hover {
    background: #265ecf;
}

.manage-users-container {
    max-width: 900px;
    margin: 40px auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.user-form-card, .user-table-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 32px;
}

.user-form-card h2 {
    color: #3a7afe;
    margin-bottom: 24px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.add-user-form .form-group {
    margin-bottom: 18px;
}

.add-user-form label {
    display: block;
    margin-bottom: 6px;
    color: #444;
    font-weight: 500;
}

.add-user-form input,
.add-user-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    margin-bottom: 4px;
}

.primary-btn {
    background: #3a7afe;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.primary-btn:hover {
    background: #265ecf;
}

.user-table-card h3 {
    color: #2d3a4b;
    margin-bottom: 18px;
}

.user-table {
    width: 100%;
    min-width: 900px;
    max-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border-radius: 10px;
    font-size: 0.98rem;
}

.user-table th, .user-table td {
    padding: 10px 8px;
    text-align: left;
    white-space: normal;
    max-width: none;
    overflow: visible;
    text-overflow: unset;
    word-break: break-word;
}

.user-table th {
    background: #3578e5;
    color: #fff;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
}

.user-table td {
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.user-table th[data-sort], .user-table th[data-sort] {
    cursor: pointer;
}

.user-table th[data-sort]::after {
    content: '\25B2';
    font-size: 0.7em;
    margin-left: 4px;
    opacity: 0.3;
}

.user-table th[data-sort].desc::after {
    content: '\25BC';
}

.user-table th[data-sort].active {
    opacity: 1;
}

.user-table th[data-sort]:hover {
    text-decoration: underline;
}

.user-table th, .user-table td {
    max-width: none;
    overflow: visible;
    text-overflow: unset;
}

.user-table td:nth-child(2),
.user-table td:nth-child(6),
.user-table td:nth-child(7),
.user-table td:nth-child(8),
.user-table td:last-child, .user-table th:last-child {
    min-width: 180px;
    max-width: 220px;
    white-space: nowrap;
    overflow: visible;
    text-overflow: unset;
}

/* Inline action buttons */
.user-table td .primary-btn {
    margin: 0 4px 0 0;
    display: inline-block;
    min-width: 0;
    padding: 6px 12px;
    font-size: 0.95em;
}

.user-table td form {
    display: inline;
}

/* Card and wrapper spacing */
.enroll-student-wrapper {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    justify-content: center;
    border: 2px solid blue !important;
}

.enroll-form-card {
    flex: 1 1 340px;
    min-width: 320px;
    max-width: 420px;
}

.students-table-card {
    flex: 3 1 0;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
}

.students-table-card table {
    width: 100%;
    min-width: unset;
}

/* Responsive: stack on small screens */
@media (max-width: 1200px) {
    .enroll-student-wrapper {
        flex-direction: column;
        gap: 24px;
        min-height: unset;
    }
    .enroll-form-card, .students-table-card {
        max-width: 100%;
        min-width: 0;
        width: 100%;
    }
    .content {
        padding: 24px 8px 8px 8px;
    }
}

/* Table scroll on overflow */
.students-table-card {
    overflow-x: auto;
}

.primary-btn i {
    margin-right: 6px;
}

.toast {
    position: fixed;
    top: 32px;
    right: 32px;
    background: #323232;
    color: #fff;
    padding: 16px 28px;
    border-radius: 8px;
    font-size: 1rem;
    z-index: 2000;
    opacity: 0.95;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    display: none;
    align-items: center;
    gap: 10px;
}

.toast.success { background: #2ecc40; }
.toast.error { background: #e74c3c; }
.toast.show { display: flex; animation: fadeInOut 3s forwards; }

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-20px); }
    10% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-20px); }
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3a7afe;
    border-radius: 50%;
    width: 28px;
    width: 32px;
    height: 32px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.action-icons {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: flex-start;
}

.icon-btn {
    background: #3578e5;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.18s, box-shadow 0.18s, transform 0.18s;
    box-shadow: 0 2px 8px rgba(53,120,229,0.08);
}

.icon-btn:hover, .icon-btn:focus {
    background: #265ecf;
    color: #fff;
    box-shadow: 0 4px 16px rgba(53,120,229,0.18);
    transform: scale(1.08);
}

.user-table th, .user-table td {
    vertical-align: middle;
    padding: 14px 10px;
}

.td-lrn {
    min-width: 90px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.td-name {
    min-width: 120px;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.td-remarks {
    min-width: 80px;
    max-width: 200px;
    white-space: normal;
    word-break: break-word;
}

.user-table td:last-child, .user-table th:last-child {
    min-width: 220px;
    max-width: 260px;
    width: 240px;
    white-space: nowrap;
    overflow: visible;
    text-overflow: unset;
}

.modal-close {
    position: absolute;
    right: 24px;
    top: 18px;
    font-size: 1.5em;
    color: #888;
    cursor: pointer;
    z-index: 1100;
    pointer-events: auto;
}

.modal {
    z-index: 1000;
}

@media (max-width: 700px) {
    .user-table, .user-table thead, .user-table tbody, .user-table th, .user-table td, .user-table tr {
        display: block;
    }
    .user-table thead tr { display: none; }
    .user-table td {
        position: relative;
        padding-left: 50%;
        min-height: 38px;
        border-bottom: 1px solid #f0f0f0;
    }
    .user-table td:before {
        position: absolute;
        left: 10px;
        top: 10px;
        width: 45%;
        white-space: nowrap;
        font-weight: bold;
        color: #3578e5;
        content: attr(data-label);
    }
    .dashboard-grid {
        max-width: 100%;
        gap: 12px;
    }
    .dashboard-card {
        padding: 18px 10px;
        min-width: 100px;
        min-height: 90px;
    }
}

@media print {
    body, html {
        background: #fff !important;
        color: #000 !important;
    }
    .sidebar,
    .dashboard .sidebar,
    nav,
    .user-info,
    .logo {
        display: none !important;
    }
    .dashboard,
    .content {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        min-width: 0 !important;
        min-height: 0 !important;
        background: #fff !important;
        box-shadow: none !important;
    }
    .admin-card {
        box-shadow: none !important;
        border-radius: 0 !important;
        background: #fff !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    * {
        box-shadow: none !important;
        background: none !important;
    }
}

@media (max-width: 900px) {
    .analytics-row {
        flex-direction: column;
        gap: 16px;
        max-width: 100%;
        align-items: center;
    }
    .dashboard-grid {
        max-width: 100%;
        gap: 12px;
    }
    .activity-logs {
        max-width: 100%;
        padding: 12px 6px;
    }
}

.users-center-container {
    max-width: 900px;
    margin: 32px auto 0 auto;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.user-form-card, .user-table-card {
    width: 100%;
    max-width: 700px;
    margin-bottom: 32px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 24px 32px;
}

.user-table-card {
    padding: 18px 24px;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.user-table th, .user-table td {
    padding: 10px 8px;
    text-align: left;
    font-size: 1em;
}

.user-table th {
    background: #2563eb;
    color: #fff;
    font-weight: 600;
}

.user-table tr {
    background: #f9fafd;
}

.user-table tr:nth-child(even) {
    background: #f1f5fa;
}

@media (max-width: 900px) {
    .users-center-container, .user-form-card, .user-table-card {
        max-width: 100%;
        padding: 10px 4px;
    }
    .user-table th, .user-table td {
        font-size: 0.95em;
        padding: 7px 4px;
    }
}

.align-left {
    align-items: flex-start !important;
}

.danger-btn {
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 0.95em;
    cursor: pointer;
    margin-left: 4px;
    transition: background 0.2s;
}
.danger-btn:hover {
    background: #b52a37;
}

.user-table th, .user-table td {
    padding: 8px 6px;
    text-align: left;
    font-size: 0.98em;
}
.user-table th {
    background: #2563eb;
    color: #fff;
    font-weight: 600;
    border-bottom: 2px solid #1d4ed8;
}
.user-table tr {
    background: #f9fafd;
    border-bottom: 1px solid #e5e7eb;
}
.user-table tr:nth-child(even) {
    background: #f1f5fa;
}
.user-table td form {
    margin: 0 2px 0 0;
    display: inline-block;
}
.user-table input[type="password"] {
    padding: 4px 6px;
    font-size: 0.95em;
    border-radius: 3px;
    border: 1px solid #d1d5db;
    margin-right: 2px;
}
.user-table .primary-btn {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 0.95em;
    cursor: pointer;
    margin-left: 2px;
    transition: background 0.2s;
}
.user-table .primary-btn:hover {
    background: #1d4ed8;
} 