:root {
    --bg-main: #ffffff;
    --bg-card: #ffffff;
    --primary-color: #0d6efd; /* Link blue from Moodle */
    --text-dark: #212529;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --success-bg: #d1e7dd; /* Light green for submission status */
    --success-text: #0f5132;
    --danger-bg: #f8d7da;
    --danger-text: #842029;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #fdfdfd;
    background-image: 
        radial-gradient(at 0% 0%, rgba(210, 235, 255, 0.5) 0px, transparent 60%),
        radial-gradient(at 100% 100%, rgba(210, 235, 255, 0.5) 0px, transparent 60%);
    background-attachment: fixed;
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Split Login Screen Styles */
.split-login {
    display: flex;
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.login-left {
    flex: 1;
    background-color: #0b1121;
    background-image: 
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 8%;
    color: #fff;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.login-left-logo {
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 30px;
    letter-spacing: -1px;
}
.login-left-logo span {
    color: var(--primary-color);
}

.auth-badge {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 30px;
    color: rgba(255,255,255,0.8);
}

.login-left h1 {
    font-family: inherit;
    font-size: 3.5rem;
    line-height: 1.1;
    margin: 0 0 20px 0;
    color: #fff;
}
.login-left h1 span {
    color: #4a8df8;
}

.login-left p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.6);
    max-width: 500px;
    line-height: 1.6;
    margin-bottom: 40px;
}

.login-features {
    display: flex;
    gap: 20px;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    font-weight: 500;
}
.login-features div {
    display: flex;
    align-items: center;
    gap: 8px;
}
.login-features div::before {
    content: "🛡️";
    font-size: 1.1rem;
}

.login-right {
    flex: 1;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.login-form-wrapper {
    width: 100%;
    max-width: 400px;
}

.login-right h2 {
    font-family: inherit;
    font-size: 2rem;
    margin: 0 0 10px 0;
    color: #111827;
}

.login-right p.sub-heading {
    color: #6b7280;
    margin-bottom: 40px;
    font-size: 0.95rem;
}

h1, h2, h3, h4 {
    color: var(--text-dark);
    font-weight: 600;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    background: #ffffff;
    color: var(--text-dark);
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 400;
    color: #e51b24 !important; /* Red from the SIBAU logo */
    text-decoration: none;
    margin-right: 30px;
}

.navbar-links {
    display: flex;
    align-items: center;
    flex: 1;
}

.navbar-links a {
    color: var(--text-dark);
    text-decoration: none;
    margin-right: 20px;
    font-size: 0.95rem;
    transition: 0.2s;
}

.navbar-links a:hover {
    color: var(--primary-color);
}

.container {
    padding: 30px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Cards (like the Moodle topics/files) */
.grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 500;
    display: block;
    border: none;
    padding: 0;
}

.card h3 a {
    color: var(--primary-color);
    text-decoration: none;
}
.card h3 a:hover {
    text-decoration: underline;
}

/* Tables (like Submission status) */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    border: 1px solid var(--border-color);
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    width: 30%;
    color: var(--text-dark);
}

tr:last-child td {
    border-bottom: none;
}

/* Status colors for table rows */
.status-submitted {
    background-color: var(--success-bg) !important;
    color: var(--success-text);
}

/* Standard Input Form */
.input-group {
    width: 100%;
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #374151;
}

.input-group input, .input-group select, .input-group textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #111827;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.input-group input:focus, .input-group select:focus, .input-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.2s;
}

.primary-btn {
    background: #2563eb;
    color: #fff;
    width: 100%;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2), 0 2px 4px -1px rgba(37, 99, 235, 0.1);
}

.primary-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(37, 99, 235, 0.3), 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.secondary-btn {
    background: #e9ecef;
    color: var(--text-dark);
    border-color: #dee2e6;
}

.secondary-btn:hover {
    background: #dde0e3;
}

.footer-links {
    position: absolute;
    bottom: 30px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 40px;
    box-sizing: border-box;
    font-size: 0.75rem;
    color: #9ca3af;
}

.error {
    color: var(--danger-text);
    background: var(--danger-bg);
    padding: 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid #f5c2c7;
}

.file-link {
    color: var(--primary-color);
    text-decoration: none;
}
.file-link:hover {
    text-decoration: underline;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    background: #e9ecef;
    color: var(--text-dark);
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}
