/* Device Plugin Styles
---------------------------------------------- */

/* Global Styles */
.device-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Alert Messages */
.device-alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
}

.device-alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.device-alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.device-alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.device-alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* Device List Table */
.device-table-wrapper {
    overflow-x: auto;
    margin: 20px 0;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #eee;
}

.device-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.device-table thead tr {
    background-color: #fafafa;
    border-bottom: 1px solid #eee;
}

.device-table th {
    padding: 15px 12px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.device-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.device-table tbody tr:hover {
    background-color: #fafafa;
}

/* Status Badges */
.device-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.device-status-active {
    background-color: #d4edda;
    color: #155724;
}

.device-status-inactive {
    background-color: #fff3cd;
    color: #856404;
}

.device-status-cancelled {
    background-color: #f8d7da;
    color: #721c24;
}

.device-status-pending {
    background-color: #e2e3e5;
    color: #383d41;
}

/* Cards */
.device-card {
    background: white;
    border-radius: 4px;
    border: 1px solid #eee;
    overflow: hidden;
}

.device-card-header {
    background-color: #fafafa;
    border-bottom: 1px solid #eee;
    padding: 15px 20px;
    font-weight: 600;
    color: #333;
}

.device-card-body {
    padding: 20px;
}

/* BUTTONS - Theme Matching - NO TEXT DECORATION EVER */
button,
input[type="button"],
input[type="reset"],
input[type="submit"],
.device-btn,
.button,
.widget a.button,
.report-btn,
.submit-btn,
.back-btn,
.social-btn {
    display: inline-block;
    padding: 10px 20px;
    margin: 4px;
    border-radius: 4px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    border: 1px solid;
    transition: all 0.2s ease;
    text-decoration: none !important;
    font-weight: 600 !important;
}

button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover,
.device-btn:hover,
.button:hover,
.widget a.button:hover,
.report-btn:hover,
.submit-btn:hover,
.back-btn:hover,
.social-btn:hover {
    text-decoration: none !important;
}

/* Primary Buttons */
.device-btn-primary,
button,
input[type="button"],
input[type="reset"],
input[type="submit"],
.button,
.widget a.button {
    background-color: #ff7f50;
    border-color: #ff7f50;
    color: #2e2e2e;
    font-weight: 600 !important;
} 

.device-btn-primary:hover,
button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover,
.button:hover,
.widget a.button:hover {
    background-color: #e66637;
    border-color: #e66637;
    color: #2e2e2e;
    font-weight: 600 !important;
}

/* Success Buttons */
.device-btn-success {
    background-color: #ff7f50;
    border-color: #ff7f50;
    color: #2e2e2e;
}

.device-btn-success:hover {
    background-color: #e66637;
    border-color: #e66637;
    color: #2e2e2e;
}

/* Danger Buttons */
.device-btn-danger {
    background-color: #f20a32;
    border-color: #f20a32;
    color: #fff;
}

.device-btn-danger:hover {
    background-color: #c4082a;
    border-color: #c4082a;
    color: #fff;
}

/* Secondary Buttons */
.device-btn-secondary,
.back-btn {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff !important;
}

.device-btn-secondary:hover,
.back-btn:hover {
    background-color: #5a6268;
    border-color: #5a6268;
    color: #fff !important;
}

/* Report Button */
.report-btn {
    background-color: #ff7f50;
    border-color: #ff7f50;
    color: #2e2e2e;
    font-size: 14px;
    padding: 12px 28px;
    font-weight: 600;
}

.report-btn:hover {
    background-color: #e66637;
    border-color: #e66637;
    color: #2e2e2e;
}

/* Submit Button */
.submit-btn {
    background-color: #ff7f50;
    border-color: #ff7f50;
    color: #2e2e2e;
}

.submit-btn:hover {
    background-color: #e66637;
    border-color: #e66637;
    color: #2e2e2e;
}

/* Social Buttons - Keep brand colors but maintain uppercase and no decoration */
.social-btn {
    font-size: 12px;
    padding: 8px 18px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.social-btn:hover {
    transform: translateY(-2px);
}

.social-btn.whatsapp { 
    background-color: #25D366; 
    border-color: #25D366; 
    color: white; 
}

.social-btn.whatsapp:hover { 
    background-color: #1da851; 
    border-color: #1da851; 
    color: white; 
}

.social-btn.instagram { 
    background-color: #E1306C; 
    border-color: #E1306C; 
    color: white; 
}

.social-btn.instagram:hover { 
    background-color: #c11d54; 
    border-color: #c11d54; 
    color: white; 
}

.social-btn.facebook { 
    background-color: #1877F2; 
    border-color: #1877F2; 
    color: white; 
}

.social-btn.facebook:hover { 
    background-color: #0e5dc2; 
    border-color: #0e5dc2; 
    color: white; 
}

/* Forms */
.device-form {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 4px;
    border: 1px solid #eee;
}

.device-form-group {
    margin-bottom: 20px;
}

.device-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.device-form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    background: white;
}

.device-form-control:focus {
    outline: none;
    border-color: #ff7f50;
    box-shadow: 0 0 0 2px rgba(255,127,80,0.1);
}

select.device-form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

textarea.device-form-control {
    resize: vertical;
    min-height: 100px;
}

.device-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.device-form-col {
    flex: 1;
    min-width: 200px;
}

/* Pagination */
.device-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 30px 0;
}

