:root {
    --primary: #23255c;
    --primary-dark: #0d105e;
    --secondary: #10b981;
    --secondary-dark: #059669;
    --primary-color: #23255c;
    --secondary-color: #23255c;
    --dark: #1f2937;
    --light: #f9fafb;
    --gray: #6b7280;
    --light-gray: #e5e7eb;
    --success-color: #10b981;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --dark-color: #212529;
    --gray-color: #6c757d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fb;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    margin: 20px 20px 30px 20px;
    border-bottom: 1px solid #eee;

}

header h1 {
    color: var(--gray-color);
    font-size: 24px;
}

.logo-wrapper {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100px;
}

.logo-wrapper a {
    text-decoration: none;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    background-image: linear-gradient(135deg, #0073e6, #00a676);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile span {
   color: var(--gray);
}

.profile-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
}

.tabs {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}

.navlinks {
    display: flex;
    margin-bottom: 20px;
    overflow-x: auto;
}

.tab {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}


.tab a {
    color:#333;
    text-decoration: none;
}

.tab:hover {
    background-color: #f0f0f0;
}


.tab-link {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.tab-link a {
    color:#333;
    text-decoration: none;
}

.tab-link:hover {
    background-color: #f0f0f0;
}

.tab.active {
    border-bottom: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: bold;
}

.dashboard {
    margin:20px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 15px;
    font-size: 24px;
    color: white;
}

.card h3 {
    font-size: 16px;
    color: var(--gray-color);
    margin-bottom: 5px;
}

.card p {
    font-size: 24px;
    font-weight: bold;
}

.dashboard-card-1 .card-icon {
    background-color: #4361ee;
}

.dashboard-card-2 .card-icon {
    background-color: #f72585;
}

.dashboard-card-3 .card-icon {
    background-color: #4cc9f0;
}

.dashboard-card-4 .card-icon {
    background-color: #7209b7;
}

.dashboard-card-5 .card-icon {
    background-color: #3a0ca3;
}

.dashboard-card-6 .card-icon {
    background-color: #560bad;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    font-size: 0.9rem;
}

thead {
    background-color: var(--primary-color);
    color: white;
}

th,
td {
    padding: 5px 15px;
    text-align: left;
}

tbody tr {
    border-bottom: 1px solid #ddd;
}

tbody tr:last-child {
    border-bottom: none;
}

tbody tr:hover {
    background-color: #f8f9fa;
}

.actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

a.btn {
    text-decoration: none;
} 

a.link {
    color: var(--secondary-dark);
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
}

.btn-edit {
    background-color: var(--primary-color);
    color: white;
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}


.btn-delete {
    background-color: var(--danger-color);
    color: white;
}

.btn-view {
    background-color: var(--success-color);
    color: white;
}

.btn:hover {
    opacity: 0.9;
}

.edit-form {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 10px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    display: none;
}

.edit-form.active {
    display: block;
    animation: slideDown 0.5s;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-control.textarea{
    width:100%;
    height:150px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    margin-right: 15px;
}

.checkbox-item input {
    margin-right: 5px;
}

.form-note {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
}

span.required {
    color:red;
}

.btn-save {
    background-color: var(--success-color);
    color: white;
}

.btn-cancel {
    background-color: var(--gray-color);
    color: white;
}

.add-new-form {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.page-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 50px 0;
    text-align: center;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}


.add-new-form h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.btn-add {
    background-color: var(--primary-color);
    color: white;
}

footer {
    text-align: center;
    margin-bottom: 30px;
}

.footer p {
    text-align: center;
    border-top: 1px solid #D0D0D0;
    padding: 20px;
    margin-bottom: 30px;
    color: #777;
}

.footer a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
}

.social-item {
    margin: 5px 10px;
    color: var(--gray);
    font-size: 18px;
    transition: color 0.3s;
}

/**** star rating*/

.rating a {
    display: inline-block;
    padding-right: 4px;
    text-decoration: none;
    margin: 0;
}

.rating a:after {
    position: relative;
    font-size: 18px;
    font-family: 'FontAwesome', serif;
    display: block;
    content: "\f005";
    color: #9e9e9e;
}

.rating span {
    font-size: 0;
    /* trick to remove inline-element's margin */
}

.rating a:hover~a:after {
    color: #9e9e9e !important;
}

.rating span.active a.active~a:after {
    color: #9e9e9e;
}

.rating span:hover a:after {
    color: #ffcd00 !important;
}

.rating span.active a:after,
.rating a.active:after {
    color: #ffcd00;
}

/* Popup styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.popup-box {
    background-color: white;
    width: 90%;
    max-width: 800px;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    color: #777;
    cursor: pointer;
    font-weight: bold;
    line-height: 1;
}

.popup-close:hover {
    color: #333;
}

.popup-content {
    margin-top: 40px;
    text-align: center;
}

.popup-content p {
    padding: 20px;
}

#qrcodeCanvas {
    display: flex;
    justify-content: center;
}

#qrcodeCanvas canvas {
    border: 5px solid var(--primary);
}

.qrerror {
    color: var(--danger-color);
    text-align: center;
    font-weight: 500;
}

.notice-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

.notice-success {
    background-color: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

@media (max-width: 768px) {
    
    header {
        flex-direction: column;
        gap: 10px;
    }

    .logo-wrapper {
        justify-content: center;
    }

    .tabs {
        flex-direction: column;
    }

    .cards {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    table {
        display: block;
        overflow-x: auto;
    }


}