/**
 * Coffee Client Portal - Frontend Styles
 */

/* ==========================================================================
   Variables
   ========================================================================== */
:root {
    --ccp-primary: #5D4037;
    --ccp-primary-dark: #4E342E;
    --ccp-primary-light: #8D6E63;
    --ccp-secondary: #795548;
    --ccp-accent: #D7CCC8;
    --ccp-success: #4CAF50;
    --ccp-warning: #FF9800;
    --ccp-error: #F44336;
    --ccp-text: #333333;
    --ccp-text-light: #666666;
    --ccp-border: #E0E0E0;
    --ccp-bg: #FAFAFA;
    --ccp-white: #FFFFFF;
    --ccp-shadow: 0 2px 4px rgba(0,0,0,0.1);
    --ccp-shadow-lg: 0 4px 12px rgba(0,0,0,0.15);
    --ccp-radius: 8px;
    --ccp-radius-sm: 4px;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
.ccp-client-area {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    color: var(--ccp-text);
    box-sizing: border-box;
}

/* NÃO usar seletor universal - apenas elementos específicos do plugin */
.ccp-client-area > *,
.ccp-client-area .ccp-header,
.ccp-client-area .ccp-tabs,
.ccp-client-area .ccp-tab-content,
.ccp-client-area .ccp-lot-card,
.ccp-client-area .ccp-btn,
.ccp-modal,
.ccp-modal * {
    box-sizing: border-box;
}

/* ==========================================================================
   Header
   ========================================================================== */
.ccp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--ccp-accent);
}

.ccp-welcome h2 {
    margin: 0 0 5px 0;
    color: var(--ccp-primary);
    font-size: 1.8em;
}

.ccp-welcome p {
    margin: 0;
    color: var(--ccp-text-light);
}

/* ==========================================================================
   Tabs
   ========================================================================== */
.ccp-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--ccp-border);
    padding-bottom: 0;
}

.ccp-tab {
    padding: 12px 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1em;
    color: var(--ccp-text-light);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s ease;
}

.ccp-tab:hover {
    color: var(--ccp-primary);
	background: none;
	border-bottom-color: var(--ccp-primary);
    font-weight: 600;
}

.ccp-tab.active {
    color: var(--ccp-primary);
    border-bottom-color: var(--ccp-primary);
    font-weight: 600;
}

.ccp-tab-content {
    display: none;
}

.ccp-tab-content.active {
    display: block;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.ccp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 24px 18px;
    border: none;
    border-radius: var(--ccp-radius-sm);
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    line-height: 1;
	height: 40px;
	margin-top: 10px;
}

.ccp-btn-primary {
    background: var(--ccp-primary);
    color: var(--ccp-white);
}

.ccp-btn-primary:hover {
    background: var(--ccp-primary-dark);
    color: var(--ccp-white);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(93, 64, 55, 0.2);
}

.ccp-btn-secondary {
    background: var(--ccp-secondary);
    color: var(--ccp-white);
}

.ccp-btn-secondary:hover {
    background: var(--ccp-primary);
    color: var(--ccp-white);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(121, 85, 72, 0.2);
}

.ccp-btn-success {
    background: var(--ccp-primary-light);
    color: var(--ccp-white);
}

.ccp-btn-success:hover {
    background: var(--ccp-primary);
    color: var(--ccp-white);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(141, 110, 99, 0.2);
}

.ccp-btn-outline {
    background: transparent;
    color: var(--ccp-primary);
    border: 2px solid var(--ccp-primary);
}

.ccp-btn-outline:hover {
    background: var(--ccp-primary);
    color: var(--ccp-white);
    transform: translateY(-1px);
}


/* ==========================================================================
   Lots Grid
   ========================================================================== */
.ccp-lots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.ccp-public-lots {
    display: grid;
    gap: 25px;
}

.ccp-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.ccp-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.ccp-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ==========================================================================
   Lot Card
   ========================================================================== */
.ccp-lot-card {
    background: var(--ccp-white);
    border-radius: var(--ccp-radius);
    box-shadow: var(--ccp-shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ccp-lot-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--ccp-shadow-lg);
}

.ccp-lot-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.ccp-lot-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ccp-lot-content {
    padding: 20px;
}

.ccp-lot-title {
    margin: 0 0 15px 0;
    color: var(--ccp-primary);
    font-size: 1.3em;
    font-weight: 600;
}