.device-pagination a,
.device-pagination span {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 4px;
    text-decoration: none !important;
    font-size: 14px;
    transition: all 0.2s ease;
}

.device-pagination a {
    background: white;
    color: #ff7f50;
    border: 1px solid #eee;
}

.device-pagination a:hover {
    background: #ff7f50;
    color: #2e2e2e;
    border-color: #ff7f50;
    text-decoration: none !important;
}

.device-pagination .current {
    background: #ff7f50;
    color: #2e2e2e;
    border-color: #ff7f50;
}

/* Device ID Box */
.device-id-box {
    font-family: 'Courier New', monospace;
    background: #fafafa;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    border: 1px solid #eee;
    display: inline-block;
}

/* Stat Cards */
.device-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.device-stat-card {
    background: white;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    border: 1px solid #eee;
    transition: transform 0.2s ease;
}

.device-stat-card:hover {
    transform: translateY(-2px);
}

.device-stat-number {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #ff7f50;
}

.device-stat-label {
    color: #666;
    font-size: 14px;
}

/* Checkbox Styling */
.device-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.device-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ============================================
   PROFILE PAGE SPECIFIC STYLES (Registered.php)
   ============================================ */

/* Profile Hero Section */
.profile-hero {
    text-align: center;
    background-color: #fafafa;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 40px 20px;
    margin-bottom: 30px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 50%;
    border: 4px solid #ff7f50;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-hero h1 {
    margin: 0 0 10px;
    font-size: 28px;
    color: #333;
}

.device-badge {
    display: inline-block;
    background: white;
    border: 1px solid #eee;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
}

/* Contact, Description, Social Sections */
.contact-section,
.description-section,
.social-section {
    background: white;
    border-radius: 4px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid #eee;
}

.contact-section h3,
.description-section h3,
.social-section h3 {
    margin: 0 0 20px;
    font-size: 18px;
    color: #333;
    border-bottom: 2px solid #ff7f50;
    padding-bottom: 10px;
    display: inline-block;
}

/* Contact Grid */
.contact-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    padding: 8px 0;
    border-bottom: 1px solid #fafafa;
}

.contact-label {
    width: 80px;
    font-weight: 600;
    color: #666;
}

.contact-value {
    color: #333;
    font-family: monospace;
    font-size: 14px;
}

/* Description Content */
.description-content {
    background: #fafafa;
    padding: 20px;
    border-radius: 4px;
    line-height: 1.6;
    color: #555;
    font-size: 15px;
    border: 1px solid #eee;
}

/* Social Links */
.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    justify-content: center;
}

/* Owner Image */
.owner-image {
    text-align: center;
    margin-top: 20px;
}

.owner-image img {
    display: inline-block;
    max-width: 100%;
    max-height: 300px;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.owner-image img:hover {
    transform: scale(1.02);
}

/* Report Section */
.report-section {
    margin-top: 20px;
}

.report-card {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 30px;
    text-align: center;
}

.report-card h3 {
    margin: 0 0 15px;
    color: #333;
}

.report-card p {
    color: #666;
    margin-bottom: 20px;
}

/* Contact Form (inside report card) */
#contactForm {
    margin-top: 25px;
    text-align: left;
    background: white;
    padding: 20px;
    border-radius: 4px;
    border: 1px solid #eee;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #ff7f50;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.checkbox-group input {
    width: 18px;
    height: 18px;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .device-container {
        padding: 10px;
    }
    
    .device-form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .device-table th,
    .device-table td {
        padding: 8px;
        font-size: 12px;
    }
    
    .device-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    button,
    input[type="button"],
    input[type="reset"],
    input[type="submit"],
    .device-btn,
    .button,
    .report-btn,
    .submit-btn {
        padding: 8px 14px;
        font-size: 11px;
    }
    
    .profile-hero {
        padding: 30px 15px;
    }
    
    .profile-hero h1 {
        font-size: 22px;
    }
    
    .contact-item {
        flex-direction: column;
        gap: 4px;
    }
    
    .contact-label {
        width: auto;
    }
    
    .social-btn {
        padding: 8px 14px;
        font-size: 10px;
    }
    
    .report-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .device-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }

