body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    text-align: center;
    padding: 20px;
}

.container {
    width: 80%;
    max-width: 1200px;
    margin: auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 0px 10px gray;
}

h2 {
    color: #333;
}

form {
    margin: 20px 0;
}

input {
    padding: 10px;
    width: 60%;
    margin: 10px 0;
}

button {
    padding: 10px 20px;
    background: blue;
    color: white;
    border: none;
    cursor: pointer;
}

button:hover {
    background: darkblue;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th, td {
    padding: 10px;
    text-align: left;
    border: 1px solid #ddd;
}

th {
    background-color: #f5f5f5;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

.back-btn {
    display: inline-block;
    margin: 10px 0;
    padding: 10px 15px;
    background: red;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

.back-btn:hover {
    background: darkred;
}

.error {
    color: red;
    text-align: center;
    margin: 20px 0;
}

.button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 20px;
}

.button:hover {
    background-color: #45a049;
}

.header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 20px;
    gap: 20px;
    text-align: center;
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    max-width: 150px;
    height: auto;
    margin: 0;
}

.title-section {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.title-section h1 {
    font-size: 32px;
    margin: 0;
    line-height: 1.2;
    color: #000080;
    font-weight: bold;
}

.title-section h2 {
    font-size: 28px;
    margin: 0;
    line-height: 1.2;
    color: #cc0000;
    font-weight: bold;
}

.title-section h3 {
    font-size: 18px;
    margin: 0;
    line-height: 1.2;
}

.academic-year {
    text-align: right;
    min-width: 300px;
}

.academic-year h2 {
    font-size: 20px;
    margin: 0;
    line-height: 1.2;
}

.academic-year h1 {
    font-size: 24px;
    margin: 5px 0 0 0;
    line-height: 1.2;
}

.search-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.input-group label {
    font-weight: bold;
    color: #333;
}

.input-group input {
    width: 200px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.input-group button {
    background-color: #003366;
    color: white;
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.input-group button:hover {
    background-color: #002244;
}

table th, table td {
    padding: 4px;
    font-size: 0.9em;
    text-align: center;
}

td:first-child {
    text-align: left;
}

tr:first-child th {
    background-color: #f0f0f0;
    font-weight: bold;
}

tr:nth-child(2) th {
    font-size: 0.8em;
    background-color: #f8f8f8;
}

td:nth-child(4n), td:nth-child(7n), td:nth-child(10n), 
td:nth-child(13n), td:nth-child(16n), td:nth-child(19n) {
    border-right: 2px solid #ddd;
}

.admin-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.message {
    padding: 15px;
    margin: 15px 0;
    border-radius: 5px;
    font-weight: bold;
}

.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

input[type="file"] {
    display: block;
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
}

select {
    padding: 8px;
    width: 100%;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

label {
    display: block;
    margin-top: 10px;
    font-weight: bold;
}

input[type="text"],
input[type="number"] {
    width: 100%;
    padding: 8px;
    margin: 5px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
    }

    .logo-section {
        justify-content: center;
    }

    .title-section {
        text-align: center;
        width: 100%;
    }

    .academic-year {
        text-align: center;
        min-width: auto;
        width: 100%;
    }

    .logo {
        max-width: 120px;
    }

    .title-section h1 {
        font-size: 28px;
    }

    .title-section h2 {
        font-size: 24px;
    }
}

/* Sidebar için tutarlı CSS */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 250px;
    background: #2c3e50;
    color: #fff;
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    z-index: 1000;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid #34495e;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}

.user-role {
    color: #95a5a6;
}

.logout-link {
    color: #e74c3c;
    text-decoration: none;
    padding: 5px;
    transition: color 0.3s ease;
}

.logout-link:hover {
    color: #c0392b;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 20px;
    color: #ecf0f1;
    font-weight: 600;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.nav-item:hover {
    background: #34495e;
    color: #fff;
    text-decoration: none;
}

.nav-item.active {
    background: #3498db;
    color: #fff;
    border-left: 4px solid #2980b9;
}

.nav-item i {
    width: 20px;
    margin-right: 10px;
    font-size: 16px;
    text-align: center;
}

.nav-item span {
    font-size: 14px;
    font-weight: 500;
}

/* Ana içerik alanını sidebar'a göre ayarla */
.admin-container, .container {
    margin-left: 250px;
    padding: 20px;
    max-width: calc(100% - 250px);
}

/* Alt menü stilleri */
.nav-item-group {
    margin-top: 10px;
}

.nav-item-header {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    color: #ecf0f1;
    transition: all 0.3s ease;
    background: #34495e;
    border-left: 4px solid transparent;
    font-size: 14px;
    font-weight: 500;
}

.nav-item-header:hover {
    background: #2c3e50;
    border-left-color: #3498db;
}

.nav-item-header.active {
    background: #2c3e50;
    border-left-color: #3498db;
}

.arrow-icon {
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.3s;
}

.nav-item-header.active .arrow-icon {
    transform: rotate(180deg);
}

.sub-menu {
    display: none !important;
}

.sub-menu.active {
    display: block !important;
}

.sub-item {
    padding: 10px 20px 10px 50px;
    background: transparent;
    border-left: 4px solid transparent;
    font-size: 13px;
    font-weight: 400;
}

.sub-item:hover {
    background: #34495e;
    border-left-color: #3498db;
}

.sub-item.active {
    background: #34495e;
    border-left-color: #3498db;
}

/* Mobil görünüm için medya sorgusu */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    
    .sidebar-header {
        display: none;
    }
    
    .nav-item span {
        display: none;
    }
    
    .nav-item {
        padding: 15px;
        justify-content: center;
    }
    
    .nav-item i {
        margin: 0;
        font-size: 18px;
    }
    
    .admin-container, .container {
        margin-left: 60px;
        max-width: calc(100% - 60px);
    }
    
    .nav-item-header {
        padding: 15px;
        justify-content: center;
    }
    
    .nav-item-header span {
        display: none;
    }
    
    .sub-item {
        padding: 15px;
        justify-content: center;
    }
    
    .arrow-icon {
        display: none;
    }
}

/* Font Awesome ikonları için tutarlı stil */
.fas, .fa {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
}

/* Sidebar'da kullanılan özel ikonlar için stil */
.sidebar .fas,
.sidebar .fa {
    font-size: 16px;
    width: 20px;
    text-align: center;
    margin-right: 10px;
}
