@import url('https://fonts.googleapis.com/css?family=Dancing+Script|Roboto');

*,
*:after,
*:before {
    box-sizing: border-box;
}

:root {
    --primary: #21867A;
}

body {
    background: #e9f8fc;
    text-align: center;
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.panda {
    position: relative;
    width: 200px;
    margin: 50px auto;
}

.face {
    width: 200px;
    height: 200px;
    background: #f1eded;
    border-radius: 100%;
    margin: 50px auto;
    box-shadow: 0 10px 15px rgba(0, 0, 0, .15);
    z-index: 50;
    position: relative;
}

.ear {
    position: absolute;
    width: 80px;
    height: 80px;
    background: #000;
    z-index: 5;
    border: 10px solid #fff;
    left: -15px;
    top: 20px;
    border-radius: 100%;
}

.ear:after {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    background: #000;
    z-index: 5;
    border: 10px solid #fff;
    left: 125px;
    top: 0;
    border-radius: 100%;
}

.eye-shade {
    background: #000;
    width: 50px;
    height: 80px;
    margin: 10px;
    position: absolute;
    top: 35px;
    left: 25px;
    transform: rotate(220deg);
    border-radius: 25px / 20px 30px 35px 40px;
}

.eye-shade.rgt {
    transform: rotate(140deg);
    left: 105px;
}

.eye-white {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 100%;
    background: #fff;
    z-index: 500;
    left: 40px;
    top: 80px;
    overflow: hidden;
}

.eye-white.rgt {
    right: 40px;
    left: auto;
}

.eye-ball {
    position: absolute;
    width: 10px;
    height: 10px;
    left: 10px;
    top: 10px;
    max-width: 10px;
    max-height: 10px;
    transition: .1s;
}

.eye-ball:after {
    content: '';
    background: #000;
    position: absolute;
    border-radius: 100%;
    right: 0;
    bottom: 0px;
    width: 20px;
    height: 20px;
}

.nose {
    position: absolute;
    height: 20px;
    width: 35px;
    bottom: 40px;
    left: 0;
    right: 0;
    margin: auto;
    border-radius: 50px 20px/30px 15px;
    transform: rotate(15deg);
    background: #000;
}

.body {
    background: #fff;
    position: absolute;
    top: 200px;
    left: -20px;
    border-radius: 100px 100px 100px 100px/126px 126px 96px 96px;
    width: 250px;
    height: 282px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, .3);
}

.hand {
    width: 40px;
    height: 30px;
    border-radius: 50px;
    box-shadow: 0 2px 3px rgba(0, 0, 0, .15);
    background: #000;
    margin: 5px;
    position: absolute;
    top: 70px;
    left: -25px;
}

.hand:after,
.hand:before {
    content: '';
    width: 40px;
    height: 30px;
    border-radius: 50px;
    box-shadow: 0 2px 3px rgba(0, 0, 0, .15);
    background: #000;
    margin: 5px;
    position: absolute;
    left: -5px;
    top: 11px;
}

.hand:before {
    top: 26px;
}

.hand.rgt {
    left: auto;
    right: -25px;
}

.hand.rgt:after,
.hand.rgt:before {
    left: auto;
    right: -5px;
}

.foot {
    top: 360px;
    left: -80px;
    position: absolute;
    background: #000;
    z-index: 1400;
    box-shadow: 0 5px 5px rgba(0, 0, 0, .2);
    border-radius: 40px 40px 39px 40px/26px 26px 63px 63px;
    width: 82px;
    height: 120px;
}

.foot:after {
    content: '';
    width: 55px;
    height: 65px;
    background: #222;
    border-radius: 100%;
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    margin: auto;
}

.finger {
    position: absolute;
    width: 25px;
    height: 35px;
    background: #222;
    border-radius: 100%;
    top: 10px;
    right: 5px;
}

.finger:after,
.finger:before {
    content: '';
    position: absolute;
    width: 20px;
    height: 35px;
    background: #222;
    border-radius: 100%;
    right: 30px;
    top: 0;
}

.finger:before {
    right: 55px;
    top: 5px;
}

.foot.rgt {
    left: auto;
    right: -80px;
}

.foot.rgt .finger {
    left: 5px;
    right: auto;
}

.foot.rgt .finger:after {
    left: 30px;
    right: auto;
}

.foot.rgt .finger:before {
    left: 55px;
    right: auto;
}

form {
    max-width: 400px;
    padding: 20px 40px;
    background: #fff;
    height: 300px;
    margin: -100px auto 0;
    box-shadow: 0 10px 15px rgba(0, 0, 0, .15);
    transition: .3s;
    position: relative;
    transform: translateY(-100px);
    z-index: 500;
    border: 1px solid #eee;
}

