/* ================= ОБЩ СТИЛ ================= */

body {
    font-family: Arial;
    margin: 20px;
}

h1 {
    margin-bottom: 10px;
}

/* ================= NAV ================= */

.nav {
    background: #333;
    padding: 10px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.nav a {
    color: white;
    margin-right: 15px;
    text-decoration: none;
}

.nav a:hover {
    text-decoration: underline;
}

/* LEFT */
.nav-left a {
    color: white;
}
.nav-left {
    justify-self: start;
}

/* CENTER */
.nav-center {
    justify-self: center;
    text-align: center;
    color: white;
    font-weight: bold;
}

	
/* RIGHT */
.nav-right {
    justify-self: end;
    display: flex;
    align-items: center;
    color: white;
    font-weight: bold;
}

.nav-right a {
    color: red;
    text-decoration: none;
}

.nav-right > * {
    margin-left: 12px;
}

.nav-divider {
    width: 1px;
    height: 20px;
    background: #aaa;
    margin: 0 10px;
}

/* ================= INPUT ================= */

input {
    width: 100%;
}

/* ================= ТАБЛИЦИ ================= */
/* ===== 5 колони SNS ===== */
.table-5-sns th:nth-child(1), .table-5-sns td:nth-child(1) { width: 67%; }
.table-5-sns th:nth-child(2), .table-5-sns td:nth-child(2) { width: 10%; }
.table-5-sns th:nth-child(3), .table-5-sns td:nth-child(3) { width: 10%; }
.table-5-sns th:nth-child(4), .table-5-sns td:nth-child(4) { width: 5%; }
.table-5-sns th:nth-child(5), .table-5-sns td:nth-child(5) { width: 8%; }

.table-5-sns td:nth-child(2),
.table-5-sns th:nth-child(2),
.table-5-sns td:nth-child(3),
.table-5-sns th:nth-child(3),
.table-5-sns td:nth-child(4),
.table-5-sns th:nth-child(4) {
    text-align: center;
    vertical-align: middle;
}
/* ===== 5 колони prj===== */
.table-5-prj th:nth-child(1), .table-5-prj td:nth-child(1) { width: 20%; }
.table-5-prj th:nth-child(2), .table-5-prj td:nth-child(2) { width: 10%; }
.table-5-prj th:nth-child(3), .table-5-prj td:nth-child(3) { width: 10%; }
.table-5-prj th:nth-child(4), .table-5-prj td:nth-child(4) { width: 52%; }
.table-5-prj th:nth-child(5), .table-5-prj td:nth-child(5) { width: 8%; }
/* ===== 5 колони ===== */
.table-5 th:nth-child(1), .table-5 td:nth-child(1) { width: 32%; }
.table-5 th:nth-child(2), .table-5 td:nth-child(2) { width: 40%; }
.table-5 th:nth-child(3), .table-5 td:nth-child(3) { width: 10%; }
.table-5 th:nth-child(4), .table-5 td:nth-child(4) { width: 10%; }
.table-5 th:nth-child(5), .table-5 td:nth-child(5) { width: 8%; }

.table-5 td:nth-child(2),
.table-5 th:nth-child(2),
.table-5 td:nth-child(3),
.table-5 th:nth-child(3),
.table-5 td:nth-child(4),
.table-5 th:nth-child(4) {
    text-align: center;
    vertical-align: middle;
}

/* ===== 4 колони ===== */
.table-4 th:nth-child(1), .table-4 td:nth-child(1) { width: 40%; }
.table-4 th:nth-child(2), .table-4 td:nth-child(2) { width: 40%; }
.table-4 th:nth-child(3), .table-4 td:nth-child(3) { width: 12%; }
.table-4 th:nth-child(4), .table-4 td:nth-child(4) { width: 8%; }

.table-4 td:nth-child(3),
.table-4 th:nth-child(3) {
    text-align: center;
    vertical-align: middle;
}

/* ===== 4 колони SNS ===== */
.table-4-sns th:nth-child(1), .table-4-sns td:nth-child(1) { width: 72%; }
.table-4-sns th:nth-child(2), .table-4-sns td:nth-child(2) { width: 10%; }
.table-4-sns th:nth-child(3), .table-4-sns td:nth-child(3) { width: 10%; }
.table-4-sns th:nth-child(4), .table-4-sns td:nth-child(4) { width: 8%; }

.table-4-sns td:nth-child(2),
.table-4-sns th:nth-child(2),
.table-4-sns td:nth-child(3),
.table-4-sns th:nth-child(3) {
    text-align: center;
    vertical-align: middle;
}

/* ===== 3 колони ===== */
.table-3 th:nth-child(1), .table-3 td:nth-child(1) { width: 45%; }
.table-3 th:nth-child(2), .table-3 td:nth-child(2) { width: 47%; }
.table-3 th:nth-child(3), .table-3 td:nth-child(3) { width: 8%; }

/* ===== 3 колони SNS ===== */
.table-3-sns th:nth-child(1), .table-3-sns td:nth-child(1) { width: 62%; }
.table-3-sns th:nth-child(2), .table-3-sns td:nth-child(2) { width: 30%; }
.table-3-sns th:nth-child(3), .table-3-sns td:nth-child(3) { width: 8%; }
.table-3-sns td:nth-child(2),
.table-3-sns th:nth-child(2) {
    text-align: center;
    vertical-align: middle;
}

/* ===== 2 колони ===== */
.table-2 th:nth-child(1), .table-2 td:nth-child(1) { width: 92%; }
.table-2 th:nth-child(2), .table-2 td:nth-child(2) { width: 8%; }

/* ===== 2 колони wide ===== */
.table-2-wide th:nth-child(1),
.table-2-wide td:nth-child(1) { width: 90%; }

.table-2-wide th:nth-child(2),
.table-2-wide td:nth-child(2) {
    width: 10%;
    text-align: center;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    table-layout: fixed;
    font-family: "Times New Roman";
}

th, td {
    border: 1px solid black;
    padding: 6px;
    vertical-align: top;
    word-wrap: break-word;
}

th {
    background: #eee;
}
/* ================= Posledna kolona center ================= */
td:last-child,
th:last-child {
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}	
/* TABLE 1 и TABLE 9 */
.table-4-sns th:nth-child(2),
.table-4-sns th:nth-child(3),
.table-4-sns td:nth-child(2),
.table-4-sns td:nth-child(3) {
    text-align: center;
}
	
	
/* ================= LOGIN ================= */

.login-container {
    height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-box {
    width: 320px;
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    text-align: center;
}

.login-box input {
    width: 100%;
    padding: 8px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.login-box button {
    width: 100%;
    padding: 8px;
    background: #333;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.login-box button:hover {
    background: #555;
}

.error {
    background: #ffdddd;
    color: #a00;
    padding: 8px;
    margin-bottom: 10px;
    border-radius: 5px;
    font-size: 14px;
}

/* ================= ADMIN DROPDOWN ================= */

.admin-dropdown {
    position: relative;
    display: inline-block;
    margin-left: 10px;
    color: white;
    cursor: pointer;
}

.admin-dropdown-content {
    display: none;
    position: absolute;
    background: #222;
    min-width: 180px;
    box-shadow: 0px 4px 10px rgba(0,0,0,0.4);
    z-index: 999;
}

.admin-dropdown-content a,
.admin-dropdown-content button {
    display: flex;
    align-items: center;
    gap: 8px;

    width: 100%;
    padding: 8px 12px;
    box-sizing: border-box;

    border: none;
    background: none; 
    color: white;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
}

/* hover */
.admin-dropdown-content a:hover,
.admin-dropdown-content button:hover {
    background: #444;
}

/* 🔥 FIX: Clear DB да е червен */
.admin-dropdown-content button.danger {
    background-color: #e74c3c !important;
    color: white !important;
}

.admin-dropdown-content button.danger:hover {
    background-color: #c0392b !important;
}

.admin-dropdown:hover .admin-dropdown-content {
    display: block;
}

/* ================= MODAL ================= */

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);

    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    width: 320px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
    animation: fadeIn 0.2s ease;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

.modal-content input[type="file"] {
    width: 100%;
    margin-bottom: 15px;
}

.modal-actions {
    display: flex;
    justify-content: space-between;
}

.modal-actions button {
    padding: 6px 12px;
    border: none;
    cursor: pointer;
}

.modal-actions .btn-primary {
    background: #4CAF50;
    color: white;
}

.modal-actions .btn-cancel {
    background: #ccc;
}

@keyframes fadeIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ================= LINKS ================= */

a {
    text-decoration: none;
}

a:hover {
    text-decoration: none;
    color: #1a73e8;
}