/* Dashboard Header Styles */
.dashboard-header {
    background: #fafafa;
    padding: 1rem 2rem;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dashboard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-logo {
    height: 40px;
}

.nav-logo-link {
    display: inline-block;
    transition: opacity 0.2s ease;
}

.nav-logo-link:hover {
    opacity: 0.8;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-badge {
    background: #f7876b;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.social-icon {
    margin-left: 8px;
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-icon:hover {
    color: #f7876b;
}

.social-icon .fa-instagram:hover {
    color: #E4405F;
}

.social-icon .fa-facebook:hover {
    color: #1877F2;
}

.social-icon .fa-whatsapp:hover {
    color: #25D366;
}

.view-public-profile {
    margin: 10px 0;
}

.btn-view-public {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
    width: 100%;
}

.btn-view-public:hover {
    background: #218838;
}

.btn-view-public i {
    margin-right: 5px;
}

/* show validation hints */
.phone-hint.social-hint {
    color: #666;
    font-size: 12px;
    margin-top: 4px;
}

/* Meta Details Styles */
.meta-details {
    margin-top: 2rem;
}

.meta-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.meta-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: background-color 0.3s ease;
}

.meta-header:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.meta-header-left h3 {
    margin: 0 0 0.75rem 0;
    color: #2c3e50;
    font-size: 1.25rem;
}

.meta-basic-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.meta-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #6c757d;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.meta-info-item i {
    color: #f7876b;
}

.meta-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.meta-count-badge {
    background: linear-gradient(135deg, #f7876b 0%, #ff1452 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.meta-toggle {
    color: #6c757d;
    transition: transform 0.3s ease;
}

.meta-section.expanded .meta-toggle {
    transform: rotate(180deg);
}

.meta-content {
    display: none;
    padding: 1.5rem;
    background: #fafbfc;
}

.meta-section.expanded .meta-content {
    display: block;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.meta-card {
    background: white;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f3f4;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.meta-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.meta-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f8f9fa;
}

.meta-card-header i {
    color: #f7876b;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.meta-card-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 600;
}

.meta-card-body {
    color: #495057;
}

.meta-value {
    margin: 0;
    line-height: 1.5;
    word-break: break-word;
}

.meta-image-preview {
    text-align: center;
}

.meta-image-preview img {
    max-width: 100%;
    max-height: 150px;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s ease;
    border: 2px solid #e9ecef;
}

.meta-image-preview img:hover {
    transform: scale(1.05);
    border-color: #f7876b;
}

.meta-image-link {
    margin-top: 0.5rem;
}

.meta-file-link {
    text-align: center;
}

.meta-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #f7876b;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 2px solid #f7876b;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.meta-link:hover {
    background: #f7876b;
    color: white;
    text-decoration: none;
}

/* QR Code Styles */
.qr-code-section {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #f7876b;
}

.qr-code-section h4 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qr-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.qr-code {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.qr-image {
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 5px;
    background: white;
}

.qr-info {
    flex: 1;
    min-width: 200px;
}

.qr-url {
    margin: 0 0 1rem 0;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 0.85rem;
    word-break: break-all;
    color: #6c757d;
}

.btn-copy {
    background: #28a745;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.3s ease;
}

.btn-copy:hover {
    background: #218838;
}

.qr-unavailable {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.qr-unavailable i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #ffc107;
}

/* Responsive QR codes */
@media (max-width: 768px) {
    .qr-code {
        flex-direction: column;
        text-align: center;
    }
    
    .qr-info {
        min-width: auto;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .meta-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .meta-header-right {
        align-self: flex-end;
    }
    
    .meta-basic-info {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .meta-info-item {
        justify-content: center;
    }
    
    .meta-grid {
        grid-template-columns: 1fr;
    }
}

/* Main Content Styles */
.dashboard-main {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.page-header {
    background: linear-gradient(135deg, #f7876b 0%, #ff1452 100%);
    color: white;
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 8px 25px rgba(247, 135, 107, 0.3);
}

.page-header h1 {
    margin: 0 0 1rem 0;
    font-size: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.back-link {
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    opacity: 0.9;
}

.back-link:hover {
    opacity: 1;
}

/* Devices Grid Layout */
.devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 1200px) {
    .devices-grid {
        grid-template-columns: 1fr;
    }
}

/* Device Card Styles */
.device-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #f7876b;
    transition: all 0.3s ease;
    position: relative;
}

.device-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.device-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.device-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #282828;
    margin: 0;
}

.device-id {
    background: #e3f2fd;
    color: #1565c0;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.device-status {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.status-registered {
    background: #e8f5e8;
    color: #2e7d32;
}

.status-unregistered {
    background: #f5f5f5;
    color: #666;
}

.status-cancelled {
    background: #ffebee;
    color: #c62828;
}

.status-unknown {
    background: #fff3e0;
    color: #ef6c00;
}

.device-header-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Device Information Styles */
.device-info {
    margin: 1rem 0;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-label {
    color: #666;
    font-weight: 500;
    font-size: 0.9rem;
}

.info-value {
    color: #282828;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: right;
}

.masked-field {
    color: #999 !important;
    font-style: italic;
}

.masked-field .info-value {
    color: #999 !important;
}

.mask-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    color: #999;
    margin-left: 0.5rem;
}

.contact-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.contact-info .info-row {
    border-bottom: 1px solid #e9ecef;
}

/* No Devices State */
.no-devices {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.no-devices i {
    font-size: 3rem;
    color: #f7876b;
    margin-bottom: 1rem;
}

/* Message Styles */
.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid #c62828;
}

.success-message {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid #2e7d32;
}

/* Toggle Status Form */
.toggle-status-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.toggle-btn {
    background: #f7876b;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
}

.toggle-btn:hover {
    background: #ff1452;
    transform: translateY(-1px);
}

.toggle-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Edit Button */
.edit-btn {
    background: #4caf50;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 1rem;
    width: 100%;
}

.edit-btn:hover {
    background: #45a049;
    transform: translateY(-1px);
}

/* Edit Form Styles */
.edit-form {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-save {
    background: #4caf50;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.btn-cancel {
    background: #666;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

/* Improved Privacy Checkboxes */
.privacy-settings {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.privacy-toggle {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.privacy-toggle:hover {
    border-color: #f7876b;
    box-shadow: 0 2px 5px rgba(247, 135, 107, 0.1);
}

.privacy-toggle input[type="checkbox"] {
    display: none;
}

.privacy-toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: #333;
    flex-grow: 1;
}

.privacy-toggle-icon {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.privacy-toggle input[type="checkbox"]:checked + .privacy-toggle-label .privacy-toggle-icon {
    background: #f7876b;
    border-color: #f7876b;
}

.privacy-toggle input[type="checkbox"]:checked + .privacy-toggle-label .privacy-toggle-icon::after {
    content: '?';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.privacy-description {
    font-size: 0.8rem;
    color: #666;
    margin-left: 2rem;
}

.mask-notice {
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
    margin-top: 0.5rem;
}

/* OTP Verification Form */
.otp-verification-form {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background: #e8f5e8;
    border-radius: 8px;
    border: 1px solid #2e7d32;
}

.otp-input {
    width: 200px;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    text-align: center;
    letter-spacing: 0.5rem;
}

.btn-verify {
    background: #2e7d32;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 0.5rem;
}

.phone-hint {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
}

/* International Telephone Input */
.iti {
    width: 100%;
}

.iti__flag {
    background-image: url("https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.8/img/flags.png");
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .iti__flag {
        background-image: url("https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.8/img/flags@2x.png");
    }
}

/* Meta Details Section */
.meta-details {
    margin-top: 2rem;
}

.meta-section {
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    border-left: 4px solid #4caf50;
    overflow: hidden;
}

.meta-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.meta-header:hover {
    background-color: #f8f9fa;
}

.meta-header h3 {
    color: #282828;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.meta-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.meta-content {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.meta-section.expanded .meta-content {
    padding: 1.5rem;
    max-height: 1000px;
}

.meta-toggle {
    transition: transform 0.3s ease;
}

.meta-section.expanded .meta-toggle {
    transform: rotate(180deg);
}

.meta-type-badge {
    background: #4caf50;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.meta-card {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #f7876b;
}

.meta-card h4 {
    margin: 0 0 0.5rem 0;
    color: #282828;
    font-size: 1rem;
}

.meta-card p {
    margin: 0;
    color: #666;
    word-break: break-word;
}


/* Footer Styles */
/*
.main-footer {
    background: #f8f9fa;
    padding: 2rem;
    margin-top: 3rem;
    border-top: 1px solid #e9ecef;
}
*/
/*
.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}
*/
/*
.footer-content p {
    margin: 0.5rem 0;
    color: #;
    font-size: 0.9rem;
}
*/

/* Device Image Styles */
.device-image-container {
    text-align: center;
    margin: 15px 0;
    padding: 10px;
    border-radius: 8px;
    background: #f8f9fa;
}

.device-image-thumbnail {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 3px solid #e9ecef;
    cursor: pointer;
    transition: all 0.3s ease;
}

.device-image-thumbnail:hover {
    transform: scale(1.05);
    border-color: #f7876b;
}

.no-image-placeholder {
    width: 120px;
    height: 120px;
    background: #e9ecef;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    border: 2px dashed #dee2e6;
}

.no-image-placeholder i {
    font-size: 2rem;
}

/* Modal Styles */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    max-height: 80vh;
    object-fit: contain;
    animation: zoomIn 0.3s;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close-modal:hover {
    color: #f7876b;
}

.modal-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}

/* Loading animation */
.image-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Confirmation Modal (if needed in future) */
.confirmation-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: center;
}

.modal-btn {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

.modal-confirm {
    background: #f7876b;
    color: white;
}

.modal-cancel {
    background: #666;
    color: white;
}

/* Meta Image Preview Styles */
.meta-image-preview {
    text-align: center;
}

.meta-image-thumbnail {
    max-width: 100%;
    max-height: 150px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.meta-image-thumbnail:hover {
    transform: scale(1.05);
    border-color: #f7876b;
    box-shadow: 0 4px 12px rgba(247, 135, 107, 0.3);
}

.meta-image-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.meta-image-actions .meta-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #f7876b;
    text-decoration: none;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border: 2px solid #f7876b;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    background: white;
    cursor: pointer;
}

.meta-image-actions .meta-link:hover {
    background: #f7876b;
    color: white;
    text-decoration: none;
}

/* Image Modal Styles */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    display: block;
    margin: auto;
    max-width: 90%;
    max-height: 80%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: translate(-50%, -50%) scale(0.7); opacity: 0; }
    to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #f7876b;
}

.modal-caption {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    color: white;
    font-size: 1.1rem;
    padding: 10px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}

.modal-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    transform: translateY(-50%);
}

.nav-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: rgba(247, 135, 107, 0.8);
    transform: scale(1.1);
}

.image-loading {
    opacity: 0.5;
}

/* Loading spinner */
.modal-content.image-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #f7876b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Style for formatted description content */
.description-content {
    line-height: 1.6;
    white-space: normal;
}

.description-content p {
    margin-bottom: 1em;
}

.description-content strong {
    font-weight: bold;
    color: #333;
}

.description-content br {
    display: block;
    content: "";
    margin-bottom: 0.5em;
}

.description-content ul, 
.description-content ol {
    margin-left: 1.5em;
    margin-bottom: 1em;
}

.description-content li {
    margin-bottom: 0.5em;
}

/* Style for meta value content */
.meta-value {
    line-height: 1.5;
    white-space: normal;
    word-wrap: break-word;
}

.meta-value p {
    margin-bottom: 0.8em;
}

.meta-value strong {
    font-weight: bold;
}

.meta-value br {
    display: block;
    content: "";
    margin-bottom: 0.3em;
}

/* Meta Details Section */
.meta-details-section {
    margin-top: 20px;
    border-top: 1px solid #eaeaea;
    padding-top: 15px;
}

.meta-details-section h4 {
    color: #333;
    margin-bottom: 10px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.meta-details-section h4 i {
    transition: transform 0.3s ease;
}

.meta-details.collapsed {
    display: none;
}

.meta-details.expanded {
    display: block;
}

.meta-details.expanded + h4 i {
    transform: rotate(180deg);
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.meta-item {
    background: #f9f9f9;
    padding: 12px;
    border-radius: 5px;
    border-left: 4px solid #007bff;
}

.meta-label {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-label i {
    color: #007bff;
    width: 16px;
}

.meta-value {
    color: #666;
    word-break: break-word;
}

.meta-images {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.meta-image-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.meta-image-thumbnail:hover {
    border-color: #007bff;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
        max-height: 70%;
    }
    
    .close-modal {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }
    
    .nav-btn {
        padding: 10px 15px;
        font-size: 1.2rem;
    }
    
    .modal-caption {
        font-size: 1rem;
        bottom: 10px;
    }
}

/* No Description Style */
.info-value.no-description {
    color: #6c757d;
    font-style: italic;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-header {
        padding: 1rem;
    }
    
    .dashboard-nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .user-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .dashboard-main {
        padding: 1rem;
    }
    
    .page-header {
        padding: 1.5rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .devices-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .device-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .device-header-info {
        width: 100%;
    }
    
    .meta-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .meta-header-right {
        width: 100%;
        justify-content: space-between;
    }
}