@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #0d1b2a;
    color: #e0e1dd;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    margin-left: 290px;
}

.content {
    flex: 1;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

nav {
    background: linear-gradient(90deg, #1b263b, #415a77);
    padding: 25px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.nav-logo img {
    height: 60px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-menu li {
    margin-left: 25px;
}

.nav-menu a, .logout-button {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    transition: color 0.3s ease, transform 0.3s ease;
    font-family: 'Poppins', sans-serif;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.nav-menu a:hover, .logout-button:hover {
    color: #00f5ff;
    transform: translateY(-2px);
    display: inline-block;
}

.nav-toggle {
    display: none;
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
}

.card {
    background: rgba(27, 38, 59, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 221, 235, 0.3);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.1), rgba(65, 90, 119, 0.1));
    pointer-events: none;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    border-color: rgba(0, 221, 235, 0.6);
}

.card.dongle-card {
    margin-top: 10px;
}

.card h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #e0e1dd;
    margin-bottom: 20px;
}

.card h3 {
    font-size: 1.3rem;
    font-weight: 500;
    color: #e0e1dd;
    margin-bottom: 16px;
}

.card h5 {
    font-size: 20px;
    color: #00f5ff;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h6 {
    font-size: 16px;
    color: #c7c3f5;
    font-weight: 600;
    margin: 15px 0 10px;
}

.card p {
    font-size: 14px;
    color: #e0e1dd;
    margin-bottom: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #e0e1dd;
    margin-bottom: 5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: #2a3b57;
    border: 1px solid #415a77;
    border-radius: 8px;
    padding: 8px;
    color: #e0e1dd;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:disabled {
    background-color: #1b263b;
    cursor: not-allowed;
}

.form-group select {
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2210%22%20height%3D%225%22%20viewBox%3D%220%200%2010%205%22%3E%3Cpath%20fill%3D%22%23e0e1dd%22%20d%3D%22M0%200h10L5%205z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px 5px;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    height: 150px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #00f5ff;
    box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.2);
    outline: none;
}

.btn {
    background: linear-gradient(90deg, #00ddeb, #ffd700);
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    color: #0d1b2a;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn:hover {
    background: linear-gradient(90deg, #ffd700, #00ddeb);
}

.btn-submit, .btn-close-ticket {
    background: #66b0ff;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    margin-right: 10px;
}

.btn-close-ticket {
    margin-top: 10px;
}

.btn-submit:hover, .btn-close-ticket:hover {
    background: #99ccff;
    transform: scale(1.05);
}

.btn-info {
    background: linear-gradient(90deg, #66b0ff, #99ccff);
    color: #0d1b2a;
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.btn-info:hover {
    background: linear-gradient(90deg, #99ccff, #66b0ff);
    transform: scale(1.05);
}

.btn-save {
    background: #66b0ff;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    margin-top: 15px;
}

.btn-save:hover {
    background: #99ccff;
    transform: scale(1.05);
}

.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #f87171;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid #22c55e;
    color: #4ade80;
}

.message, .error {
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.message {
    background-color: #28a745;
    color: #fff;
}

.error {
    background-color: #dc3545;
    color: #fff;
    grid-column: 1 / -1;
}

.table-container {
    overflow-x: auto;
    width: 100%;
    font-size: 14px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: #2a3b57;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.table th, .table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #415a77;
    color: #e0e1dd;
}

.table th {
    background: linear-gradient(90deg, #66b0ff, #99ccff);
    color: #0d1b2a;
    font-weight: 600;
}

.table tr:hover {
    background: #1b263b;
}

.table input[type="text"] {
    width: 100%;
    padding: 5px;
    border: 1px solid #66b0ff;
    border-radius: 5px;
    background-color: #1b263b;
    color: #e0e1dd;
    font-family: 'Poppins', sans-serif;
}

.table input[type="text"]:focus {
    outline: none;
    border-color: #99ccff;
    box-shadow: 0 0 5px rgba(102, 176, 255, 0.5);
}

.license-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.license-table th, .license-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid rgba(65, 90, 119, 0.5);
}

.license-table th {
    background: rgba(102, 176, 255, 0.2);
    color: #99ccff;
}

.license-table td {
    color: #e0e1dd;
}

.storage-bar {
    background: #2a3b57;
    border-radius: 5px;
    height: 10px;
    margin: 5px 0;
    overflow: hidden;
}

.storage-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #66b0ff, #99ccff);
    transition: width 0.5s ease;
}

.notification-list {
    list-style: none;
    padding: 0;
}

.notification-list li {
    font-size: 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-list .urgent {
    color: #ff4d4d;
}

.copy-icon {
    cursor: pointer;
    color: #66b0ff;
    margin-left: 5px;
    font-size: 14px;
}

.copy-icon:hover {
    color: #99ccff;
}

.copy-tooltip {
    display: none;
    position: fixed;
    background-color: #28a745;
    color: #fff;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    z-index: 1000;
    white-space: nowrap;
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: linear-gradient(135deg, #1b263b, #415a77);
    margin: 10% auto;
    padding: 25px;
    border: 2px solid #00ddeb;
    border-radius: 12px;
    width: 80%;
    max-width: 600px;
    color: #e0e1dd;
    position: relative;
    z-index: 2001;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content h5 {
    font-size: 24px;
    color: #00f5ff;
    font-weight: 600;
    margin-bottom: 20px;
}

.modal-content p {
    font-size: 16px;
    color: #e0e1dd;
    margin-bottom: 15px;
}

.modal-content h6 {
    font-size: 20px;
    color: #c7c3f5;
    font-weight: 600;
    margin: 20px 0 10px;
}

.close {
    color: #e0e1dd;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #99ccff;
    text-decoration: none;
}

.chat-container {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.message {
    padding: 10px;
    margin-bottom: 10px;
    border-left: 3px solid #66b0ff;
    background: #2a3b57;
    border-radius: 5px;
}

.message.admin {
    border-left-color: #ff6666;
}

.message .meta {
    font-size: 12px;
    color: #c7c3f5;
    margin-bottom: 5px;
}

.modal-actions {
    margin-top: 20px;
    text-align: center;
}

.modal-actions .btn-info {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
}

.share-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #1b263b;
    color: #e0e1dd;
    padding: 10px 20px;
    border-radius: 8px;
    border: 2px solid #00f5ff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 3000;
    display: none;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.share-notification.success {
    border-color: #00f5ff;
}

.share-notification.error {
    border-color: #ff6b6b;
    color: #ff6b6b;
}

.gallery-item .image-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: #e0e1dd;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.2;
    text-align: center;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .image-info {
    opacity: 1;
}

.filter-table {
    margin-bottom: 10px;
    padding: 10px;
    background: #1b263b;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.filter-table td {
    padding: 5px;
    vertical-align: middle;
}

.filter-table label {
    color: #e0e1dd;
    margin-right: 10px;
    font-size: 14px;
    font-weight: 500;
}

.filter-table select, .filter-table input[type="date"] {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #415a77;
    background: #2a3b57;
    color: #e0e1dd;
    font-size: 14px;
    width: 150px;
}

.filter-table button {
    padding: 8px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.filter-table #deleteSelectedBtn {
    background: linear-gradient(90deg, #ff4d4d, #cc0000);
    color: #fff;
}

.filter-table #deleteSelectedBtn:hover {
    background: linear-gradient(90deg, #cc0000, #ff4d4d);
    transform: translateY(-2px);
}

.filter-table #deleteByDateBtn {
    background: linear-gradient(90deg, #ff4d4d, #cc0000);
    color: #fff;
}

.filter-table #deleteByDateBtn:hover {
    background: linear-gradient(90deg, #cc0000, #ff4d4d);
    transform: translateY(-2px);
}

.gallery-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    padding: 10px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 200px;
    width: 200px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(27, 38, 59, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    border-radius: 10px;
}

.loading-overlay span {
    color: #e0e1dd;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.image-overlay {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    max-width: 90%;
    max-height: 90vh;
    width: 300px;
    overflow-y: auto;
    flex-direction: column;
    align-items: center;
}

.image-overlay .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    font-weight: bold;
    background: #ff4444;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}

.image-overlay .close-btn:hover {
    background: #cc0000;
}

.image-overlay .modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.image-overlay img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-bottom: 10px;
    border-radius: 5px;
}

.image-overlay .qr-code {
    margin-top: 0;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
}

.image-overlay .qr-code div {
    border: 2px solid #ccc;
    border-radius: 5px;
}

.image-overlay .buttons {
    margin-top: 10px;
    display: flex;
    flex-direction: row;
    gap: 10px;
    justify-content: center;
}

.image-overlay .buttons .btn-icon {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
    text-decoration: none;
}

.image-overlay .buttons .btn-icon:hover {
    background: #0056b3;
}

.image-overlay .right-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.delete-date-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.delete-date-modal {
    background: #1b263b;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #00f5ff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    width: 90%;
    max-width: 400px;
    position: relative;
}

.delete-date-modal .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff4d4d;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s, transform 0.2s;
}

.delete-date-modal .close-btn:hover {
    background: #cc0000;
    transform: scale(1.1);
}

.delete-date-modal h5 {
    color: #00f5ff;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
}

.delete-date-modal form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.delete-date-modal label {
    color: #e0e1dd;
    font-size: 14px;
    font-weight: 500;
}

.delete-date-modal input[type="date"] {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #415a77;
    background: #2a3b57;
    color: #e0e1dd;
    font-size: 14px;
    width: 100%;
}

.delete-date-modal button[type="submit"] {
    padding: 10px 20px;
    background: linear-gradient(90deg, #ff4d4d, #cc0000);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.delete-date-modal button[type="submit"]:hover {
    background: linear-gradient(90deg, #cc0000, #ff4d4d);
    transform: translateY(-2px);
}

.public-url-card {
    margin-bottom: 20px;
    background: #1b263b;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.public-url-card h6 {
    color: #e0e1dd;
    margin-bottom: 10px;
}

.public-url-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.public-url-input {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid #415a77;
    border-radius: 5px;
    background: #2a3b57;
    color: #e0e1dd;
    font-size: 14px;
}

.public-url-input:disabled {
    background: #2a3b57;
}

.public-url-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.copy-btn {
    background: linear-gradient(90deg, #28a745, #34c759);
}

.copy-btn:hover {
    background: linear-gradient(90deg, #34c759, #28a745);
    transform: translateY(-2px);
}

.open-btn {
    background: linear-gradient(90deg, #00ddeb, #ffd700);
    color: #0d1b2a;
}

.open-btn:hover {
    background: linear-gradient(90deg, #ffd700, #00ddeb);
    transform: translateY(-2px);
}

@media (min-width: 769px) {
    .content {
        padding: 20px;
    }
    .card {
        padding: 15px;
    }
    .image-overlay {
        width: 700px;
    }
    .image-overlay .modal-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        align-items: center;
    }
    .image-overlay img {
        max-height: 60vh;
    }
    .image-overlay .right-column {
        align-items: center;
    }
    .image-overlay .buttons {
        flex-direction: row;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .container {
        margin-left: 0;
        flex-direction: column;
    }
    .content {
        grid-template-columns: 1fr;
        padding: 10px;
    }
    .card {
        padding: 15px;
    }
    .table-container {
        font-size: 14px;
    }
    .table th, .table td {
        padding: 10px;
    }
    .modal-content {
        width: 90%;
        margin: 20% auto;
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    .gallery-item {
        height: 150px;
        width: 150px;
    }
    .gallery-item img {
        height: 100%;
        width: 100%;
        object-fit: contain;
    }
    .filter-table td {
        display: block;
        margin-bottom: 10px;
    }
    .filter-table {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 10px;
    }
    .filter-table select, .filter-table input[type="date"], .filter-table button {
        width: 100%;
        box-sizing: border-box;
    }
    .image-overlay {
        width: 90%;
        max-height: 85vh;
        padding: 15px;
    }
    .image-overlay img {
        max-height: 50vh;
        width: auto;
        height: auto;
        object-fit: contain;
    }
    .image-overlay .buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        align-items: center;
    }
    .image-overlay .buttons .btn-icon {
        width: 50px;
        height: 50px;
    }
    .public-url-container {
        flex-direction: column;
        gap: 10px;
    }
    .public-url-input {
        width: 100%;
    }
    .public-url-btn {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .container {
        margin: 20px auto;
        padding: 0 10px;
    }
    .card {
        padding: 16px;
    }
    .card h2 {
        font-size: 1.5rem;
    }
    .card h3 {
        font-size: 1.1rem;
    }
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 6px;
    }
}

@media (max-height: 600px) and (orientation: portrait) {
    .image-overlay img {
        max-height: 40vh;
    }
    .image-overlay {
        padding: 10px;
    }
}

@media (orientation: portrait) and (max-width: 768px) {
    .table {
        display: block;
    }
    .table thead {
        display: none;
    }
    .table tbody, .table tr {
        display: block;
    }
    .table tr {
        margin-bottom: 15px;
        border-bottom: 2px solid #415a77;
    }
    .table td {
        display:_block;
        text-align: left;
        padding: 10px;
        position: relative;
        padding-left: 40%;
    }
    .table td:before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 35%;
        font-weight: 600;
        color: #00f5ff;
    }
    .table td:last-child {
        border-bottom: none;
    }
    .table input[type="text"] {
        width: 100%;
        box-sizing: border-box;
    }
    .copy-icon {
        display: inline-block;
        margin-left: 5px;
    }
}