@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-focus: rgba(37, 99, 235, 0.25);
    
    --secondary: #0f172a;
    --secondary-light: #1e293b;
    
    --text-title: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;
    
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --bg-subtle: #f1f5f9;
    
    --border-color: #e2e8f0;
    --border-focus: #93c5fd;
    
    --accent: #0ea5e9;
    --success: #10b981;
    --success-bg: #ecfdf5;
    --success-border: #a7f3d0;
    
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --danger-border: #fecaca;

    --warning: #f59e0b;
    --warning-bg: #fffbeb;

    --whatsapp: #25d366;
    --linkedin: #0a66c2;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 12px 24px -4px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
    
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    box-sizing: border-box;
    overflow-x: hidden;
    width: 100%;
}

*, *:before, *:after {
    margin: 0;
    padding: 0;
    box-sizing: inherit;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* =========================================
   LOGIN SCREEN
   ========================================= */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
    background: radial-gradient(circle at 10% 20%, #eff6ff 0%, #f8fafc 90%);
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #2563eb, #0ea5e9);
}

.brand-icon-wrapper {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 8px 16px -4px rgba(37, 99, 235, 0.35);
}

.brand-icon-wrapper svg {
    width: 32px;
    height: 32px;
}

.login-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-title);
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
}

.login-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.75rem;
}

/* =========================================
   FORMS & INPUTS
   ========================================= */
.form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

.form-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-title);
    margin-bottom: 0.45rem;
}

.label-optional {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
    background: var(--bg-subtle);
    padding: 2px 6px;
    border-radius: 4px;
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-wrapper svg.input-icon {
    position: absolute;
    left: 12px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition);
}

.input-icon-wrapper input,
.input-icon-wrapper select,
.input-icon-wrapper textarea {
    padding-left: 2.5rem;
}

.form-input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    font-size: 0.92rem;
    font-family: inherit;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: #fff;
    color: var(--text-title);
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-focus);
}

.form-input::placeholder {
    color: #94a3b8;
}

.input-icon-wrapper:focus-within svg.input-icon {
    color: var(--primary);
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #1d4ed8);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-block {
    width: 100%;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-title);
}

.btn-outline:hover {
    background: var(--bg-subtle);
    border-color: #cbd5e1;
}

.btn-sm {
    padding: 0.45rem 0.8rem;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
}

.btn-danger-outline {
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger-border);
}

.btn-danger-outline:hover {
    background: var(--danger-bg);
}

/* =========================================
   ALERTS / NOTIFICATIONS
   ========================================= */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    margin-bottom: 1.25rem;
    text-align: left;
}

.alert svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-danger {
    background-color: var(--danger-bg);
    border: 1px solid var(--danger-border);
    color: #991b1b;
}

.alert-success {
    background-color: var(--success-bg);
    border: 1px solid var(--success-border);
    color: #065f46;
}

/* =========================================
   HEADER / NAVBAR
   ========================================= */
.navbar {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-link {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.brand-link:hover .brand-text h1 {
    color: var(--primary);
}

.nav-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.brand-icon-mini {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.brand-icon-mini svg {
    width: 22px;
    height: 22px;
}

.brand-text h1 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-title);
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.brand-text span {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: block;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    background: var(--bg-subtle);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success);
}

/* =========================================
   HERO BANNER
   ========================================= */
.hero-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    padding: 2.25rem 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-content {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.hero-header-left {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.breadcrumb-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: #94a3b8;
    margin-bottom: 0.25rem;
}

.breadcrumb-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #38bdf8;
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb-link:hover {
    color: #bae6fd;
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #64748b;
}

.breadcrumb-current {
    color: #e2e8f0;
    font-weight: 500;
}

.btn-header-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.75rem 1.15rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius-md);
    color: #ffffff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-header-back:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.hero-title {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
}

