/* Dweetr Dashboard - Unified CSS */
/* Color Palette: #65a6ce (headers), #4db8ff (borders) */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f7fa;
    color: #333;
    margin: 0;
    padding: 0;
}

/* Main content containers */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.section {
    margin-bottom: 40px;
}

.section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

/* Headers */
.header {
    background: #65a6ce;
    color: white;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 10px;
    margin-bottom: 30px;
}

.header h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-right {
    display: flex;
    gap: 15px;
    align-items: center;
    font-size: 14px;
    opacity: 0.9;
}

.logout-link {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    background: rgba(255,255,255,0.2);
    border-radius: 6px;
    transition: background 0.2s;
}

.logout-link:hover {
    background: rgba(255,255,255,0.3);
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 14px;
}

.nav-link:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

/* Buttons */
.btn-primary {
    background: #65a6ce;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(101, 166, 206, 0.3);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: #65a6ce;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(101, 166, 206, 0.3);
}

/* Cards */
.card {
    background: white;
    border: 2px solid #4db8ff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(77, 184, 255, 0.3);
}

/* Stat Cards */
.stat-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 2px solid #4db8ff;
    text-align: center;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #65a6ce;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Dashboard Cards */
.dashboard-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 2px solid #4db8ff;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.dashboard-card:hover {
    border-color: #65a6ce;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(77, 184, 255, 0.3);
}

.dashboard-card.create-new {
    border: 2px solid #65a6ce;
    color: #65a6ce;
}

.dashboard-card h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
}

.dashboard-card p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Thing Cards */
.thing-card {
    background: white;
    border: 2px solid #4db8ff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.thing-card:hover {
    border-color: #65a6ce;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(77, 184, 255, 0.2);
}

/* Widget Styles */
.widget {
    background: white;
    border: 2px solid #4db8ff;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
}

.widget-container {
    position: relative;
    background: white;
    border: 2px solid #4db8ff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.widget-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: white;
    background: #65a6ce;
    padding: 8px 12px;
    margin: -15px -15px 10px -15px;
    border-radius: 6px 6px 0 0;
}

/* Top Bar */
.top-bar {
    background: #65a6ce;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px;
    margin-bottom: 20px;
    color: white;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.top-bar-right {
    display: flex;
    gap: 10px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #4db8ff;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #65a6ce;
}

/* Grids */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dashboards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.things-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

/* Thing-specific Styles */
.thing-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    word-break: break-word;
}

.thing-badges {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-locked {
    background: #ffe0e0;
    color: #c00;
}

.badge-grouped {
    background: #e0f0ff;
    color: #0066cc;
}

.thing-data {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    margin-top: 15px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    max-height: 150px;
    overflow-y: auto;
}

.no-data {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.thing-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    text-decoration: none;
    border: 2px solid #4db8ff;
    background: white;
    color: #65a6ce;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-small:hover {
    background: #65a6ce;
    color: white;
    border-color: #65a6ce;
}

/* Dashboard-specific Styles */
.dashboard-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.dashboard-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.dashboard-date {
    font-size: 12px;
    color: #999;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* Loading States */
.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #65a6ce;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Things Section */
.things-section {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 2px solid #4db8ff;
}

/* Thing Keys Section */
.thing-keys-section {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 2px solid #4db8ff;
    margin-bottom: 30px;
}

.keys-header {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

.keys-header:hover {
    background-color: #f8f9fa;
}

.keys-toggle {
    font-size: 18px;
    transition: transform 0.2s;
}

.keys-content {
    padding: 20px;
}

.keys-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.keys-grid {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
}

.key-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    transition: border-color 0.2s;
}

.key-card:hover {
    border-color: #4db8ff;
}

.key-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.key-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.key-actions {
    display: flex;
    gap: 5px;
}

.key-action-btn {
    background: #4db8ff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.key-action-btn:hover {
    background: #65a6ce;
}

.key-action-btn.delete {
    background: #dc3545;
}

.key-action-btn.delete:hover {
    background: #c82333;
}

.key-value {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    padding: 8px 12px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    word-break: break-all;
}

.hidden-key {
    color: #999;
    letter-spacing: 2px;
}

.visible-key {
    color: #333;
    font-weight: 500;
}

.no-keys {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
}

.add-key-section {
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
}

.add-key-section h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
}

.add-key-form {
    display: grid;
    gap: 15px;
}

.input-group {
    display: grid;
    gap: 5px;
}

.input-group label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.input-group input {
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: #4db8ff;
}

.input-group input::placeholder {
    color: #adb5bd;
}

/* User Dashboard Template Specific */
.user-dashboard-logo {
    font-size: 24px;
    font-weight: 700;
}

.user-dashboard-user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-dashboard-user-email {
    font-size: 14px;
    opacity: 0.9;
}

.user-dashboard-btn-logout {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s;
}

.user-dashboard-btn-logout:hover {
    background: rgba(255,255,255,0.3);
}

.user-dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

.user-dashboard-section-header {
    margin-bottom: 20px;
}

.user-dashboard-section-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.user-dashboard-thing-header {
    margin-bottom: 10px;
}

/* Dashboard Builder Specific */
.builder-container {
    height: 100vh;
    display: flex;
    overflow: hidden;
}

.sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid #4db8ff;
    overflow-y: auto;
    padding: 20px;
}

