/* TPT Contact Manager MVP - Frontend Styles */

:root {
    --primary-color: #007cba;
    --primary-hover: #005a94;
    --secondary-color: #f6f7f8;
    --text-dark: #1e1e1e;
    --text-medium: #555555;
    --text-light: #888888;
    --bg-white: #ffffff;
    --border-color: #e1e5e9;
    --success: #28a745;
    --error: #dc3545;
    --warning: #ffc107;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --border-radius: 4px;
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
}

body.tpt-cm {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--secondary-color);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Layout */
.tpt-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header - Clean and Professional */
.tpt-header {
    background: linear-gradient(to right, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 18px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0,124,186,0.1);
}

.tpt-header .tpt-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo - More Polished */
.tpt-logo {
    font-size: 26px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, #005a94 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: -0.8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tpt-logo:before {
    content: "●";
    font-size: 12px;
    color: var(--primary-color);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

.tpt-logo:hover {
    filter: brightness(1.1);
}

/* Navigation - Refined */
.tpt-nav {
    display: flex;
    align-items: center;
}

.tpt-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
}

.tpt-nav li {
    margin: 0;
    padding: 0;
}

.tpt-nav a {
    color: var(--text-medium);
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
    white-space: nowrap;
    font-size: 15px;
    position: relative;
}

.tpt-nav a:not(.btn-primary):hover {
    background: rgba(0,124,186,0.08);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.tpt-nav a:not(.btn-primary):active {
    transform: translateY(0);
}

.tpt-nav a.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 4px rgba(0,124,186,0.3);
}

/* Sign Up Button in Nav - Special Styling */
.tpt-nav a.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(0,124,186,0.3);
    padding: 10px 24px;
    font-weight: 600;
}

.tpt-nav a.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(0,124,186,0.4);
    transform: translateY(-2px);
}



/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--secondary-color);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

/* Forms */
.tpt-form {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 30px;
    max-width: 500px;
    margin: 40px auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0,124,186,0.2);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

/* Cards */
.tpt-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
}

.tpt-card-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.tpt-card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

/* Grid */
.tpt-row {
    display: flex;
    margin: 0 -10px;
}

.tpt-col {
    padding: 0 10px;
    flex: 1;
}

.tpt-col-2 { flex: 2; }
.tpt-col-3 { flex: 3; }

/* Tables */
.tpt-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.tpt-table th,
.tpt-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.tpt-table th {
    background: var(--secondary-color);
    font-weight: 600;
}

.tpt-table tr:hover {
    background: var(--secondary-color);
}

.tpt-table-actions {
    display: flex;
    gap: 5px;
}

/* Stats */
.tpt-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.tpt-stat {
    background: var(--bg-white);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.tpt-stat-number {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0;
}

.tpt-stat-label {
    color: var(--text-medium);
    font-size: 14px;
    margin-top: 5px;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .tpt-header .tpt-container {
        flex-direction: column;
        gap: 15px;
    }

    .tpt-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .tpt-container {
        padding: 0 15px;
    }

    .tpt-form {
        padding: 20px;
        margin: 20px auto;
    }

    .tpt-stats {
        grid-template-columns: 1fr;
    }

    .tpt-table {
        font-size: 14px;
    }

    .tpt-table th,
    .tpt-table td {
        padding: 8px 10px;
    }
}

/* Landing page specific */
.landing-hero {
    text-align: center;
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
}

.landing-hero h1 {
    font-size: 48px;
    margin: 0 0 20px 0;
}

.landing-hero p {
    font-size: 20px;
    margin: 0 0 30px 0;
    opacity: 0.9;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 900px;
    margin: 60px auto;
}

.pricing-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 30px;
    text-align: center;
    border: 2px solid transparent;
}

.pricing-card.recommended {
    border-color: var(--primary-color);
    position: relative;
}

.pricing-card.recommended::before {
    content: 'RECOMMENDED';
    background: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 3px 3px 0 0;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: bold;
}