.hero-subtitle {
    color: #94a3b8;
    font-size: 0.95rem;
    max-width: 650px;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.stat-item {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 0.8rem 1.25rem;
    text-align: center;
    min-width: 120px;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #38bdf8;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* =========================================
   MAIN APP LAYOUT (2 COLUMNS)
   ========================================= */
.main-wrapper {
    max-width: 1240px;
    margin: 0 auto 3rem;
    padding: 0 1.5rem;
}

.grid-two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
    align-items: start;
}

@media (max-width: 960px) {
    .grid-two-columns {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   DASHBOARD HUB (HOME.PHP)
   ========================================= */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
    align-items: stretch;
}

@media (max-width: 1040px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.dashboard-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #0ea5e9);
    opacity: 0.95;
    transition: var(--transition);
}

.dashboard-card.card-curso::before {
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
}

.dashboard-card.card-materiais::before {
    background: linear-gradient(90deg, #0ea5e9, #10b981);
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: #cbd5e1;
}

.dashboard-card:hover::before {
    height: 6px;
}

.dashboard-card-inner {
    padding: 2.25rem 2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.dashboard-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.dashboard-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: var(--shadow-md);
}

.dashboard-card-icon.icon-students {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
}

.dashboard-card-icon.icon-curso {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.dashboard-card-icon.icon-materials {
    background: linear-gradient(135deg, #0284c7, #10b981);
}

.dashboard-card-icon svg {
    width: 30px;
    height: 30px;
}

.dashboard-stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.85rem;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.dashboard-stat-badge.badge-curso {
    background: #eef2ff;
    color: #4338ca;
}

.dashboard-stat-badge.badge-accent {
    background: #ecfdf5;
    color: #059669;
}

.badge-dot-curso {
    background-color: #6366f1;
}

.badge-dot-accent {
    background-color: #10b981;
}

.dashboard-card-body {
    flex: 1;
    margin-bottom: 2rem;
}

.dashboard-card-title {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--text-title);
    margin-bottom: 0.65rem;
    letter-spacing: -0.02em;
}

.dashboard-card-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 1.5rem;
}

.dashboard-card-features {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding-top: 1.25rem;
    border-top: 1px dashed var(--border-color);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.88rem;
    color: var(--text-body);
}

.feature-item svg {
    width: 17px;
    height: 17px;
    color: var(--success);
    flex-shrink: 0;
}

.dashboard-card-footer {
    margin-top: auto;
}

.dashboard-btn {
    font-size: 1rem;
    padding: 0.9rem 1.5rem;
    font-weight: 600;
}

.btn-curso-gradient {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
}

.btn-curso-gradient:hover {
    background: linear-gradient(135deg, #4338ca, #4f46e5);
    box-shadow: 0 6px 14px rgba(79, 70, 229, 0.35);
}

.btn-accent-gradient {
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.25);
}

.btn-accent-gradient:hover {
    background: linear-gradient(135deg, #0369a1, #0284c7);
    box-shadow: 0 6px 14px rgba(14, 165, 233, 0.35);
}

.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 1.75rem;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #ffffff;
}

.card-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-header-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-header-icon svg {
    width: 20px;
    height: 20px;
}

.card-title-group h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-title);
    letter-spacing: -0.01em;
}

.card-title-group p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.badge-count {
    background-color: var(--primary-light);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
}

.card-body {
    padding: 1.5rem;
}

/* =========================================
   STUDENTS SECTION
   ========================================= */
.students-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.student-item {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    transition: var(--transition);
}

.student-item:hover {
    border-color: #cbd5e1;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.student-info {
    display: flex;
    align-items: flex-start;
    gap: 0.95rem;
    flex: 1;
    min-width: 0;
}

.student-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #0284c7);
    color: #ffffff;
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.student-details {
    min-width: 0;
    flex: 1;
}

.student-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-title);
    margin-bottom: 0.35rem;
    word-break: break-word;
}

.student-meta-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.84rem;
}

.student-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    color: var(--text-body);
    word-break: break-all;
    line-height: 1.4;
}

.student-meta-row svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.student-meta-label {
    font-weight: 600;
    color: var(--text-title);
    font-size: 0.8rem;
}

.student-meta-link {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

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

.student-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.social-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: #ffffff;
    text-decoration: none;
    transition: var(--transition);
}

.social-badge svg {
    width: 17px;
    height: 17px;
}

