/* 
   PhD Scholars Portal - Professional Light Theme
   Color Palette: Slate/Light theme with Royal Blue and Teal accents
*/

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

:root {
    --bg-main: #f1f5f9; /* Light slate gray */
    --bg-card: #ffffff; /* Clean white card */
    --bg-card-hover: #f8fafc; /* Subtle gray hover */
    --bg-header: rgba(255, 255, 255, 0.85); /* Sticky white header with blur */
    --border-color: #e2e8f0; /* Light slate border */
    
    --primary: #2563eb; /* Royal Blue */
    --primary-hover: #1d4ed8;
    --primary-glow: rgba(37, 99, 235, 0.15);
    
    --accent: #0f766e; /* Teal */
    --accent-hover: #0d9488;
    
    --text-primary: #0f172a; /* Slate 900 */
    --text-secondary: #475569; /* Slate 600 */
    --text-muted: #64748b; /* Slate 500 */
    
    --status-completed: #10b981; /* Emerald */
    --status-active: #f59e0b; /* Amber */
    --status-pending: #cbd5e1; /* Slate 300 */
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 600;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

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

/* Professional Card Box Shadow & Glass Effect */
.glass {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03), 0 10px 15px -3px rgba(0, 0, 0, 0.03);
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Header & Navigation */
header {
    background: var(--bg-header);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--text-primary);
}

.logo svg {
    stroke: var(--primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: auto;
    margin-left: 2.5rem;
}

.header-nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    text-decoration: none;
}

.header-nav-link svg {
    stroke: var(--text-muted);
    transition: var(--transition);
}

.header-nav-link:hover {
    color: var(--primary);
    background-color: rgba(37, 99, 235, 0.05);
}

.header-nav-link:hover svg {
    stroke: var(--primary);
}

.header-nav-link.active {
    color: var(--primary);
    background-color: rgba(37, 99, 235, 0.08);
    font-weight: 600;
}

.header-nav-link.active svg {
    stroke: var(--primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: var(--font-body);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 2px 4px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: #ffffff;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.btn-danger {
    background-color: #ef4444;
    color: white;
}

.btn-danger:hover {
    transform: translateY(-1px);
    background-color: #dc2626;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2);
}

.btn-success {
    background-color: var(--status-completed);
    color: white;
}

.btn-success:hover {
    transform: translateY(-1px);
    background-color: #059669;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.925rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2rem;
}

/* Dashboard Statistics Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.stat-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    font-size: 1.25rem;
}

.stat-icon.primary {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
}

.stat-icon.accent {
    background: rgba(15, 118, 110, 0.08);
    color: var(--accent);
}

.stat-icon.completed {
    background: rgba(16, 185, 129, 0.08);
    color: var(--status-completed);
}

.stat-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
}

/* Sidebar Dashboard Layout */
.dashboard-layout {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

.sidebar {
    width: 250px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.925rem;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.sidebar-link:hover, .sidebar-link.active {
    color: var(--primary);
    background-color: var(--bg-card);
}

.sidebar-link.active {
    border-left-color: var(--primary);
    background-color: #ffffff;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.main-content {
    flex-grow: 1;
    min-width: 0;
}

/* Modern Data Table Card */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

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

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

table.data-table th, table.data-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

table.data-table th {
    font-family: var(--font-heading);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: var(--bg-card-hover);
}

table.data-table tbody tr {
    transition: var(--transition);
}

table.data-table tbody tr:hover {
    background-color: var(--bg-card-hover);
}

table.data-table td {
    font-size: 0.9rem;
    color: var(--text-primary);
}

table.data-table td .muted {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.725rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.badge-registration {
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
}

.badge-coursework {
    background: rgba(14, 165, 233, 0.08);
    color: #0369a1;
}

.badge-dc {
    background: rgba(217, 119, 6, 0.08);
    color: #b45309;
}

.badge-report {
    background: rgba(16, 185, 129, 0.08);
    color: #047857;
}

.badge-continuation {
    background: rgba(79, 70, 229, 0.08);
    color: #4f46e5;
}

.badge-synopsis {
    background: rgba(13, 148, 136, 0.08);
    color: #0f766e;
}

.badge-thesis {
    background: rgba(147, 51, 234, 0.08);
    color: #7e22ce;
}

.badge-viva {
    background: rgba(225, 29, 72, 0.08);
    color: #be123c;
}


/* Profile Details Grid */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
}

.profile-meta-card {
    height: fit-content;
}

.meta-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.meta-item:last-child {
    border-bottom: none;
}

.meta-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.meta-value {
    font-weight: 500;
    margin-top: 0.1rem;
    font-size: 0.925rem;
}

/* Light Theme Timeline Components */
.timeline {
    position: relative;
    padding-left: 2.25rem;
    margin: 1.5rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 8px;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-badge {
    position: absolute;
    left: -2.25rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 2px solid var(--status-pending);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.timeline-item.completed .timeline-badge {
    border-color: var(--status-completed);
    background-color: var(--status-completed);
}

.timeline-item.active .timeline-badge {
    border-color: var(--status-active);
    background-color: #ffffff;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
    animation: pulseGlowLight 2s infinite alternate;
}

.timeline-content {
    background-color: var(--bg-card-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.15rem 1.25rem;
    transition: var(--transition);
}

.timeline-item.completed .timeline-content {
    border-left: 3px solid var(--status-completed);
}

.timeline-item.active .timeline-content {
    border-left: 3px solid var(--status-active);
    background-color: rgba(245, 158, 11, 0.02);
}

.timeline-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.timeline-date {
    font-size: 0.775rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.timeline-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.timeline-doc {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.6rem;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.timeline-doc:hover {
    background-color: var(--bg-card-hover);
    color: var(--primary);
    border-color: var(--primary);
}

/* Light theme pulse glow */
@keyframes pulseGlowLight {
    0% {
        box-shadow: 0 0 0 0px rgba(245, 158, 11, 0.3);
    }
    100% {
        box-shadow: 0 0 0 6px rgba(245, 158, 11, 0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form layout grids */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

/* Center layouts */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 2.25rem;
    border-radius: var(--radius-lg);
    background-color: #ffffff;
}

/* Alert styles */
.alert {
    padding: 0.875rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    border-left: 4px solid transparent;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.08);
    color: #065f46;
    border-color: var(--status-completed);
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.08);
    color: #991b1b;
    border-color: #ef4444;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dashboard-layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    .sidebar-link {
        padding: 0.5rem 0.85rem;
        font-size: 0.85rem;
    }
    .profile-grid {
        grid-template-columns: 1fr;
    }
}