/* Back Link */
.back-link {
    text-align: center;
    margin-top: 32px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #6c757d;
    border: 1px solid #6c757d;
    color: #fff;
    text-decoration: none !important;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background-color: #5a6268;
    border-color: #5a6268;
    color: #fff;
    text-decoration: none !important;
}

.back-btn i,
.back-btn .fa,
.back-btn .fas {
    font-size: 14px;
}

/* Cancelled Device Page */
.device-alert i,
.device-alert .fas,
.device-alert .far {
    margin-right: 8px;
}

.device-card a {
    color: #ff7f50;
    transition: color 0.2s ease;
}

.device-card a:hover {
    color: #e66637;
    text-decoration: underline;
}

/* Toast Notifications */
.device-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    min-width: 300px;
    max-width: 400px;
    padding: 15px 20px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    animation: slideInRight 0.3s ease-out;
    cursor: pointer;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.device-toast-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.device-toast-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.device-toast-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.device-toast-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.device-toast-title {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 15px;
}

.device-toast-message {
    font-size: 13px;
}

.device-toast-close {
    float: right;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    margin-left: 10px;
}

.device-toast-close:hover {
    opacity: 1;
}

/* Responsive */
@media (max-width: 600px) {
    .device-toast {
        left: 20px;
        right: 20px;
        min-width: auto;
        max-width: none;
    }
}

/* Registration Page Specific */
.device-icon-wrapper {
    text-align: center;
    margin-bottom: 20px;
}

.device-icon-wrapper img {
    display: inline-block;
    height: 200px;
    width: auto;
}

.device-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
}

.device-id-wrapper {
    text-align: center;
    margin-bottom: 20px;
}

.device-id-box {
    display: inline-block;
    font-family: 'Courier New', monospace;
    background: #fafafa;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 13px;
    border: 1px solid #eee;
}

/* Description Content HTML Styling */
.description-content {
    background: #fafafa;
    padding: 20px;
    border-radius: 4px;
    line-height: 1.6;
    color: #555;
    font-size: 15px;
    border: 1px solid #eee;
}

.description-content p {
    margin-bottom: 12px;
}

.description-content p:last-child {
    margin-bottom: 0;
}

.description-content strong,
.description-content b {
    font-weight: 700;
    color: #333;
}

.description-content em,
.description-content i {
    font-style: italic;
}

.description-content a {
    color: #ff7f50;
    text-decoration: none;
}

.description-content a:hover {
    text-decoration: underline;
}

.description-content ul,
.description-content ol {
    margin: 10px 0 10px 20px;
}

.description-content li {
    margin-bottom: 5px;
}

.description-content h1,
.description-content h2,
.description-content h3,
.description-content h4,
.description-content h5,
.description-content h6 {
    margin: 15px 0 10px;
    color: #333;
}

.description-content h1 { font-size: 24px; }
.description-content h2 { font-size: 20px; }
.description-content h3 { font-size: 18px; }
.description-content h4 { font-size: 16px; }
.description-content h5 { font-size: 14px; }
.description-content h6 { font-size: 13px; }

.description-content blockquote {
    margin: 10px 0;
    padding: 10px 20px;
    border-left: 4px solid #ff7f50;
    background: #fff;
    font-style: italic;
}

.description-content code,
.description-content pre {
    background: #eee;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 13px;
}

.description-content pre {
    padding: 10px;
    overflow-x: auto;
}

.description-content hr {
    margin: 15px 0;
    border: none;
    border-top: 1px solid #eee;
}

.description-content img {
    max-width: 100%;
    height: auto;
}

/* Image Modal Styles */
.image-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow: auto;
}

.image-modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 8px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

#imageModalCaption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 60px;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 1000000;
}

.image-modal-close:hover,
.image-modal-close:focus {
    color: #ff7f50;
    text-decoration: none;
    cursor: pointer;
}

/* Modal Animation */
.image-modal-content {
    animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
    from {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 700px) {
    .image-modal-content {
        max-width: 95%;
        max-height: 80%;
    }
    
    .image-modal-close {
        top: 15px;
        right: 20px;
        font-size: 35px;
    }
}