/* ==========================================================================
   GLOBAL / CONTAINER
   ========================================================================== */
.hm-container {
    font-family: Arial, sans-serif;
    max-width: 100%;
    margin: 0;
    background: #f5f5f5;
}

.hm-container {
    margin-top: 20px; /* clean start without old header */
}

/* ==========================================================================
   TRIAL BANNER (above menu or dashboard)
   ========================================================================== */
.hm-trial-banner {
    background: #ffc107;
    color: #333;
    text-align: center;
    padding: 12px 0;
    font-weight: bold;
    border-bottom: 1px solid #e0a800;
}

/* ==========================================================================
   HEADER CONTROLS WIDGET (New Job, Search, Notifications, User)
   ========================================================================== */
.hm-dashboard-header-widget {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.hm-header-controls {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    background: #2c2c2c;
    color: white;
    padding: 10px 15px;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.hm-new-job {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 9px 18px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.hm-new-job:hover {
    background: #45a049;
}

.hm-search {
    flex: 1;
    max-width: 320px;
    min-width: 180px;
}

.hm-search input {
    width: 100%;
    padding: 9px 14px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    background: #444;
    color: white;
}

.hm-search input::placeholder {
    color: #aaa;
}

.hm-notifications {
    font-size: 1.5em;
    cursor: pointer;
    padding: 6px;
    line-height: 1;
}

.hm-user {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    white-space: nowrap;
}

/* Hide widget title if present */
.hm-dashboard-header-widget .widget-title {
    display: none;
}

/* Reset margins inside controls */
.hm-header-controls * {
    margin: 0;
}

/* Mobile fallback */
@media (max-width: 768px) {
    .hm-header-controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
        padding: 12px;
    }
    .hm-search {
        order: 1;
        width: 100%;
        max-width: none;
    }
    .hm-new-job {
        order: 2;
    }
}

/* ==========================================================================
   DASHBOARD LAYOUT (main content after header)
   ========================================================================== */
.hm-main {
    display: flex;
    height: calc(100vh - 140px);
}

.hm-left-panel {
    width: 220px;
    background: #fff;
    border-right: 1px solid #ddd;
    padding: 10px;
}

.hm-actions,
.hm-queues,
.hm-staff-members {
    margin-bottom: 20px;
}

.hm-action-btns button {
    display: block;
    width: 100%;
    margin: 6px 0;
    padding: 8px;
}

.hm-schedule {
    flex: 1;
    padding: 10px;
    background: white;
}

.hm-tabs button {
    margin-right: 8px;
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: #f0f0f0;
}

.hm-tabs .active {
    background: #4caf50;
    color: white;
    border-color: #4caf50;
}

.hm-date-nav {
    margin: 10px 0;
    font-weight: bold;
}

.hm-timeline-grid {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 4px;
}

.hm-time-labels div {
    text-align: right;
    padding: 8px 0;
    font-size: 0.85em;
}

.hm-staff-row {
    display: contents;
}

.hm-staff-name {
    padding: 8px;
    font-weight: bold;
    background: #f9f9f9;
}

.hm-grid-cells {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2px;
    height: 60px;
}

.hm-grid-cells > div {
    border: 1px solid #eee;
    position: relative;
}

.hm-job-block {
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    padding: 6px;
    border-radius: 4px;
    font-size: 0.9em;
    overflow: hidden;
}

.hm-right-panel {
    width: 320px;
    background: #fff;
    border-left: 1px solid #ddd;
    padding: 10px;
}

.hm-jobs-header {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.hm-job-item {
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}

.hm-footer {
    background: #e0e0e0;
    padding: 8px;
    text-align: center;
}

/* ==========================================================================
   TRIAL / SIGNUP FORM (ServiceM8 style)
   ========================================================================== */
.hm-trial-container {
    max-width: 500px;
    margin: 40px auto;
    padding: 40px 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.hm-trial-header {
    background: #333;
    color: white;
    padding: 15px;
    margin: -40px -30px 30px -30px;
    border-radius: 8px 8px 0 0;
}

.hm-trial-logo {
    font-size: 28px;
    font-weight: bold;
}

.hm-trial-logo .green {
    color: #4CAF50;
}

.hm-trial-title {
    font-size: 32px;
    margin: 20px 0 10px;
    color: #333;
}

.hm-trial-subtitle {
    color: #666;
    margin-bottom: 30px;
}

.hm-trial-form .field-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.hm-trial-form input[type="text"],
.hm-trial-form input[type="email"],
.hm-trial-form input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.hm-trial-form .full {
    flex: 1 1 100%;
}

.hm-trial-form button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 16px;
    font-size: 18px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    margin: 20px 0 10px;
}

.hm-trial-legal {
    font-size: 13px;
    color: #777;
    margin: 15px 0;
}

.hm-trial-legal a {
    color: #4CAF50;
    text-decoration: none;
}

.hm-trial-or {
    margin: 20px 0;
    color: #aaa;
    position: relative;
}

.hm-trial-or::before,
.hm-trial-or::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: #ddd;
}

.hm-trial-or::before { left: 0; }
.hm-trial-or::after  { right: 0; }

.hm-trial-xero {
    background: white;
    border: 1px solid #ddd;
    color: #333;
    padding: 12px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* ==========================================================================
   MISC / CLEANUP
   ========================================================================== */
.wp-block-post-title {
    display: none;
}

/* Hide any leftover old top bars */
.sm8-top-bar,
.hm-top-bar {
    display: none !important;
}