.ccp-lot-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.ccp-lot-detail {
    display: flex;
    flex-direction: column;
}

.ccp-lot-detail.ccp-full-width {
    grid-column: 1 / -1;
}

.ccp-label {
    font-size: 0.8em;
    color: var(--ccp-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.ccp-value {
    color: var(--ccp-text);
    font-weight: 500;
}

.ccp-value.ccp-score {
    color: var(--ccp-success);
    font-weight: 700;
    font-size: 1.1em;
}

.ccp-lot-stock {
    padding: 15px;
    background: var(--ccp-bg);
    border-radius: var(--ccp-radius-sm);
    margin-bottom: 15px;
}

.ccp-stock-info,
.ccp-price-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ccp-stock-label,
.ccp-price-label {
    color: var(--ccp-text-light);
    font-size: 0.9em;
}

.ccp-stock-value {
    font-weight: 600;
    color: var(--ccp-success);
}

.ccp-price-value {
    font-weight: 700;
    color: var(--ccp-primary);
    font-size: 1.1em;
}

.ccp-lot-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--ccp-border);
}

.ccp-lot-actions .ccp-btn {
    flex: 1;
    min-width: calc(50% - 5px);
    justify-content: center;
}

/* ==========================================================================
   Stock Badges
   ========================================================================== */
.ccp-stock-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}

.ccp-stock-available {
    background: #E8F5E9;
    color: var(--ccp-success);
}

.ccp-stock-low {
    background: #FFF3E0;
    color: var(--ccp-warning);
}

.ccp-stock-out,
.ccp-stock-unavailable {
    background: #FFEBEE;
    color: var(--ccp-error);
}

/* ==========================================================================
   Orders Table
   ========================================================================== */
.ccp-orders-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--ccp-white);
    border-radius: var(--ccp-radius);
    overflow: hidden;
    box-shadow: var(--ccp-shadow);
}

.ccp-orders-table th,
.ccp-orders-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--ccp-border);
}

.ccp-orders-table th {
    background: var(--ccp-primary);
    color: var(--ccp-white);
    font-weight: 600;
}

.ccp-orders-table tr:last-child td {
    border-bottom: none;
}

.ccp-orders-table tr:hover td {
    background: var(--ccp-bg);
}

/* ==========================================================================
   Status Badges
   ========================================================================== */
.ccp-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}

.ccp-status-pending {
    background: #FFF3E0;
    color: #E65100;
}

.ccp-status-processing {
    background: #E3F2FD;
    color: #1565C0;
}

.ccp-status-confirmed {
    background: #E8F5E9;
    color: #2E7D32;
}

.ccp-status-shipped {
    background: #F3E5F5;
    color: #7B1FA2;
}

.ccp-status-completed {
    background: #E8F5E9;
    color: var(--ccp-success);
}

.ccp-status-cancelled {
    background: #FFEBEE;
    color: var(--ccp-error);
}

/* ==========================================================================
   Modal
   ========================================================================== */
.ccp-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
}

.ccp-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ccp-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.ccp-modal-content {
    position: relative;
    background: var(--ccp-white);
    border-radius: var(--ccp-radius);
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--ccp-shadow-lg);
}

.ccp-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--ccp-text-light);
    line-height: 1;
    padding: 5px;
}

.ccp-modal-close:hover {
    color: var(--ccp-text);
}

.ccp-modal h3 {
    margin: 0 0 20px 0;
    color: var(--ccp-primary);
}

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

.ccp-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--ccp-text);
}

.ccp-form-group input[type="text"],
.ccp-form-group input[type="number"],
.ccp-form-group input[type="email"],
.ccp-form-group input[type="password"],
.ccp-form-group textarea,
.ccp-form-group select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--ccp-border);
    border-radius: var(--ccp-radius-sm);
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.ccp-form-group input:focus,
.ccp-form-group textarea:focus,
.ccp-form-group select:focus {
    outline: none;
    border-color: var(--ccp-primary);
}

.ccp-form-group input[readonly] {
    background: var(--ccp-bg);
    color: var(--ccp-text-light);
}

.ccp-help-text {
    display: block;
    margin-top: 5px;
    font-size: 0.85em;
    color: var(--ccp-text-light);
}