form.up {
    transform: translateY(-180px);
}

h1 {
    color: var(--primary);
    font-family: 'Dancing Script', cursive;
}

.btn {
    background: #fff;
    padding: 5px;
    width: 150px;
    height: 35px;
    border: 1px solid var(--primary);
    margin-top: 25px;
    cursor: pointer;
    transition: .3s;
    box-shadow: 0 50px var(--primary) inset;
    color: #fff;
}

.btn:hover {
    box-shadow: 0 0 var(--primary) inset;
    color: var(--primary);
}

.btn:focus {
    outline: none;
}

.form-group {
    position: relative;
    font-size: 15px;
    color: #666;
    margin-top: 30px;
}

.form-label {
    position: absolute;
    z-index: 1;
    left: 0;
    top: 5px;
    transition: .3s;
}

.form-control {
    width: 100%;
    position: relative;
    z-index: 3;
    height: 35px;
    background: none;
    border: none;
    padding: 5px 0;
    transition: .3s;
    border-bottom: 1px solid #777;
    color: #555;
}

.form-control:invalid {
    outline: none;
}

.form-control:focus,
.form-control:valid {
    outline: none;
    box-shadow: 0 1px var(--primary);
    border-color: var(--primary);
}

.form-control:focus+.form-label,
.form-control:valid+.form-label {
    font-size: 12px;
    color: var(--primary);
    transform: translateY(-15px);
}

.alert {
    position: absolute;
    color: #f00;
    font-size: 16px;
    right: -180px;
    top: -300px;
    z-index: 200;
    padding: 30px 25px;
    background: #fff;
    box-shadow: 0 3px 5px rgba(0, 0, 0, .2);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    transition: .4s .6s linear;
}

.alert:after,
.alert:before {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    background: #fff;
    left: -19px;
    bottom: -8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .2);
    border-radius: 50%;
}

.alert:before {
    width: 15px;
    height: 15px;
    left: -35px;
    bottom: -25px;
}

.wrong-entry {
    animation: wrong-log 0.3s;
}

.wrong-entry .alert {
    opacity: 1;
    transform: scale(1);
}

@keyframes eye-blink {
    to {
        height: 30px;
    }
}

@keyframes wrong-log {

    0%,
    100% {
        left: 0px;
    }

    20%,
    60% {
        left: 20px;
    }

    40%,
    80% {
        left: -20px;
    }
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}
.dashboard-sidebar {
    width: 220px;
    background: #21867A;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 0 1rem 0;
    min-height: 100vh;
    box-shadow: 2px 0 16px rgba(33,134,122,0.08);
}
.sidebar-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2.5rem;
}
.sidebar-logo img {
    width: 60px;
    margin-bottom: 0.5rem;
}
.sidebar-logo span {
    color: #fff;
    font-weight: 700;
    font-size: 1.2rem;
    display: block;
}

#logoLink {
    text-decoration: none;
}

.sidebar-nav {
    flex-grow: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 2rem;
    color: #fff;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 8px 0 0 8px;
    transition: background 0.2s, color 0.2s;
}
.sidebar-link.active, .sidebar-link:hover {
    background: #176B87;
    color: #fff;
}
.sidebar-link i {
    font-size: 1.1rem;
}

.dashboard-main {
    flex: 1;
    background: #e9f8fc;
    min-height: 100vh;
    padding: 0;
    display: flex;
    flex-direction: column;
    margin-left: 250px;
    padding: 1.5rem;
}
.dashboard-topbar {
    background: #fff;
    box-shadow: 0 2px 8px rgba(33,134,122,0.07);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e0e0e0;
}
.topbar-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #21867A;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}
.topbar-actions {
    display: flex;
    gap: 1rem;
}
.topbar-btn {
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #21867A;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.topbar-btn:hover {
    background: #21867A;
    color: #fff;
}

.dashboard-section {
    display: none;
    padding: 2.5rem 2rem;
}
.dashboard-section.active {
    display: block;
}

.dashboard-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.stat-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(33,134,122,0.08);
    padding: 2rem 1.5rem;
    min-width: 180px;
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
}
.stat-card i {
    font-size: 2rem;
    color: #21867A;
}
.stat-value {
    font-size: 2.2rem;
    font-weight: bold;
    color: #176B87;
}
.stat-label {
    color: #888;
    font-size: 1rem;
}

.table-responsive {
    overflow-x: auto;
    margin-top: 2rem;
}
.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(33,134,122,0.07);
}
.dashboard-table th, .dashboard-table td {
    padding: 1rem 0.7rem;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}
