
/*
Theme Name: MyContract PRO
Description: Professional Contract Management System for WordPress
Version: 1.0.0
Author: MyContract Team
Text Domain: mycontract-pro
*/

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

:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --success-color: #10b981;
    --background: #ffffff;
    --foreground: #1f2937;
    --muted: #f8fafc;
    --muted-foreground: #6b7280;
    --border: #e5e7eb;
    --card: #ffffff;
    --card-foreground: #1f2937;
    --popover: #ffffff;
    --popover-foreground: #1f2937;
    --primary: #3b82f6;
    --primary-foreground: #ffffff;
    --secondary: #f1f5f9;
    --secondary-foreground: #0f172a;
    --accent: #f1f5f9;
    --accent-foreground: #0f172a;
    --destructive: #ef4444;
    --destructive-foreground: #ffffff;
    --ring: #3b82f6;
    --radius: 0.5rem;
}

/* Dark mode variables */
[data-theme="dark"] {
    --background: #0f172a;
    --foreground: #f8fafc;
    --muted: #1e293b;
    --muted-foreground: #94a3b8;
    --border: #334155;
    --card: #1e293b;
    --card-foreground: #f8fafc;
    --popover: #1e293b;
    --popover-foreground: #f8fafc;
    --secondary: #1e293b;
    --secondary-foreground: #f8fafc;
    --accent: #1e293b;
    --accent-foreground: #f8fafc;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Layout */
.mycontract-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.mycontract-grid {
    display: grid;
    gap: 1.5rem;
}

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

@media (max-width: 768px) {
    .mycontract-grid-cols-2,
    .mycontract-grid-cols-3,
    .mycontract-grid-cols-4 {
        grid-template-columns: 1fr;
    }
}

/* Navigation */
.mycontract-nav {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 64px;
}

[data-theme="dark"] .mycontract-nav {
    background: rgba(15, 23, 42, 0.8);
}

.mycontract-nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.mycontract-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--foreground);
    text-decoration: none;
}

.mycontract-nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mycontract-nav-link {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    color: var(--muted-foreground);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.mycontract-nav-link:hover,
.mycontract-nav-link.active {
    background-color: var(--primary);
    color: white;
}

/* Cards */
.mycontract-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.mycontract-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mycontract-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.mycontract-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--card-foreground);
    margin-bottom: 0.25rem;
}

.mycontract-card-description {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.mycontract-card-content {
    padding: 1.5rem;
}

/* Buttons */
.mycontract-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

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

.mycontract-btn-primary:hover {
    background: var(--primary-hover);
}

.mycontract-btn-secondary {
    background: var(--secondary);
    color: var(--secondary-foreground);
}

.mycontract-btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--foreground);
}

.mycontract-btn-outline:hover {
    background: var(--accent);
}

.mycontract-btn-danger {
    background: var(--danger-color);
    color: white;
}

/* Forms */
.mycontract-form-group {
    margin-bottom: 1rem;
}

.mycontract-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--foreground);
}

.mycontract-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
    color: var(--foreground);
    font-size: 0.875rem;
}

.mycontract-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.mycontract-textarea {
    min-height: 100px;
    resize: vertical;
}

.mycontract-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Tables */
.mycontract-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
}

.mycontract-table th,
.mycontract-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.mycontract-table th {
    background: var(--muted);
    font-weight: 600;
    color: var(--foreground);
}

.mycontract-table tr:hover {
    background: var(--muted);
}

/* Badges */
.mycontract-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.mycontract-badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.mycontract-badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.mycontract-badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

/* Alerts */
.mycontract-alert {
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid;
    margin-bottom: 1rem;
}

.mycontract-alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success-color);
    color: var(--success-color);
}

.mycontract-alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--warning-color);
    color: var(--warning-color);
}

.mycontract-alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger-color);
    color: var(--danger-color);
}

/* Utilities */
.mycontract-text-center { text-align: center; }
.mycontract-text-right { text-align: right; }
.mycontract-font-bold { font-weight: 700; }
.mycontract-font-semibold { font-weight: 600; }
.mycontract-text-sm { font-size: 0.875rem; }
.mycontract-text-lg { font-size: 1.125rem; }
.mycontract-text-xl { font-size: 1.25rem; }
.mycontract-text-2xl { font-size: 1.5rem; }
.mycontract-text-3xl { font-size: 1.875rem; }

.mycontract-mb-2 { margin-bottom: 0.5rem; }
.mycontract-mb-4 { margin-bottom: 1rem; }
.mycontract-mb-6 { margin-bottom: 1.5rem; }
.mycontract-mb-8 { margin-bottom: 2rem; }

.mycontract-mt-2 { margin-top: 0.5rem; }
.mycontract-mt-4 { margin-top: 1rem; }
.mycontract-mt-6 { margin-top: 1.5rem; }
.mycontract-mt-8 { margin-top: 2rem; }

.mycontract-p-4 { padding: 1rem; }
.mycontract-p-6 { padding: 1.5rem; }
.mycontract-p-8 { padding: 2rem; }

.mycontract-hidden { display: none; }
.mycontract-block { display: block; }
.mycontract-flex { display: flex; }
.mycontract-inline-flex { display: inline-flex; }

.mycontract-items-center { align-items: center; }
.mycontract-justify-between { justify-content: space-between; }
.mycontract-justify-center { justify-content: center; }

.mycontract-gap-2 { gap: 0.5rem; }
.mycontract-gap-4 { gap: 1rem; }
.mycontract-gap-6 { gap: 1.5rem; }

.mycontract-w-full { width: 100%; }
.mycontract-h-full { height: 100%; }

/* Responsive */
@media (max-width: 768px) {
    .mycontract-nav-links {
        display: none;
    }
    
    .mycontract-container {
        padding: 0 0.5rem;
    }
    
    .mycontract-card-header,
    .mycontract-card-content {
        padding: 1rem;
    }
}

/* Loading States */
.mycontract-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Chatbot Styles */
.mycontract-chatbot-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
}

.mycontract-chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.mycontract-chatbot-window {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 384px;
    height: 600px;
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 999;
    overflow: hidden;
    display: none;
}

.mycontract-chatbot-window.active {
    display: block;
}

.mycontract-chatbot-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    padding: 1rem;
    position: relative;
}

.mycontract-chatbot-iframe {
    width: 100%;
    height: calc(100% - 80px);
    border: none;
}

/* Dashboard Specific Styles */
.mycontract-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.mycontract-stat-card {
    background: var(--card);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mycontract-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.mycontract-stat-label {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

/* Contract List Styles */
.mycontract-contract-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.mycontract-contract-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.mycontract-contract-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--foreground);
}

.mycontract-contract-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.mycontract-contract-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Print Styles */
@media print {
    .mycontract-nav,
    .mycontract-chatbot-button,
    .mycontract-chatbot-window {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .mycontract-card {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
}