.ccp-radio-group {
    display: flex;
    gap: 20px;
}

.ccp-radio-group label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    cursor: pointer;
    font-weight: normal;
}

.ccp-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--ccp-border);
}

/* ==========================================================================
   Login Form
   ========================================================================== */
.ccp-login-wrapper {
    max-width: 400px;
    margin: 0 auto;
    padding: 30px;
    background: var(--ccp-white);
    border-radius: var(--ccp-radius);
    box-shadow: var(--ccp-shadow);
}

.ccp-login-title {
    text-align: center;
    color: var(--ccp-primary);
    margin-bottom: 25px;
}

.ccp-login-wrapper #ccp-login-form p {
    margin-bottom: 15px;
}

.ccp-login-wrapper #ccp-login-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.ccp-login-wrapper #ccp-login-form input[type="text"],
.ccp-login-wrapper #ccp-login-form input[type="password"] {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--ccp-border);
    border-radius: var(--ccp-radius-sm);
}

.ccp-login-wrapper #ccp-login-form input[type="submit"] {
    width: 100%;
    padding: 12px;
    background: var(--ccp-primary);
    color: var(--ccp-white);
    border: none;
    border-radius: var(--ccp-radius-sm);
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: background 0.3s ease;
}

.ccp-login-wrapper #ccp-login-form input[type="submit"]:hover {
    background: var(--ccp-primary-dark);
}

.ccp-login-links {
    text-align: center;
    margin-top: 15px;
}

.ccp-login-links a {
    color: var(--ccp-primary);
    text-decoration: none;
}

.ccp-login-links a:hover {
    text-decoration: underline;
}

.ccp-logged-in {
    text-align: center;
    padding: 30px;
    background: var(--ccp-white);
    border-radius: var(--ccp-radius);
    box-shadow: var(--ccp-shadow);
}

/* ==========================================================================
   Lot Full Template
   ========================================================================== */
.ccp-lot-full {
    background: var(--ccp-white);
    border-radius: var(--ccp-radius);
    box-shadow: var(--ccp-shadow);
    overflow: hidden;
}

.ccp-lot-header {
    display: flex;
    gap: 30px;
    padding: 30px;
    background: var(--ccp-primary);
    color: var(--ccp-white);
}

.ccp-lot-image-large {
    width: 300px;
    height: 200px;
    border-radius: var(--ccp-radius);
    overflow: hidden;
    flex-shrink: 0;
}

.ccp-lot-image-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ccp-lot-title-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ccp-lot-full .ccp-lot-title {
    color: var(--ccp-white);
    font-size: 2em;
    margin-bottom: 15px;
}