.canvas-area {
    flex: 1;
    background: #f5f7fa;
    overflow: auto;
    position: relative;
}

.dashboard-builder-body {
    height: 100vh;
    overflow: hidden;
}

/* Dashboard Builder Widgets */
.widget-list {
    list-style: none;
    padding: 0;
}

.widget-list li {
    padding: 10px;
    margin: 5px 0;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.widget-list li:hover {
    background: #4db8ff;
    color: white;
    transform: translateY(-1px);
}

.config-panel {
    background: white;
    border: 2px solid #4db8ff;
    border-radius: 8px;
    padding: 20px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-width: 500px;
    width: 90%;
}

.config-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.widget-container {
    position: relative;
    background: white;
    border: 2px solid #4db8ff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.widget:hover {
    border-color: #65a6ce;
    box-shadow: 0 4px 15px rgba(77, 184, 255, 0.2);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.widget-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
}

.widget-controls button {
    background: #65a6ce;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 8px;
    cursor: pointer;
    font-size: 12px;
}

.widget-controls button:hover {
    background: #4db8ff;
}

/* Dashboard Builder Form Elements */
.form-section {
    margin-bottom: 20px;
}

.form-section h3 {
    margin-bottom: 10px;
    color: #333;
    font-size: 16px;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #4db8ff;
}

/* Dashboard Builder Buttons */
.btn-widget {
    background: #4db8ff;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin: 5px;
    transition: all 0.2s;
}

.btn-widget:hover {
    background: #65a6ce;
    transform: translateY(-1px);
}

.btn-save {
    background: #28a745;
    color: white;
}

.btn-save:hover {
    background: #218838;
}

.btn-view {
    background: #17a2b8;
    color: white;
    margin-right: 10px;
}

.btn-view:hover {
    background: #138496;
}

/* Login Page Specific */
.login-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
    width: 100%;
    max-width: 400px;
}

.login-header {
    background: #65a6ce;
    color: white;
    padding: 40px 20px;
    text-align: center;
}

.login-form {
    padding: 40px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    background: #f8f9fa;
}

