:root {
    --primary-color: #007aff;
    --secondary-color: #5ac8fa;
    --success-color: #4cd964;
    --danger-color: #ff3b30;
    --warning-color: #ff9500;
    --light-color: #f2f2f7;
    --dark-color: #1c1c1e;
    --text-color: #333333;
    --border-radius: 10px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #f2f2f7;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    animation: fadeIn 0.3s ease-in-out;
}

@media (max-width: 767px) {
    .container {
        padding: 15px 10px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (max-width: 767px) {
    .card {
        padding: 15px;
        margin-bottom: 15px;
    }
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

@media (max-width: 767px) {
    .header {
        margin-bottom: 20px;
    }
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.nav {
    display: flex;
    align-items: center;
}

.nav-item {
    margin-left: 20px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
    letter-spacing: -0.01em;
}

@media (max-width: 767px) {
    .btn {
        padding: 8px 15px;
        font-size: 14px;
    }
}

.btn-primary {
    background-color: #505055;
    color: white;
}

.btn-primary:hover {
    background-color: #606065;
}

.btn-danger {
    background-color: #505055;
    color: white;
}

.no-border {
    border-radius: 4px;
    border: none;
}

.btn-danger:hover {
    background-color: #606065;
}

.btn-disabled,
.btn-disabled:hover,
button:disabled,
button[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #7a7a7a !important;
}

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

.btn-success:hover {
    background-color: #3cb054;
}

.form-group {
    margin-bottom: 20px;
}

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

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #d2d2d7;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.alert {
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.alert-success {
    background-color: rgba(76, 217, 100, 0.1);
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

.alert-danger {
    background-color: rgba(255, 59, 48, 0.1);
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
}

.status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.status-online {
    background-color: rgba(76, 217, 100, 0.1);
    color: var(--success-color);
}

.status-offline {
    background-color: rgba(255, 59, 48, 0.1);
    color: var(--danger-color);
}

/* Status header and indicators */
.status-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

@media (max-width: 767px) {
    .status-header-flex {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .status-title-with-indicator {
        display: flex;
        align-items: center;
        margin-bottom: 0;
    }
    
    .card-header {
        padding: 15px;
        padding-bottom: 5px;
    }
    
    .last-checked {
        display: none;
    }
    
    .last-checked-mobile {
        display: block;
        padding: 0 15px 15px;
        font-size: 13px;
        color: #666;
        margin-top: 5px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .mobile-status-indicator {
        margin-left: 0;
    }
}

.status-title-with-indicator {
    display: flex;
    align-items: center;
}

@media (max-width: 767px) {
    .status-title-with-indicator {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .status-indicator-wrapper {
        margin-left: 0;
        margin-top: 8px;
    }
}

.status-indicator-wrapper {
    display: inline-flex;
    align-items: center;
    background-color: rgba(240, 240, 240, 0.5);
    padding: 4px 10px;
    border-radius: 15px;
    margin-left: 15px;
}

@media (max-width: 767px) {
    .status-indicator-wrapper {
        background-color: #f2f2f2;
        padding: 4px 10px;
        border-radius: 15px;
        margin-left: 10px;
        margin-top: 5px;
        display: inline-flex;
    }
}

@media (max-width: 767px) {
    .status-indicator-wrapper {
        margin-left: 10px;
    }
}

.last-checked {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

@media (max-width: 767px) {
    .last-checked {
        font-size: 13px;
        margin-top: 5px;
        margin-left: 0;
        display: block;
    }
}

.compact-header {
    padding-bottom: 5px;
    margin-bottom: 0;
}

.last-checked-container {
    padding: 0 20px 10px 20px;
    margin-top: 0;
}

.last-checked-container p {
    margin-bottom: 0;
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
}

.status-dot-online {
    background-color: #28a745;
}

.status-dot-offline {
    background-color: #dc3545;
}

.status-dot-warning {
    background-color: #ffc107;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

@media (max-width: 767px) {
    .dashboard-grid {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .dashboard-grid .card {
        margin-bottom: 0;
    }
    
    /* Specific adjustments for iPhone 15 Pro */
    @media screen and (max-width: 430px) {
        .dashboard-grid {
            gap: 10px;
        }
        
        textarea.form-control {
            min-height: 100px;
            font-size: 14px;
        }
        
        .mobile-btn {
            border-radius: 8px;
            padding: 12px 10px;
            font-size: 15px;
            margin-bottom: 8px;
        }
        
        .card-header {
            padding: 15px;
        }
        
        .card-header {
            position: relative;
            padding: 15px;
            padding-bottom: 5px;
        }
        
        .status-header-flex {
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            align-items: center;
        }
        
        .status-title-with-indicator {
            display: flex;
            align-items: center;
        }
        
        .status-title-with-indicator h2 {
            margin: 0;
            font-size: 20px;
        }
        
        .mobile-status-indicator {
            margin-right: 0;
            background-color: #f2f2f2;
            border-radius: 15px;
            padding: 4px 10px;
        }
        
        .last-checked {
            display: none;
        }
        
        .last-checked-mobile {
            display: block;
            font-size: 13px;
            color: #666;
            padding: 0 15px 15px;
            margin-top: 5px;
            border-bottom: 1px solid #f0f0f0;
        }
    }
}

.login-container {
    max-width: 400px;
    margin: 100px auto;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
}

.card-header {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-footer {
    margin-top: 20px;
    text-align: right;
}

@media (max-width: 767px) {
    .card-footer {
        display: flex;
        flex-direction: column;
        padding: 15px;
        padding-top: 10px;
    }
    
    .card-footer > div {
        display: flex;
        flex-direction: column;
        margin-bottom: 10px;
        width: 100%;
    }
    
    .card-footer .bot-controls form {
        margin-bottom: 10px;
        width: 100%;
    }
    
    .card-footer .bot-controls button,
    .card-footer .action-controls button {
        width: 100%;
        padding: 12px 15px;
        font-size: 16px;
        margin-bottom: 10px;
        border-radius: 8px;
    }
    
    .card-footer .action-controls {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    
    .card-footer .action-controls button {
        width: 100%;
        margin: 0 0 10px 0;
    }
    
    /* Fix button indents for mobile */
    .card-footer form,
    .card-footer .bot-controls,
    .card-footer .action-controls {
        padding: 0;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
    }
}

@media (max-width: 767px) {
    .bot-controls {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        margin-bottom: 10px;
    }
    
    .bot-controls form {
        margin-bottom: 8px;
        flex-basis: 100%;
    }
    
    .bot-controls button {
        width: 100%;
        margin: 0 0 8px 0;
    }
    
    .action-controls {
        width: 100%;
        margin-top: 5px;
    }
    
    .action-buttons {
        display: flex;
        justify-content: space-between;
        width: 100%;
    }
    
    .action-buttons button {
        flex: 1;
        margin: 0 5px;
    }
    
    .action-buttons button:first-child {
        margin-left: 0;
    }
    
    .action-buttons button:last-child {
        margin-right: 0;
    }
    
    /* Specific adjustments for iPhone 15 Pro */
    @media screen and (max-width: 430px) { /* iPhone 15 Pro width */
        .card-header h2 {
            font-size: 20px;
        }
        
        .btn {
            padding: 12px 15px;
            font-size: 16px;
            border-radius: 8px;
            margin-bottom: 10px;
        }
        
        .form-control {
            padding: 8px;
            font-size: 14px;
        }
        
        .card-footer {
            padding: 15px;
        }
        
        .card-footer form,
        .card-footer .bot-controls,
        .card-footer .action-controls {
            padding: 0;
            margin: 0;
            width: 100%;
        }
        
        /* Ensure all buttons have the same width and margins */
        .card-footer button {
            width: 100% !important;
            margin-left: 0 !important;
            margin-right: 0 !important;
            margin-bottom: 10px !important;
        }
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}