.ccp-cupping-score {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.ccp-cupping-score .ccp-score-value {
    font-size: 3em;
    font-weight: 700;
}

.ccp-cupping-score .ccp-score-label {
    font-size: 1.2em;
    opacity: 0.8;
}

.ccp-lot-body {
    padding: 30px;
}

.ccp-lot-section {
    margin-bottom: 30px;
}

.ccp-lot-section h4 {
    color: var(--ccp-primary);
    border-bottom: 2px solid var(--ccp-accent);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.ccp-lot-table {
    width: 100%;
}

.ccp-lot-table th,
.ccp-lot-table td {
    padding: 10px 15px;
    text-align: left;
    border-bottom: 1px solid var(--ccp-border);
}

.ccp-lot-table th {
    width: 40%;
    color: var(--ccp-text-light);
    font-weight: 500;
}

.ccp-sensory-profile {
    font-size: 1.1em;
    font-style: italic;
    color: var(--ccp-text);
    padding: 15px;
    background: var(--ccp-bg);
    border-radius: var(--ccp-radius-sm);
    border-left: 4px solid var(--ccp-primary);
}

.ccp-stock-section .ccp-stock-display {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.ccp-stock-display .ccp-stock-number {
    font-size: 3em;
    font-weight: 700;
    color: var(--ccp-success);
}

.ccp-stock-display .ccp-stock-unit {
    font-size: 1.2em;
    color: var(--ccp-text-light);
}

/* ==========================================================================
   Lot Compact Template
   ========================================================================== */
.ccp-lot-compact {
    padding: 15px;
    background: var(--ccp-white);
    border-radius: var(--ccp-radius);
    box-shadow: var(--ccp-shadow);
    border-left: 4px solid var(--ccp-primary);
}

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

.ccp-lot-compact .ccp-lot-title {
    margin: 0;
    font-size: 1.1em;
}

.ccp-lot-compact .ccp-score {
    background: var(--ccp-success);
    color: var(--ccp-white);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.ccp-lot-compact-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.ccp-tag {
    display: inline-block;
    padding: 3px 10px;
    background: var(--ccp-accent);
    border-radius: 15px;
    font-size: 0.85em;
    color: var(--ccp-primary-dark);
}

.ccp-lot-compact-stock {
    font-size: 0.9em;
    color: var(--ccp-text-light);
}

/* ==========================================================================
   Field Shortcode
   ========================================================================== */
.ccp-lot-field {
    display: inline;
}

.ccp-field-label {
    color: var(--ccp-text-light);
    margin-right: 5px;
}

.ccp-field-value {
    font-weight: 500;
}

/* ==========================================================================
   Messages
   ========================================================================== */
.ccp-no-lots,
.ccp-no-orders,
.ccp-error {
    padding: 30px;
    text-align: center;
    background: var(--ccp-bg);
    border-radius: var(--ccp-radius);
    color: var(--ccp-text-light);
}

.ccp-error {
    background: #FFEBEE;
    color: var(--ccp-error);
}

/* ==========================================================================
   Loading
   ========================================================================== */
.ccp-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--ccp-border);
    border-top-color: var(--ccp-primary);
    border-radius: 50%;
    animation: ccp-spin 1s linear infinite;
}

@keyframes ccp-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Login Button / User Menu
   ========================================================================== */

/* Botão quando não está logado */
.ccp-login-button {
    display: inline-block;
    padding: 0 10px;
    background: transparent;
    color: var(--ccp-primary);
    text-decoration: none;
    font-weight: 400;
    font-size:14px;
    transition: all 0.3s ease;
    border-radius:5px;
    font-family: "Racing Sans One", Sans-serif;
}

.ccp-login-button:hover {
    background: var(--ccp-primary-dark);
    color: var(--ccp-white);
    text-decoration: none;
}

/* Estilo Button - Menu quando logado */
.ccp-logged-in-menu {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.ccp-btn-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--ccp-primary);
    color: var(--ccp-white);
    text-decoration: none;
    border-radius: var(--ccp-radius-sm);
    font-weight: 500;
    transition: all 0.3s ease;
}

.ccp-btn-user:hover {
    background: var(--ccp-primary-dark);
    color: var(--ccp-white);
    text-decoration: none;
}

.ccp-user-icon {
    font-size: 16px;
}

.ccp-btn-logout {
    padding: 8px 16px;
    background: transparent;
    color: var(--ccp-text);
    text-decoration: none;
    border-radius: var(--ccp-radius-sm);
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.ccp-btn-logout:hover {
    background: var(--ccp-bg);
    color: var(--ccp-text);
    text-decoration: none;
}

/* Estilo Inline - Texto simples */
.ccp-user-info {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.ccp-user-info .ccp-user-name {
    font-weight: 600;
    color: var(--ccp-primary);
    text-decoration: none;
	font-family: "Poppins";
}

.ccp-user-info .ccp-user-name:hover {
    text-decoration: underline;
}

.ccp-user-info .ccp-separator {
    color: var(--ccp-text-light);
}

.ccp-user-info .ccp-logout-link  {
    display: inline-block;
    padding: 0 3px;
    background: transparent;
    color: var(--ccp-primary);
    text-decoration: none;
    font-weight: 400;
    font-size:14px;
    transition: all 0.3s ease;
    border-radius:5px;
    font-family: "Racing Sans One", Sans-serif;
}

.ccp-user-info .ccp-logout-link:hover {
    background: var(--ccp-primary-dark);
    color: var(--ccp-white);
    text-decoration: none;
}

/* Estilo Custom - Flexível para personalização */
.ccp-user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ccp-user-menu .ccp-user-link {
    color: var(--ccp-primary);
    text-decoration: none;
    font-weight: 600;
}

.ccp-user-menu .ccp-user-link:hover {
    text-decoration: underline;
}

.ccp-user-menu .ccp-logout {
    color: var(--ccp-text-light);
    text-decoration: none;
    font-size: 0.9em;
}

.ccp-user-menu .ccp-logout:hover {
    color: var(--ccp-text);
    text-decoration: underline;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .ccp-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .ccp-lots-grid {
        grid-template-columns: 1fr;
    }
    
    .ccp-cols-2,
    .ccp-cols-3,
    .ccp-cols-4 {
        grid-template-columns: 1fr;
    }
    
    .ccp-lot-details {
        grid-template-columns: 1fr;
    }
    
    .ccp-lot-actions .ccp-btn {
        min-width: 100%;
    }
    
    .ccp-tabs {
        flex-wrap: wrap;
    }
    
    .ccp-tab {
        flex: 1;
        min-width: calc(50% - 5px);
        text-align: center;
    }
    
    .ccp-orders-table {
        font-size: 0.9em;
    }
    
    .ccp-orders-table th,
    .ccp-orders-table td {
        padding: 8px 10px;
    }
    
    .ccp-lot-header {
        flex-direction: column;
    }
    
    .ccp-lot-image-large {
        width: 100%;
    }
    
    .ccp-modal-content {
        padding: 20px;
    }
    
    .ccp-form-actions {
        flex-direction: column;
    }
    
    .ccp-form-actions .ccp-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .ccp-client-area {
        padding: 10px;
    }
    
    .ccp-welcome h2 {
        font-size: 1.4em;
    }
    
    .ccp-lot-content {
        padding: 15px;
    }
    
    .ccp-radio-group {
        flex-direction: column;
        gap: 10px;
    }
}

/* ============================================
   ESTOQUE DO CLIENTE
   ============================================ */

/* ==========================================================================
   Stock Section (Meu Estoque)
   ========================================================================== */
.ccp-stock-section {
    margin-top: 20px;
}

.ccp-stock-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: var(--ccp-radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--ccp-shadow);
}

.ccp-stock-item:last-child {
    margin-bottom: 0;
}

.ccp-stock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--ccp-accent);
}