.social-whatsapp {
    background-color: var(--whatsapp);
}
.social-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(37, 211, 102, 0.3);
}

.social-linkedin {
    background-color: var(--linkedin);
}
.social-linkedin:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(10, 102, 194, 0.3);
}

.btn-icon-del {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-del:hover {
    color: var(--danger);
    background: var(--danger-bg);
}

.btn-icon-del svg {
    width: 16px;
    height: 16px;
}

/* =========================================
   FILE UPLOAD & MATERIALS LIST
   ========================================= */
.upload-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-md);
    padding: 1.75rem 1.25rem;
    text-align: center;
    background-color: #fafbfc;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 1.25rem;
    position: relative;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

.upload-dropzone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.dropzone-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 0.75rem;
    color: var(--primary);
    background: #e0f2fe;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropzone-icon svg {
    width: 24px;
    height: 24px;
}

.dropzone-text {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-title);
    margin-bottom: 0.2rem;
}

.dropzone-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.file-selected-name {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    display: none;
}

/* Materials List */
.materials-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.material-item {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.95rem 1.15rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.85rem;
    transition: var(--transition);
}

.material-item:hover {
    border-color: #cbd5e1;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.material-info {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex: 1;
    min-width: 0;
}

.file-badge-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* File badge color themes */
.badge-sql { background: #e0f2fe; color: #0284c7; }
.badge-pdf { background: #fee2e2; color: #dc2626; }
.badge-zip { background: #fef3c7; color: #d97706; }
.badge-code { background: #ede9fe; color: #7c3aed; }
.badge-doc { background: #e0e7ff; color: #4f46e5; }
.badge-image { background: #dcfce7; color: #16a34a; }
.badge-default { background: #e2e8f0; color: #475569; }

.material-details {
    min-width: 0;
}

.material-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-title);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.15rem;
}

.material-meta {
    font-size: 0.76rem;
    color: var(--text-muted);
    display: flex;
    gap: 0.75rem;
}

.material-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn-download {
    background-color: var(--primary-light);
    color: var(--primary);
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: var(--transition);
}

.btn-download:hover {
    background-color: var(--primary);
    color: #ffffff;
}

.btn-download svg {
    width: 15px;
    height: 15px;
}

/* =========================================
   EMPTY STATE
   ========================================= */
.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-muted);
}

.empty-state-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.75rem;
    color: #cbd5e1;
}

.empty-state h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-title);
    margin-bottom: 0.25rem;
}

.empty-state p {
    font-size: 0.82rem;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
    text-align: center;
    padding: 1.5rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    background-color: #ffffff;
}

/* =========================================
   RESPONSIVIDADE & AJUSTES MOBILE / TABLET
   ========================================= */
