/* ============================================
   Graduation Project Management System
   Custom Styles
   ============================================ */

/* ─── General ─── */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
}

/* ─── Upload Zone ─── */
.upload-zone {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    transition: all 0.3s;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-zone:hover {
    border-color: #0d6efd;
    background: rgba(13, 110, 253, 0.03);
}

.card.border-success .upload-zone {
    border-color: #198754;
    background: rgba(25, 135, 84, 0.03);
}

/* ─── Image Thumbnails ─── */
.student-image {
    transition: transform 0.2s;
}

.student-image:hover {
    transform: scale(1.05);
}

/* ─── Cards ─── */
.card {
    border-radius: 12px;
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
}

/* ─── Demo Mode ─── */
.demo-timer-banner {
    background: linear-gradient(90deg, #0d6efd, #6610f2);
    color: #fff;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    z-index: 1050;
}

.demo-timer-banner.demo-timer-urgent {
    background: linear-gradient(90deg, #dc3545, #fd7e14);
    animation: demo-pulse 1s ease-in-out infinite;
}

@keyframes demo-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.demo-credentials-box {
    background: var(--bs-tertiary-bg, #f8f9fa);
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
}

/* ─── Stats Cards ─── */
.card.border-warning,
.card.border-success,
.card.border-danger {
    border-width: 2px;
}

/* ─── Navbar ─── */
.navbar-brand {
    font-size: 1.1rem;
}

.navbar-profile-pic {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

/* ─── Profile Picture ─── */
.profile-picture-lg {
    width: 100px;
    height: 100px;
    object-fit: cover;
    flex-shrink: 0;
}

.profile-picture-sm {
    width: 36px;
    height: 36px;
    object-fit: cover;
    flex-shrink: 0;
}

.profile-picture-md {
    width: 48px;
    height: 48px;
    object-fit: cover;
    flex-shrink: 0;
}

/* ─── Table ─── */
.table th {
    font-weight: 600;
    white-space: nowrap;
}

/* ─── Toast ─── */
.toast {
    border-radius: 8px;
}

/* ─── Progress Bar ─── */
.progress {
    border-radius: 10px;
    overflow: hidden;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .card-body .row .col-md-3,
    .card-body .row .col-md-4 {
        margin-bottom: 0.5rem;
    }
}

/* ─── Login/Register Card ─── */
.card.shadow {
    border: none;
}

/* ─── Form ─── */
.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* ─── Badge on project status ─── */
.badge {
    font-weight: 500;
}

/* ─── Empty state ─── */
.text-muted .bi-inbox {
    opacity: 0.5;
}

/* ─── Smooth transitions ─── */
.card, .btn, .badge {
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important;
}

/* ─── Theme Toggle Button ─── */
#themeToggle {
    text-decoration: none;
    padding: 0.5rem;
}

#themeToggle:focus {
    box-shadow: none;
}

/* ─── Dark Mode Overrides ─── */
[data-bs-theme="dark"] .upload-zone {
    border-color: #495057;
}

[data-bs-theme="dark"] .upload-zone:hover {
    border-color: #6ea8fe;
    background: rgba(110, 168, 254, 0.05);
}

[data-bs-theme="dark"] .card.border-success .upload-zone {
    border-color: #75b798;
    background: rgba(117, 183, 152, 0.05);
}

[data-bs-theme="dark"] .card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3) !important;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    border-color: #6ea8fe;
    box-shadow: 0 0 0 0.2rem rgba(110, 168, 254, 0.2);
}

[data-bs-theme="dark"] .table-dark {
    --bs-table-bg: #1a1d20;
}

[data-bs-theme="dark"] .navbar {
    --bs-navbar-bg: #1a3a5c;
}

[data-bs-theme="dark"] .card.shadow,
[data-bs-theme="dark"] .card.shadow-sm {
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.3) !important;
}

[data-bs-theme="dark"] .bg-light {
    background-color: var(--bs-body-bg) !important;
}

/* ─── Simple Rich Text Editor ─── */
.simple-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 6px 8px;
    background: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
}

.simple-editor-toolbar .btn {
    padding: 4px 8px;
    font-size: 0.85rem;
    line-height: 1;
    border: none;
    background: transparent;
    color: var(--bs-body-color);
    border-radius: 4px;
}

.simple-editor-toolbar .btn:hover {
    background: var(--bs-primary-bg-subtle);
    transform: none;
}

.simple-editor-toolbar .btn.active {
    background: var(--bs-primary);
    color: #fff;
}

.simple-editor-content {
    border: 1px solid var(--bs-border-color);
    border-radius: 0 0 8px 8px;
    padding: 12px 16px;
    min-height: 150px;
    overflow-y: auto;
    outline: none;
    font-size: 0.95rem;
    line-height: 1.6;
    background: var(--bs-body-bg);
    resize: vertical;
}

.simple-editor-content:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.simple-editor-content:empty::before {
    content: attr(data-placeholder);
    color: var(--bs-secondary-color);
    pointer-events: none;
}