.form-control:focus {
    outline: none;
    border-color: #65a6ce;
    background: white;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

.create-new-btn {
    display: inline-block;
    margin-bottom: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-grid,
    .dashboards-grid {
        grid-template-columns: 1fr;
    }
    
    .top-bar {
        flex-direction: column;
        gap: 15px;
    }
    
    .top-bar-left,
    .top-bar-right {
        width: 100%;
        justify-content: center;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .things-grid,
    .dashboards-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .builder-container {
        flex-direction: column;
        height: auto;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #4db8ff;
    }
    
    .main-content {
        padding: 10px;
    }
}

/* ===========================================
   UTILITY CLASSES TO REPLACE INLINE STYLES
   =========================================== */

/* Common message boxes */
.auth-required-message,
.redirect-message {
    text-align: center;
    padding: 40px;
}

.error-message {
    text-align: center;
    padding: 40px;
    background: white;
    border: 2px solid #dc3545;
    color: #dc3545;
    margin: 20px 0;
}

.success-message {
    background: white;
    padding: 20px;
    margin: 20px 0;
    border: 3px solid #28a745;
}

.success-message h2 {
    color: #28a745;
    margin-top: 0;
}

/* Common layout utilities */
.center-content {
    text-align: center;
}

.info-box-margin {
    margin-top: 15px;
}

.flex-header {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.flex-header h3 {
    margin: 0;
}

.flex-header-right {
    margin-left: auto;
    text-align: right;
}

/* Table styles */
.dweets-table {
    border-collapse: collapse;
    width: 100%;
}

.dweets-table tr {
    border-bottom: 1px solid #ddd;
}

.dweets-table th,
.dweets-table td {
    text-align: left;
    padding: 8px;
}

/* Modal styles */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background: #fff;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 400px;
}

/* API tester styles */
.api-tester-container {
    font-family: sans-serif;
    max-width: 800px;
}

.api-tester-form {
    margin-bottom: 20px;
}

.api-response-pre {
    background: #f4f4f4;
    padding: 10px;
    border: 1px solid #ddd;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Form utilities */
.form-row {
    margin-bottom: 15px;
}

.form-input-full {
    width: 100%;
    max-width: 300px;
}

.form-input-wide {
    width: 100%;
    max-width: 600px;
}

/* Dashboard card utilities */
.dashboard-card-create {
    border: 2px dashed #667eea !important;
    color: #667eea !important;
}

.dashboard-card-title {
    font-weight: 600;
}

.dashboard-card-subtitle {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

/* Content display utilities */
.empty-state {
    text-align: center;
    margin-bottom: 20px;
}

.thing-content-meta {
    color: #666;
    font-size: 11px;
    margin-bottom: 8px;
}

.thing-content-data {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.no-data-message {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
}

.error-loading-message {
    text-align: center;
    color: #999;
    padding: 20px;
}

/* Hidden utility */
.hidden {
    display: none;
}

/* Raw view */
.raw-view {
    display: none;
}

.raw-view.active {
    display: block !important;
}

/* Spacing utilities */
.ml-10 {
    margin-left: 10px;
}

.mt-15 {
    margin-top: 15px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* ===========================================
   LOGIN FORM STYLES (from shortcode-login.php)
   =========================================== */

.dweetr-login-container {
    max-width: 450px;
    margin: 40px auto;
    padding: 40px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.dweetr-logo {
    text-align: center;
    margin-bottom: 30px;
}

.dweetr-logo h2 {
    color: #667eea;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.dweetr-logo p {
    color: #666;
    font-size: 14px;
}

.dweetr-form-group {
    margin-bottom: 20px;
}

.dweetr-form-group label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.dweetr-form-group input[type="email"],
.dweetr-form-group input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.dweetr-form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.dweetr-help-text {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.dweetr-btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.dweetr-btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.dweetr-alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.dweetr-alert-error {
    background: #fee;
    color: #c00;
    border: 1px solid #fcc;
}

.dweetr-alert-success {
    background: #efe;
    color: #060;
    border: 1px solid #cfc;
}

.dweetr-info-box {
    background: #f7fafc;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    margin-top: 20px;
}

.dweetr-info-box h3 {
    margin-top: 0;
    color: #4a5568;
}

.dweetr-info-box p {
    margin-bottom: 0;
    color: #718096;
}

/* ===========================================
   FOLLOW PAGE STYLES (from shortcodes.php)
   =========================================== */

.iotd-follow-page {
    font-family: Arial, sans-serif;
    margin: 20px auto;
    background: #f7f7f7;
    padding: 20px;
    max-width: 1200px;
    overflow: hidden;
}

.iotd-follow-page h1 {
    margin-bottom: 10px;
}

.iotd-follow-page .tab-navigation {
    text-align: center;
    margin: 15px 0;
    padding: 0;
}

.iotd-follow-page .tab-btn {
    background: #f7f7f7;
    border: none;
    padding: 10px 30px;
    font-size: 1.1em;
    cursor: pointer;
    margin: 0 5px;
    border-radius: 4px;
    transition: all 0.2s;
}

.iotd-follow-page .tab-btn.active {
    background: #fff;
    border-bottom: 2px solid #2196f3;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.iotd-follow-page .chart-div {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Follow page card styling */
.iotd-follow-page .thing-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    word-wrap: break-word;
}

.iotd-follow-page .thing-card h3 {
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    font-size: 1.2em;
    word-break: break-word;
}

/* Chart responsiveness */
.iotd-follow-page .chart-div canvas {
    max-width: 100% !important;
    height: auto !important;
    max-height: 300px !important;
}

/* Field display in cards */
.iotd-follow-page .field-display {
    padding: 8px;
    margin: 5px 0;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #667eea;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.iotd-follow-page .field-name {
    font-weight: bold;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 3px;
}

.iotd-follow-page .field-value {
    font-size: 1.1em;
    color: #333;
    word-break: break-all;
}

/* Dropdown styling */
.iotd-follow-page select {
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    max-width: 100%;
}

/* Text content overflow handling */
.iotd-follow-page pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    overflow-x: auto;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

/* Raw view specific styling */
.iotd-follow-page #rawJson {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    font-family: "Courier New", "Monaco", "Consolas", monospace;
    font-size: 12px;
    line-height: 1.4;
    max-height: 600px;
    overflow-y: auto;
    color: #333;
}

/* Additional dashboard utility classes */
.dweetr-dashboard-title {
    margin: 0;
    font-size: 24px;
}

.dweetr-empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.mt-40 {
    margin-top: 40px;
}

/* ===========================================
   DASHBOARD SHORTCODE STYLES (from shortcode-dashboard.php)
   =========================================== */

.dweetr-dashboard {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    max-width: 1400px;
    margin: 20px auto;
    padding: 20px;
}

.dweetr-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.dweetr-user-info {
    font-size: 14px;
    margin-right: 15px;
    opacity: 0.9;
}

.dweetr-btn-logout {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.2s;
}

.dweetr-btn-logout:hover {
    background: rgba(255,255,255,0.3);
    color: white;
    text-decoration: none;
}

.dweetr-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.dweetr-stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    border-left: 4px solid #667eea;
}

.dweetr-stat-value {
    font-size: 36px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.dweetr-stat-label {
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dweetr-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.dweetr-section-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.dweetr-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.dweetr-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
    color: white;
    text-decoration: none;
}

.dweetr-btn-small {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.dweetr-btn-small:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.dweetr-things-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.dweetr-thing-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid;
}

.dweetr-thing-card.locked {
    border-left-color: #28a745;
}

.dweetr-thing-card.unlocked {
    border-left-color: #ffc107;
}

.dweetr-thing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.dweetr-thing-name {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #333;
}

.dweetr-thing-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.dweetr-thing-status.locked {
    background: #d4edda;
    color: #155724;
}

.dweetr-thing-status.unlocked {
    background: #fff3cd;
    color: #856404;
}

.dweetr-thing-data {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    border: 1px solid #e9ecef;
    min-height: 100px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 13px;
}

.dweetr-dashboards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.dweetr-dashboard-card {
    background: white;
    border: 2px solid #eee;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
    display: block;
}

.dweetr-dashboard-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    color: #333;
    text-decoration: none;
}

.dweetr-dashboard-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.7;
}

.dweetr-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.dweetr-empty-title {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.dweetr-empty-desc {
    color: #666;
    margin-bottom: 30px;
}

.dweetr-loading {
    display: inline-block;
    animation: dweetr-spin 2s linear infinite;
}

@keyframes dweetr-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===========================================
   DASHBOARD FULL STYLES (from dashboard-full.php)
   =========================================== */

/* Note: Most styles already exist above, adding any unique ones */

.dweetr-thing-data pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}