.ccp-stock-header h4 {
    margin: 0;
    color: var(--ccp-primary);
    font-size: 1.3em;
    font-weight: 600;
}

.ccp-stock-balance {
    text-align: right;
}

.ccp-balance-value {
    display: block;
    font-size: 2.5em;
    font-weight: 700;
    color: var(--ccp-primary);
    line-height: 1;
}

.ccp-balance-label {
    display: block;
    font-size: 0.9em;
    color: var(--ccp-text-light);
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Extrato Wrapper */
.ccp-extract-wrapper {
    margin-top: 20px;
}

.ccp-extract-wrapper h5 {
    margin: 0 0 16px 0;
    color: var(--ccp-primary);
    font-size: 1.1em;
    font-weight: 600;
}

.ccp-extract-table-wrapper {
    overflow-x: auto;
    border-radius: var(--ccp-radius-sm);
    border: 1px solid #e0e0e0;
}

.ccp-extract-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.ccp-extract-table thead {
    background: var(--ccp-primary);
    color: white;
}

.ccp-extract-table thead th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ccp-extract-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
}

.ccp-extract-table tbody tr:last-child {
    border-bottom: none;
}

.ccp-extract-table tbody tr:hover {
    background: #f8f9fa;
}

.ccp-extract-table tbody td {
    padding: 14px 12px;
    vertical-align: middle;
}

/* Movement Type Badges */
.ccp-movement-type {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
    white-space: nowrap;
}

.ccp-movement-purchase {
    background: #e3f2fd;
    color: #1976d2;
}

.ccp-movement-sale {
    background: #ffebee;
    color: #c62828;
}

.ccp-movement-admin_add {
    background: #e8f5e9;
    color: #2e7d32;
}

.ccp-movement-admin_remove {
    background: #fff3e0;
    color: #e65100;
}

.ccp-movement-initial {
    background: #f3e5f5;
    color: #7b1fa2;
}

.ccp-movement-adjustment {
    background: #fff9c4;
    color: #f57f17;
}

/* Positive/Negative Values */
.ccp-positive {
    color: #2e7d32;
    font-weight: 600;
}

.ccp-negative {
    color: #c62828;
    font-weight: 600;
}