@media (max-width: 768px) {
    /* Navbar no Celular */
    .nav-container {
        padding: 0.65rem 1rem;
        gap: 0.65rem;
    }

    .brand-wrapper {
        gap: 0.6rem;
        min-width: 0;
        flex: 1;
    }

    .brand-icon-mini {
        width: 36px;
        height: 36px;
        min-width: 36px;
        border-radius: 8px;
    }

    .brand-icon-mini svg {
        width: 18px;
        height: 18px;
    }

    .brand-text {
        min-width: 0;
    }

    .brand-text h1 {
        font-size: 0.96rem;
        letter-spacing: -0.01em;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .brand-text span {
        font-size: 0.7rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-actions {
        gap: 0.5rem;
        flex-shrink: 0;
    }

    /* Oculta badge 'Conectado' no celular para não comprimir o título */
    .user-badge {
        display: none;
    }

    .nav-actions .btn-sm {
        padding: 0.35rem 0.65rem;
        font-size: 0.8rem;
    }

    /* Hero Banner no Celular */
    .hero-banner {
        padding: 1.5rem 1rem;
        margin-bottom: 1.25rem;
    }

    .hero-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem;
    }

    .hero-title {
        font-size: 1.35rem;
        line-height: 1.25;
    }

    .hero-subtitle {
        font-size: 0.86rem;
        line-height: 1.4;
    }

    .hero-stats {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 0.75rem;
    }

    .stat-item {
        min-width: 0;
        padding: 0.75rem 0.5rem;
    }

    .stat-number {
        font-size: 1.35rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    /* Layout & Cards no Celular */
    .dashboard-card-inner {
        padding: 1.5rem 1.25rem;
    }

    .dashboard-card-icon {
        width: 48px;
        height: 48px;
        border-radius: 12px;
    }

    .dashboard-card-icon svg {
        width: 24px;
        height: 24px;
    }

    .dashboard-card-title {
        font-size: 1.3rem;
    }

    .dashboard-card-desc {
        font-size: 0.88rem;
        margin-bottom: 1rem;
    }

    .dashboard-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.92rem;
    }

    .btn-header-back {
        height: 100%;
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        text-align: center;
    }

    .main-wrapper {
        padding: 0 0.85rem;
        margin-bottom: 2rem;
    }

    .content-card {
        border-radius: var(--radius-md);
        margin-bottom: 1.25rem;
    }

    .card-header {
        padding: 0.85rem 1rem;
    }

    .card-header-icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    .card-header-icon svg {
        width: 18px;
        height: 18px;
    }

    .card-title-group h2 {
        font-size: 0.95rem;
    }

    .card-body {
        padding: 1rem;
    }

    /* Card de Alunos no Celular - Evita Qualquer Encavalamento */
    .student-item {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        gap: 0.85rem;
    }

    .student-info {
        width: 100%;
        min-width: 0;
        gap: 0.75rem;
    }

    .student-avatar {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 0.95rem;
    }

    .student-details {
        min-width: 0;
        flex: 1;
        width: calc(100% - 50px);
    }

    .student-name {
        font-size: 0.98rem;
        margin-bottom: 0.25rem;
    }

    .student-meta-list {
        width: 100%;
        min-width: 0;
        gap: 0.35rem;
    }

    .student-meta-row {
        width: 100%;
        min-width: 0;
        font-size: 0.82rem;
        gap: 0.4rem;
        word-break: break-all;
        overflow-wrap: anywhere;
    }

    .student-meta-link {
        word-break: break-all;
        overflow-wrap: anywhere;
        max-width: 100%;
    }

    .student-links {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 0.65rem;
        padding-top: 0.65rem;
        border-top: 1px dashed var(--border-color);
    }

    .student-links form {
        margin-left: auto;
    }

    /* Card de Materiais no Celular */
    .material-item {
        flex-direction: column;
        align-items: stretch;
        padding: 0.9rem;
        gap: 0.75rem;
    }

    .material-info {
        width: 100%;
        min-width: 0;
        gap: 0.75rem;
    }

    .file-badge-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 0.68rem;
    }

    .material-details {
        min-width: 0;
        flex: 1;
    }

    .material-title {
        white-space: normal;
        word-break: break-word;
        font-size: 0.88rem;
        line-height: 1.35;
    }

    .material-actions {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-top: 0.65rem;
        border-top: 1px dashed var(--border-color);
        gap: 0.5rem;
    }

    .btn-download {
        flex: 1;
        justify-content: center;
    }

    /* Formulários no Celular */
    .form-input {
        font-size: 16px; /* Evita zoom automático indesejado no mobile */
        padding: 0.65rem 0.85rem;
    }

    .input-icon-wrapper input {
        padding-left: 2.3rem;
    }

    .input-icon-wrapper svg.input-icon {
        left: 10px;
        width: 16px;
        height: 16px;
    }

    .upload-dropzone {
        padding: 1.25rem 0.85rem;
    }

    .dropzone-icon {
        width: 38px;
        height: 38px;
        margin-bottom: 0.5rem;
    }

    .dropzone-icon svg {
        width: 20px;
        height: 20px;
    }

    .dropzone-text {
        font-size: 0.85rem;
    }

    .dropzone-sub {
        font-size: 0.72rem;
    }

    /* Tela de Login no Celular */
    .login-body {
        padding: 1rem;
    }

    .login-card {
        padding: 2rem 1.25rem;
        border-radius: var(--radius-md);
    }

    .login-title {
        font-size: 1.25rem;
    }
}