.pricing-price {
    font-size: 48px;
    font-weight: bold;
    color: var(--primary-color);
    margin: 20px 0;
}

.pricing-price span {
    font-size: 24px;
}

/* Landing page form overlay fix */
.signup-form-overlay {
    background: rgba(0,0,0,0.85) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
}

.signup-form-overlay .form-label {
    color: #ffffff !important;
}

.signup-form-overlay .form-input {
    background: rgba(255,255,255,0.9) !important;
    color: #333333 !important;
}

.signup-form-overlay .form-input:focus {
    background: #ffffff !important;
    color: #333333 !important;
}

/* User Messages System */
.tpt-messages {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
}

@media (max-width: 768px) {
    .tpt-messages {
        top: 80px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

.tpt-message {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    padding: 15px 20px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.tpt-message-success {
    border-left: 4px solid var(--success);
    background: #f7fdf9;
}

.tpt-message-error {
    border-left: 4px solid var(--error);
    background: #fef7f7;
}

.tpt-message-warning {
    border-left: 4px solid var(--warning);
    background: #fffcf5;
}

.tpt-message-info {
    border-left: 4px solid var(--primary-color);
    background: #f0f8ff;
}

.tpt-message-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-medium);
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    flex-shrink: 0;
}

.tpt-message-close:hover {
    color: var(--text-dark);
}

.tpt-message-success .tpt-message-close {
    color: var(--success);
}

.tpt-message-error .tpt-message-close {
    color: var(--error);
}

.tpt-message-warning .tpt-message-close {
    color: var(--warning);
}

.tpt-message-info .tpt-message-close {
    color: var(--primary-color);
}



/* Professional SaaS Footer */
.tpt-footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #ffffff;
    padding: 60px 0 20px 0;
    margin-top: 80px;
}

.tpt-footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.tpt-footer-section {
    display: flex;
    flex-direction: column;
}

.tpt-footer-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #ffffff;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.tpt-footer-description {
    color: #bdc3c7;
    line-height: 1.6;
    margin: 0 0 20px 0;
    font-size: 14px;
}

/* Quick Links - Vertical Layout */
.tpt-footer-nav {
    display: flex;
    flex-direction: column;
}

.tpt-footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tpt-footer-link {
    color: #ecf0f1;
    text-decoration: none;
    padding: 8px 0;
    transition: var(--transition);
    font-size: 14px;
    border-bottom: 1px solid transparent;
}

.tpt-footer-link:hover {
    color: #ffffff;
    border-bottom-color: var(--primary-color);
    padding-left: 8px;
}

.tpt-footer-contact {
    color: #bdc3c7;
    font-size: 14px;
    line-height: 1.8;
}

.tpt-footer-contact p {
    margin: 8px 0;
}

.tpt-footer-contact a {
    color: #ecf0f1;
    text-decoration: none;
    font-weight: 500;
}

.tpt-footer-contact a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.tpt-footer-bottom {
    border-top: 1px solid #4a5568;
    padding-top: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.tpt-footer-bottom p {
    margin: 0;
    color: #95a5a6;
    font-size: 13px;
    line-height: 1.5;
}

/* Legal Links - Horizontal Layout */
.tpt-footer-legal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tpt-footer-legal a {
    color: #95a5a6;
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition);
}

.tpt-footer-legal a:hover {
    color: #ecf0f1;
    text-decoration: underline;
}

.tpt-footer-legal .tpt-separator {
    color: #4a5568;
    font-size: 13px;
}

/* Footer Responsive Design */
@media (max-width: 768px) {
    .tpt-footer {
        padding: 40px 0 20px 0;
        margin-top: 60px;
    }

    .tpt-footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .tpt-footer-title {
        font-size: 16px;
    }

    .tpt-footer-links {
        align-items: center;
    }

    .tpt-footer-contact {
        text-align: center;
    }
    
    .tpt-footer-bottom {
        gap: 16px;
    }
    
    .tpt-footer-legal {
        font-size: 12px;
    }
}