.ccp-no-movements {
    text-align: center;
    padding: 30px;
    color: var(--ccp-text-light);
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .ccp-extract-table thead {
        display: none;
    }
    
    .ccp-extract-table tbody tr {
        display: block;
        margin-bottom: 16px;
        border: 1px solid #e0e0e0;
        border-radius: var(--ccp-radius-sm);
        background: white;
    }
    
    .ccp-extract-table tbody td {
        display: flex;
        justify-content: space-between;
        padding: 10px 12px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .ccp-extract-table tbody td:last-child {
        border-bottom: none;
    }
    
    .ccp-extract-table tbody td:before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--ccp-primary);
        margin-right: 10px;
    }
    
    .ccp-stock-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .ccp-stock-balance {
        text-align: left;
    }
}

/* Modal de Extrato */
.ccp-modal-large .ccp-modal-content {
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
}

.ccp-extract-header {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.ccp-extract-info strong {
    display: block;
    font-size: 1.2em;
    color: var(--ccp-primary);
    margin-bottom: 8px;
}

.ccp-current-balance {
    font-size: 1.5em;
    font-weight: bold;
    color: #2c5f2d;
}

.ccp-extract-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.ccp-extract-table thead {
    background: #f8f9fa;
}

.ccp-extract-table th,
.ccp-extract-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.ccp-extract-table th {
    font-weight: 600;
    color: #333;
}

.ccp-extract-table tbody tr:hover {
    background: #f8f9fa;
}

.ccp-positive {
    color: #2c5f2d;
    font-weight: 600;
}

.ccp-negative {
    color: #c62828;
    font-weight: 600;
}

.ccp-movement-type {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
}

.ccp-movement-purchase {
    background: #e8f5e9;
    color: #2c5f2d;
}

.ccp-movement-sale {
    background: #ffebee;
    color: #c62828;
}

.ccp-movement-admin_add {
    background: #e3f2fd;
    color: #1565c0;
}

.ccp-movement-admin_remove {
    background: #fff3e0;
    color: #e65100;
}

.ccp-movement-initial {
    background: #f3e5f5;
    color: #6a1b9a;
}

.ccp-movement-adjustment {
    background: #fff9c4;
    color: #f57f17;
}

/* Responsivo */
@media (max-width: 768px) {
    .ccp-stock-summary {
        grid-template-columns: 1fr;
    }
    
    .ccp-extract-table {
        font-size: 0.9em;
    }
    
    .ccp-extract-table thead {
        display: none;
    }
    
    .ccp-extract-table tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 10px;
    }
    
    .ccp-extract-table td {
        display: block;
        text-align: right;
        padding: 8px;
        border: none;
    }
    
    .ccp-extract-table td:before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
        color: #666;
    }
}

.page-id-2 .page-header {
	padding-top: 15px;
}
.page-id-2 .page-header .entry-title {
    font-family: "Poppins";
    font-weight:600;
}
/* ===== ESTOQUE: TOTAL VS DISPONÍVEL ===== */
.ccp-stock-summary {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.ccp-balance-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 18px;
    border-radius: 8px;
    min-width: 110px;
    text-align: center;
}

.ccp-balance-total {
    background: #f5f0eb;
    border: 1px solid #c8a97e;
}

.ccp-balance-available {
    background: #f0faf0;
    border: 1px solid #7ec87e;
}

.ccp-balance-grace {
    background: #fff8e6;
    border: 1px solid #e6b84d;
}

.ccp-balance-box .ccp-balance-value {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--ccp-primary, #4a2c0a);
    line-height: 1.2;
}

.ccp-balance-available .ccp-balance-value { color: #2d6a2d; }
.ccp-balance-grace .ccp-balance-value     { color: #8a6000; }

.ccp-balance-box .ccp-balance-label {
    font-size: 0.78em;
    color: #666;
    margin-top: 2px;
}

/* Badges de carência/disponível */
.ccp-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.78em;
    font-weight: 600;
    margin-left: 4px;
}

.ccp-badge-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.ccp-badge-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #28a745;
}

/* Breakdown de pedidos */
.ccp-orders-breakdown {
    margin: 16px 0;
    padding: 12px;
    background: #fafafa;
    border-radius: 6px;
    border: 1px solid #e0d5c8;
}

.ccp-orders-breakdown h5 {
    margin: 0 0 10px;
    color: var(--ccp-primary, #4a2c0a);
}

/* Positive/negative quantities */
.ccp-positive { color: #2d6a2d; }
.ccp-negative { color: #a00; }