.simple-editor-content ul,
.simple-editor-content ol {
    padding-inline-start: 1.5rem;
    margin-bottom: 0.5rem;
}

.simple-editor-content a {
    color: var(--bs-link-color);
    text-decoration: underline;
}

.simple-editor-content img,
.project-description img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 8px 0;
    cursor: default;
}

.simple-editor-content img {
    cursor: pointer;
}

.simple-editor-content img.img-resizing {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

.img-resize-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--bs-primary);
    border: 1px solid #fff;
    border-radius: 2px;
    cursor: nwse-resize;
    z-index: 10;
}

.img-resize-wrapper {
    position: relative;
    display: inline-block;
}

.simple-editor-content .upload-placeholder {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bs-secondary-bg);
    border-radius: 4px;
    color: var(--bs-secondary-color);
    font-size: 0.85rem;
}

/* Description display */
.project-description {
    line-height: 1.7;
    word-wrap: break-word;
}

.project-description ul,
.project-description ol {
    padding-inline-start: 1.5rem;
}

.project-description a {
    color: var(--bs-link-color);
    text-decoration: underline;
}

[data-bs-theme="dark"] .simple-editor-content:focus {
    border-color: #6ea8fe;
    box-shadow: 0 0 0 0.2rem rgba(110, 168, 254, 0.2);
}

/* ─── Landing / Login Page ─── */
.landing-page {
    overflow-x: hidden;
}

.landing-hero {
    background: linear-gradient(135deg, #0d47a1 0%, #1565c0 30%, #1976d2 60%, #1e88e5 100%);
    color: #fff;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 3rem;
    position: relative;
    overflow: hidden;
    overflow-y: auto;
}

.landing-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
}

.landing-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
}

.landing-hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.landing-brand i {
    font-size: 3.5rem;
    background: rgba(255, 255, 255, 0.15);
    width: 80px;
    height: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
}

.landing-title {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.3;
}

.landing-subtitle {
    font-size: 1.15rem;
    opacity: 0.9;
    line-height: 1.7;
}

.landing-feature-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 1.25rem;
    height: 100%;
    transition: transform 0.2s, background 0.2s;
}

.landing-feature-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.15);
}

.landing-feature-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.landing-feature-card h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.landing-feature-card p {
    font-size: 0.85rem;
    opacity: 0.85;
    margin-bottom: 0;
    line-height: 1.5;
}

.landing-form-side {
    background: var(--bs-body-bg);
    padding: 2rem;
    overflow-y: auto;
}

.landing-form-wrapper {
    width: 100%;
    max-width: 420px;
}

.landing-card {
    border: none;
    border-radius: 16px !important;
}

.landing-card .card-body {
    padding: 2rem !important;
}

.landing-card .input-group-text {
    background: transparent;
    border-right: none;
}

[dir="rtl"] .landing-card .input-group-text {
    border-right: 1px solid var(--bs-border-color);
    border-left: none;
}

.landing-card .input-group .form-control {
    border-left: none;
}

[dir="rtl"] .landing-card .input-group .form-control {
    border-left: 1px solid var(--bs-border-color);
    border-right: none;
}

/* Landing — How It Works Steps */
.landing-steps {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
}

.landing-steps-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.landing-step {
    text-align: center;
    flex: 1;
    min-width: 100px;
}

.landing-step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.landing-step h6 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.landing-step small {
    font-size: 0.75rem;
    opacity: 0.8;
    line-height: 1.4;
    display: block;
}

.landing-step-arrow {
    display: flex;
    align-items: center;
    padding-top: 0.5rem;
    opacity: 0.5;
    font-size: 1rem;
}

/* Landing — Quick Stats */
.landing-stats {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.landing-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.landing-stat i {
    font-size: 1rem;
    opacity: 0.9;
}

/* Landing — Mobile Feature Tags */
.landing-mobile-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.landing-mobile-feature {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--bs-tertiary-bg, #f8f9fa);
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 50px;
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 500;
}

.landing-mobile-feature i {
    font-size: 0.85rem;
}

/* Dark mode landing adjustments */
[data-bs-theme="dark"] .landing-hero {
    background: linear-gradient(135deg, #0a1628 0%, #0d2137 30%, #102a4a 60%, #143560 100%);
}

[data-bs-theme="dark"] .landing-feature-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .landing-feature-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .landing-form-side {
    background: var(--bs-body-bg);
}

[data-bs-theme="dark"] .landing-steps {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .landing-mobile-feature {
    background: var(--bs-tertiary-bg);
    border-color: var(--bs-border-color);
}

@media (max-width: 991.98px) {
    .landing-form-side {
        min-height: 100vh;
        padding: 1.5rem;
    }

    .landing-form-wrapper {
        max-width: 400px;
    }
}

@media (max-width: 1199.98px) {
    .landing-step-arrow {
        display: none;
    }

    .landing-steps-row {
        gap: 1rem;
    }

    .landing-step {
        min-width: 120px;
    }
}
