/* Manual Operations Custom Styles */

.manual-ops-page,
.manual-ops-index {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.manual-ops-header {
    margin-bottom: 30px;
}

.manual-ops-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.manual-ops-header p {
    font-size: 15px;
    color: #666;
    margin: 0;
}

/* Index Page Grid */
.manual-ops-index-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: flex-start;
}

.manual-ops-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.manual-ops-card h2 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.manual-ops-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 16px 0;
}

.manual-ops-info ul {
    margin: 0;
    padding-left: 20px;
}

.manual-ops-info ul li {
    margin-bottom: 12px;
    line-height: 1.6;
    color: #555;
}

.manual-ops-info ul li strong {
    color: #333;
}

/* Cycle Summary */
.manual-ops-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    margin-bottom: 24px;
}

.manual-ops-summary h3 {
    color: #fff;
    margin-bottom: 16px;
}

.manual-ops-summary p {
    margin: 0 0 16px 0;
    line-height: 1.8;
}

.manual-ops-summary strong {
    font-weight: 600;
}

.manual-ops-summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
}

.manual-ops-summary-stats > div {
    text-align: center;
}

.manual-ops-summary-stats strong {
    display: block;
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 4px;
}

.manual-ops-summary-stats div::after {
    content: '';
    display: block;
    font-size: 20px;
    font-weight: 700;
    margin-top: 4px;
}

/* Alert Boxes */
.manual-ops-alert {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 4px solid;
    font-size: 14px;
    line-height: 1.6;
}

.manual-ops-alert-success {
    background: rgba(212, 237, 218, 0.3);
    border-left-color: #28a745;
    color: #fff;
}

.manual-ops-alert-warning {
    background: rgba(248, 215, 218, 0.3);
    border-left-color: #dc3545;
    color: #fff;
}

/* Main Grid Layout */
.manual-ops-main-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
    align-items: flex-start;
}

.manual-ops-main-right .module + .module {
    margin-top: 20px;
}

/* Form Styling */
.manual-ops-card .form-row {
    margin-bottom: 20px;
}

.manual-ops-card .form-row label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.manual-ops-card .form-row select,
.manual-ops-card .form-row input[type="text"],
.manual-ops-card .form-row input[type="tel"] {
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.manual-ops-card .form-row select:focus,
.manual-ops-card .form-row input[type="text"]:focus,
.manual-ops-card .form-row input[type="tel"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.manual-ops-card .form-row .help {
    margin: 6px 0 0 0;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* Custom searchable dropdown */
.manual-ops-select-wrapper {
    position: relative;
    max-width: 100%;
    width: 100%;
}

.manual-ops-select-display {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px 12px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    width: 100%;
}

.manual-ops-select-wrapper.is-open .manual-ops-select-display {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.manual-ops-select-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    margin-right: 8px;
}

.manual-ops-select-arrow {
    font-size: 10px;
    color: #666;
}

.manual-ops-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 280px;
    display: none;
    z-index: 1000;
}

.manual-ops-select-wrapper.is-open .manual-ops-select-dropdown {
    display: block;
}

/* Salesman dropdown still behaves like a popup, but anchored under the field
   (no fullscreen overlay, just a larger scrollable panel). */
.manual-ops-select-wrapper--modal .manual-ops-select-dropdown {
    max-height: 360px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.manual-ops-select-dropdown-inner {
    background: #fff;
    max-height: 360px;
    display: flex;
    flex-direction: column;
}

.manual-ops-select-search {
    width: 100%;
    border: none;
    border-bottom: 1px solid #eee;
    padding: 8px 10px;
    font-size: 13px;
    box-sizing: border-box;
}

.manual-ops-select-search:focus {
    outline: none;
}

.manual-ops-select-options {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 230px;
    overflow-y: auto;
}

.manual-ops-select-options li {
    padding: 8px 10px;
    font-size: 14px;
    cursor: pointer;
}

.manual-ops-select-options li:hover {
    background: #f0f0f0;
}

.manual-ops-select-options li.is-selected {
    background: #667eea;
    color: #fff;
}

.manual-ops-select-options li.is-placeholder {
    font-style: italic;
    color: #888;
}

/* Phone Input */
.manual-ops-phone-input {
    display: inline-flex;
    align-items: stretch;
    max-width: 400px;
}

.manual-ops-phone-prefix {
    padding: 10px 14px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 6px 0 0 6px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.manual-ops-phone-input input[type="tel"] {
    border-radius: 0 6px 6px 0 !important;
    border-left: none !important;
    flex: 1;
    max-width: none !important;
}

/* Submit Row */
.manual-ops-card .submit-row {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.manual-ops-card .submit-row input[type="submit"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.manual-ops-card .submit-row input[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Action Buttons */
.manual-ops-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.manual-ops-actions-row .manual-ops-action-btn {
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s, box-shadow 0.2s;
}

.manual-ops-actions-row .manual-ops-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Fieldset */
.manual-ops-card fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .manual-ops-main-grid {
        grid-template-columns: 1fr;
    }
    
    .manual-ops-index-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .manual-ops-page,
    .manual-ops-index {
        padding: 16px;
    }
    
    .manual-ops-card {
        padding: 20px;
    }
    
    .manual-ops-summary-stats {
        grid-template-columns: 1fr 1fr;
    }
}