.dashboard-table th {
    background: #e9f8fc;
    color: #21867A;
    font-weight: bold;
}
.status {
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
}
.status.new { background: #21867A; }
.status.processing { background: #f0ad4e; }
.status.done { background: #28a745; }
.table-btn {
    background: #21867A;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.4rem 1.1rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}
.table-btn:hover {
    background: #176B87;
}

.media-upload {
    margin-bottom: 1.5rem;
}
.media-upload-label {
    display: inline-block;
    background: #21867A;
    color: #fff;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}
.media-upload-label:hover {
    background: #176B87;
}
.media-gallery {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
}
.media-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(33,134,122,0.07);
    padding: 0.5rem;
    width: 110px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.media-item img, .media-item video {
    max-width: 100%;
    max-height: 100%;
    border-radius: 6px;
}

.add-text-btn {
    background: #21867A;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.6rem 1.3rem;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: background 0.2s;
}
.add-text-btn:hover {
    background: #176B87;
}
.text-list {
    margin-top: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}
.text-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(33,134,122,0.07);
    padding: 1.2rem 1rem;
}
.text-item h4 {
    margin: 0 0 0.5rem 0;
    color: #21867A;
}
.text-item p {
    color: #666;
    font-size: 1rem;
}

.settings-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
    max-width: 400px;
}
.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    background: #fff;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    box-shadow: 0 2px 8px rgba(33,134,122,0.07);
}
.setting-item label {
    font-weight: 500;
    color: #21867A;
}

@media (max-width: 900px) {
    .dashboard-container {
        flex-direction: column;
    }
    .dashboard-sidebar {
        flex-direction: row;
        width: 100%;
        min-height: unset;
        height: 70px;
        padding: 0 1rem;
        align-items: center;
        justify-content: space-between;
    }
    .sidebar-logo {
        flex-direction: row;
        gap: 0.7rem;
        margin-bottom: 0;
    }
    .sidebar-nav {
        flex-direction: row;
        gap: 0.2rem;
        width: auto;
    }
    .sidebar-link {
        border-radius: 8px;
        padding: 0.6rem 1rem;
        font-size: 0.98rem;
    }
}
@media (max-width: 700px) {
    .dashboard-section {
        padding: 1.2rem 0.3rem;
    }
    .dashboard-stats {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Dashboard Table Specific Styles */
.dashboard-table td .status.new { background: #21867A; }
.dashboard-table td .status.processing { background: #f0ad4e; }
.dashboard-table .table-btn {
    padding: 0.4rem 0.8rem;
    border: 1px solid #21867A;
    background: #fff;
    color: #21867A;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}
.dashboard-table .table-btn:hover { background: #21867A; color: #fff; }

/* Modal Styles */
.password-modal, .post-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 2rem;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 4px 24px #21867A22;
    position: relative;
}

.close-modal-btn {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
}

.close-modal-btn:hover,
.close-modal-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-content h3 {
    margin-bottom: 1.5rem;
    color: #21867A;
}

.modal-content .form-group {
    margin-bottom: 1rem;
}

.modal-content .form-group label {
    display: block;
    margin-bottom: .5rem;
    font-weight: 600;
    color: #333;
}

.modal-content .form-group input[type="text"],
.modal-content .form-group input[type="password"],
.modal-content .form-group input[type="url"],
.modal-content .form-group input[type="file"],
.modal-content .form-group textarea {
    width: 100%;
    padding: .7rem;
    border-radius: 6px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.modal-msg {
    color: #f00;
    font-size: 0.98rem;
    min-height: 22px;
    margin-bottom: 0.7rem;
}

/* Post list specific styles */
#postsListContainer .text-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
    border-bottom: 1px solid #ddd;
}
#postsListContainer .post-image {
    width: 100px;
    height: 70px;
    object-fit: cover;
    border-radius: 5px;
}
#postsListContainer .post-details {
    flex-grow: 1;
}

@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
}

/* Sidebar Menu Group Styles */
.sidebar-nav .sidebar-menu-group {
    position: relative;
}

.sidebar-nav .has-submenu {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-nav .submenu-arrow {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.sidebar-nav .has-submenu.active .submenu-arrow {
    transform: rotate(180deg);
}

.sidebar-nav .submenu {
    display: none;
    padding-left: 25px; /* Indent submenu items */
    background: rgba(0,0,0,0.1);
}

.sidebar-nav .submenu-link {
    padding: 0.8rem 1.5rem;
    font-size: 0.95rem;
    position: relative;
}

.sidebar-nav .submenu-link::before {
    content: '';
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.6);
}

.sidebar-nav .submenu-link.active, .sidebar-nav .submenu-link:hover {
    background: #21867A;
    color: #fff;
} 