* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url('../assets/images/bg_texture.png') repeat;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #333;
    overflow-x: hidden;
}

header {
    background-color: #003366;
    color: #fff;
    padding: 20px 0;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

nav {
    background-color: #0055aa;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    padding: 10px 0;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 10px 15px;
    border-radius: 6px;
    transition: 0.3s ease;
}

nav ul li a:hover {
    background-color: #003366;
    transform: translateY(-2px);
}

main {
    flex: 1;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

section {
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

h2, h3 {
    color: #003366;
    margin-bottom: 20px;
    text-align: center;
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="number"],
form select {
    width: 100%;
    padding: 12px;
    margin: 10px 0 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    background-color: #f9f9f9;
}

form button {
    width: 100%;
    padding: 12px;
    background-color: #003366;
    color: white;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

form button:hover {
    background-color: #001f4d;
    transform: translateY(-2px);
}

.link-button {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px;
    background-color: #0055aa;
    color: white;
    font-size: 16px;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    margin-top: 10px;
}

.link-button:hover {
    background-color: #003f7d;
    transform: translateY(-2px);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th,
table td {
    padding: 12px;
    border: 1px solid #ccc;
    text-align: left;
}

table th {
    background-color: #003366;
    color: white;
}

table tr:nth-child(even) {
    background-color: #f2f2f2;
}

footer {
    background-color: #003366;
    color: white;
    text-align: center;
    padding: 15px 0;
    font-size: 14px;
    margin-top: auto;
}

.dashboard-intro {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
    font-size: 15px;
}

.dashboard-grid {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .dashboard-box {
        padding: 20px;
    }
}

.dashboard-button {
    text-align: center;
    background-color: #0055aa;
    color: white;
    padding: 15px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    transition: 0.3s ease;
    display: block;
}

.dashboard-button:hover {
    background-color: #003f7d;
    transform: translateY(-2px);
}

.index-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    z-index: 1;
}

.index-box {
    width: 100%;
    max-width: 720px;
    min-width: 500px;
    padding: 60px 50px;
    border-radius: 16px;
    background-color: rgba(255, 255, 255, 0.96);
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
}

.index-title {
    font-size: 32px;
    font-weight: bold;
    color: #003366;
    margin-bottom: 20px;
    line-height: 1.4;
}

.index-subtitle {
    font-size: 16px;
    color: #444;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.sidebar.open {
    transform: translateX(0);
}

#sidebarToggle {
    position: fixed;
    top: 20px;
    left: 20px;
    font-size: 26px;
    background: #0055aa;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    z-index: 1100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

#sidebarToggle:hover {
    background-color: #002f66;
}

/* Sidebar Links */
.sidebar-links {
    list-style: none;
    padding: 0;
    margin-top: 30px;
}

.sidebar-links li {
    margin: 15px 0;
}

.sidebar-links li a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    transition: 0.3s ease;
}

.sidebar-links li a:hover {
    background-color: #0055aa;
}

/* Profile Section in Sidebar */
.profile {
    border-bottom: 1px solid #ccc;
    padding-bottom: 15px;
    margin-bottom: 20px;
    font-size: 14px;
}

.profile p {
    margin-bottom: 6px;
}

.sidebar-button {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #0055aa;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: 0.3s ease;
}

.sidebar-button:hover {
    background-color: #002f66;
}

.profile-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 12px;
    display: block;
    border: 2px solid white;
}

.page-title {
    margin: 20px 0 10px 0;
    font-size: 24px;
    font-weight: bold;
    color: #003366;
    text-align: center;
}

.main-content {
    max-width: 900px;
    margin: 60px auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
    transition: transform 0.3s ease-in-out;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.dashboard-box {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px 40px;
    background-color: #ffffffcc;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100%;
    background-color: #003366;
    padding: 20px;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.2);
    color: white;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 9999;
}

.sidebar.open {
    transform: translateX(0);
}

#sidebarToggle {
    position: fixed;
    top: 20px;
    left: 20px;
    font-size: 26px;
    background: #0055aa;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    z-index: 10000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

#sidebarToggle:hover {
    background-color: #002f66;
}

.sidebar-links li a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.sidebar-links li a:hover {
    background-color: #0055aa;
    transform: translateX(4px);
}

.profile-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 12px;
    display: block;
    border: 2px solid white;
}

.page-title {
    text-align: center;
    font-size: 26px;
    margin-bottom: 15px;
    color: #003366;
}
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    background: #ffffff;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #ccc;
    border-top-color: #003366;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.page-header {
    width: 100%;
    background-color: #003366;
    color: white;
    padding: 20px 40px;
    font-size: 22px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    text-align: center;
    position: relative;
    z-index: 999;
}

body.sidebar-open .main-content {
    transform: none !important;
}

@media (max-width: 768px) {
    .index-box {
        min-width: 100%;
        max-width: 95%;
        padding: 30px 20px;
        border-radius: 12px;
    }

    .index-title {
        font-size: 24px;
    }

    .index-subtitle {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .dashboard-grid {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .dashboard-button {
        width: 100%;
        font-size: 15px;
    }

    header,
    .page-header {
        font-size: 18px;
        padding: 12px;
    }

    #sidebarToggle {
        top: 12px;
        left: 12px;
        padding: 6px 10px;
        font-size: 20px;
    }

    .sidebar {
        width: 240px;
    }

    .profile-img {
        width: 70px;
        height: 70px;
    }

    .main-content {
        margin: 20px 10px;
        padding: 20px 10px;
    }

    table th,
    table td {
        font-size: 12px;
        padding: 8px;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .index-box,
    .dashboard-box,
    section {
        width: 95%;
        max-width: 95%;
        padding: 25px 20px;
        border-radius: 10px;
    }

    .index-title,
    h2,
    h3 {
        font-size: 22px;
        line-height: 1.4;
    }

    .index-subtitle,
    .dashboard-intro,
    p {
        font-size: 15px;
    }

    .dashboard-grid {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .dashboard-button,
    .link-button,
    form button {
        font-size: 17px;
        padding: 14px;
        width: 100%;
    }

    form input,
    form select {
        font-size: 16px;
        padding: 14px;
    }

    .sidebar {
        width: 220px;
    }

    .profile-img {
        width: 70px;
        height: 70px;
    }

    .page-header {
        font-size: 20px;
        padding: 14px;
    }

    #sidebarToggle {
        font-size: 22px;
        padding: 6px 10px;
        top: 10px;
        left: 10px;
    }

    table th,
    table td {
        font-size: 13px;
        padding: 8px;
    }
}

.dashboard-button.linkedin {
    background-color: #0077b5;
}

.dashboard-button.github {
    background-color: #24292e;
}
